flowlang-cc/elm-audio-graph/1.0.1

Renamed to flow-lang/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 flowlang-cc/elm-audio-graph still install under that name. 1 version of 2 come from the new location (see their notes).

AudioGraph.Units

The value of an AudioParam or NodeProperty is highly context relevant. Something that is expecting frequency in hertz may produce very unexpected output if it receives a decibal value, even though they both represent Floats. To encode this context the Value union type defines all the possible contexts for primative types to exist in.

type Value
= Attribute Bool
| Buffer (List Float)
| Coefficients (List Float)
| Cents Float
| Decibels Float
| DistanceModelType DistanceModel
| FilterType Filter
| FFT_Size Int
| Hertz Float
| MIDI_Note Int
| MIDI_CC Int
| OversampleType Oversample
| PanningModelType PanningModel
| WaveformType Waveform
| WaveshaperCurve (List Float)
| Number Float

Union Types

Some values, such as WaveformType are better expressed as their own union type, rather than arbitrary string values.

= Linear
| Inverse
| Exponential
type Filter
= Lowpass
| Highpass
| Bandpass
| Lowshelf
| Highshelf
| Peaking
| Notch
| Allpass
= None
| TwoX
| FourX
= EqualPower
| HRTF
= Sine
| Triangle
| Sawtooth
| Square