Skip to main content

amp_gain

Function amp_gain 

Source
pub fn amp_gain(
    envelope: f64,
    velocity: f64,
    velocity_track: f64,
    voice_amplitude: f64,
) -> f64
Expand description

The voice gain after the amplitude envelope: (envelope * lerp(1, velocity, velocity_track) * voice_amplitude)^2.

The square means that a measured RMS contour maps to the square root of the envelope level. Renders on the open engine confirm the square for the sustain level, the velocity and voice_amplitude.