Skip to main content

vec_envelope

Function vec_envelope 

Source
pub fn vec_envelope(
    state: &mut EnvelopeState,
    dst: &mut [f32],
    src: &[f32],
    attack: &[f32],
    release: &[f32],
    mode: EnvelopeMode,
    sample_rate: f32,
)
Expand description

Envelope follower. Tracks amplitude of src with attack/release smoothing.

attack and release are in seconds (per-sample buffers for modulation). Output in dst is the smoothed envelope value.