#[non_exhaustive]pub enum Modulator {
Slide {
from: f32,
to: f32,
secs: f32,
curve: Curve,
},
Lfo {
shape: Shape,
rate: f32,
depth: f32,
center: f32,
},
Arp {
steps: Vec<f32>,
rate: f32,
},
EnvMod {
adsr: Adsr,
from: f32,
to: f32,
},
Rand {
from: f32,
to: f32,
rate: f32,
seed: u64,
},
}Expand description
A time-varying parameter value. Externally tagged: { "slide": {...} }.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Slide
Glide from from to to over secs, then hold at to.
Fields
Lfo
Low-frequency oscillation around center (vibrato / tremolo).
Fields
Arp
Step through steps at rate steps/sec, looping (arpeggio / blip table).
EnvMod
An ADSR envelope mapped onto a parameter range: the value rides from
from (envelope = 0) to to (envelope = 1). This is the modulation
behind filter envelopes (cutoff from high to low), pitch envelopes,
and amplitude shaping of any param. The shape is time-based, not slide.
Fields
Rand
Smooth random walk between from and to, drifting at rate new
targets per second (smoothstep-interpolated). The organic, NON-periodic
motion the other modulators lack — wind gusting on a filter cutoff,
fire flicker on a gain, drifting detune. Deterministic and edit-stable:
the walk is seeded only from this modulator’s own fields, so it never
shifts when sibling nodes change. Give two rands different seeds (or
rates) to decorrelate them.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Modulator
impl<'de> Deserialize<'de> for Modulator
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Modulator
impl JsonSchema for Modulator
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more