Trait Modulator

Source
pub trait Modulator {
    // Required method
    fn get(&self, now: u32) -> f32;
}
Expand description

An audio node parameter modulator.

Includes both envelopes and LFOs.

Required Methods§

Source

fn get(&self, now: u32) -> f32

Get the modulator value at the given time (in samples).

The time usually increases. It can go down if it wraps, which happens only if the audio plays for a very long time. Or it can be intentionally reset to 0.

The time value is not sequential: 8 might be followed by 200.

Implementors§