pub struct Synthwave {
pub unison: u8,
pub detune: u16,
pub spread: u8,
pub pan: i8,
pub voices: u8,
pub glide_ms: u32,
pub legato: bool,
pub filter: Option<VoiceFilter>,
pub pitch_lfo: Option<Lfo>,
pub cutoff_lfo: Option<Lfo>,
pub amplitude_lfo: Option<Lfo>,
pub pan_lfo: Option<Lfo>,
}Expand description
Opt-in synthwave controls, combined with an instrument’s waveform and amplitude
ADSR. Supports pulse/square, saw and triangle. Mutually exclusive with chip/drum,
except that a wavetable chip source takes voices alone, with every other field at
its default, for per-note voices.
Fields§
§unison: u8Oscillators per note, 1..=8, normalized by their count.
detune: u16Symmetric outer detune, 0..=100 cents; one oscillator has zero detune.
spread: u8Symmetric linear stereo spread, 0..=100 percent.
pan: i8Whole-note stereo pan, -100..=100 percent.
voices: u8Voice slots per channel, 1..=16. Idle, then oldest releasing, then oldest held voice is reused, ties by slot index. Stealing is immediate.
glide_ms: u32Portamento duration in milliseconds, 0..=60000. Requires voices=1. Active-note retriggers interpolate in cents from the previous current pitch.
legato: boolWith voices=1, adjacent full-gate notes of the same instrument preserve amplitude/filter envelopes, phase and filter state. Gaps retrigger.
filter: Option<VoiceFilter>§pitch_lfo: Option<Lfo>§cutoff_lfo: Option<Lfo>§amplitude_lfo: Option<Lfo>§pan_lfo: Option<Lfo>