Skip to main content

Module term

Module term 

Source
Expand description

The patch term: a typed tree over the v1 module palette.

The Audio/Mod sort distinction is enforced by the Rust type system itself — an ill-sorted term (an LFO where audio is expected, a filter in a modulation slot) is unrepresentable. The grammar prior samples these types directly and the compiler interprets them into a quiver Patch; there is no unvalidated intermediate representation.

All continuous parameters are normalized to [0, 1] (uniform prior support); musical mappings (log cutoff scales, bounded resonance/feedback) live in [crate::compile]. Discrete parameters are small enums.

Structs§

AmpEnv
The mandatory amplitude envelope on every voice (ADSR, normalized 0-1).
PatchTree
A complete patch genome: an audio term wrapped in the mandatory voice stage (amp ADSR → VCA → limiter → stereo out, added by the compiler).
Uid
A stable identity for one node, independent of where it sits.

Enums§

AudioNode
An audio-sort term: sources at the leaves, processors and mixers above.
DriveMode
Distortion shaping curve.
FilterKind
Filter kind: three SVF responses plus the diode ladder.
ModNode
A modulation-slot term: what drives a processor’s mod input.
ModOp
A unary CV processor: something that sits between a modulator and its destination. Index order matches the #modop categorical.
NoiseColor
Noise color; maps to NoiseGenerator output ports.
PairOp
A binary CV combiner over two modulation terms. Index order matches the #pairop categorical.
TableShape
Wavetable shape. Index order matches the trace-site categorical and quiver’s own WavetableType table, which the table CV selects into.
Waveform
Oscillator / LFO waveform. Index order matches the trace-site categorical and the quiver output-port table.

Constants§

QUANT_ROOTS
Root-note names for the quantizer’s root port, which quiver reads as (cv · 11.99) as i32 semitones above C.
QUANT_SCALES
The scales quiver’s ScaleQuantizer selects between, in its own index order — which is not quiver::modules::Scale’s.
RECT_MODES
Rectifier polarities, in the order rmode selects them.

Functions§

quant_root_index
Which of QUANT_ROOTS a normalized qroot knob selects.
quant_scale_index
Which of QUANT_SCALES a normalized qscale knob selects — quiver’s own (cv · 6.99) as u8, so the plate and the module cannot disagree.
rect_mode_index
Which of RECT_MODES a normalized rmode knob selects — cell centres on a three-way split, the convention the other quantized knobs use.