Renamed to hayleigh-dot-dev/elm-audio-graph. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as pd-andy/elm-audio-graph still install under that name. 2 versions of 2 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/hayleigh-dot-dev/elm-audio-graph.
What we checked: The repo moved to github.com/hayleigh-dot-dev/elm-audio-graph. Rebuilt with git archive from commit 7743caae91e8 of https://github.com/hayleigh-dot-dev/elm-audio-graph (zip prefix pd-andy-elm-audio-graph-a821efe/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 56b9f8697c5b54aaeb18d9942935960fb4fbf9b7.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/pd-andy/elm-audio-graph/zipball/1.0.1/
A NodeID is used to ensure each node in the graph is unique. This is necessary if you're tracking changes to the graph in javascript when constructing and updating an actual Web Audio graph.
This package does not provide a means of generating NodeIDs, you are free to use
other packages and convert the results to a NodeID with the idFromString and
idFromInt methods. You may also simply use human readable NodeIDs such as myOsc.
Takes a raw string and returns a NodeID.
Converts a NodeID into a raw string. Used when encoding an audio node, but may also be useful in your own code.
In order to construct the real Web Audio graph in javascript, we need to know what each node actually is. Custom types are also supported to allow user-defined audio nodes to be constructed, or third-party / non-standard Web Audio nodes to be represented.
Node params are typed to restrict their values. This type safety ensures that if your elm code compiles then a valid audio graph can be constructed in javascript. The values for each Param are simple type aliases that can be found in AudioGraph.Units and exist solely for more expressive type annotations.
Some utilities for dealing with units can be found in AudioGraph.Utils.
Currently only conversion to and from MIDI / Hertz is available.
Searches a nodes inputs by label and returns the channel number that matches. If no match is found, -1 is chosen instead.
Searches a nodes inputs by label and returns the channel number that matches. If no match is found, -1 is chosen instead.
The destination node representss the final destination for all audio in the Web Audio Context. This is usually your device's speakers. You won't often need to create a destination node directly, as an emptyAudioGraph already includes one.
The destination has an ID of "_destination".
Creates an oscillator node representing a Web Audio oscillator
Creates a gain node representing a Web Audio gain node.
You can create your own custom nodes with createCustomNode by simply
providing a String to name your new node type, and a dictionary of its default
parameters. Finally, passing a ID as usual will construct the new custom
node.
You can then partially apply createCustomNode to create your own node generators:
createMyAwesomeNode : ID -> Node
createMyAwesomeNode =
createCustomNode
"MyAwesomeNode"
(Dict.fromList
[ ( "awesomeness", Value 100.0 )
]
)
(Dict.fromList
[ ( "audioIn", 0 )
, ( "awesomeness", 1 )
]
)
(Dict.fromList
[ ( "audioOut", 0 )
]
)
Node represents a generic audio node.