AUDIO
Source snapshot · 11 November 2026

API reference / ravet_examples::synth

Module synth 

Expand description

Eight-voice subtractive synthesis with one ADSR per voice shared by VCA and VCF.

Structs§

PatchError
Invalid physical controls, unsupported rate, or prepared-patch rate mismatch.
SubtractiveSynth
Example mono/stereo f32 instrument with eight fixed MPE-aware voices.
SynthPatch
Fixed-storage patch designed on the control thread, including a 256-step VCF table. Envelope amount is a positive cutoff excursion in semitones. Member/master CC74 adds up to 24 semitones; the combined excursion clamps below 45% of rate. ADSR settings latch at note-on. Waveform, level and VCF controls also affect sounding notes when a new patch is applied. No parameter crossfade is provided.

Constants§

DEFAULT_VALUES
Waveform, level, cutoff Hz, resonance Q, envelope semitones, A ms, D ms, S, R ms.
RANGES
Physical bounds; waveform must additionally be an integer 0..3.
VOICES
Fixed polyphony; mix scales by this capacity.