pub fn derivative_sfx(envelope: &[f32]) -> Result<f32, AudioError>Expand description
DerivativeSFX: the mean of the first difference (env[i+1] - env[i]) of the
envelope taken over the region after the maximum. It characterises the
decay shape: a smooth, gentle decay yields a small negative value; a sharp
drop yields a larger-magnitude negative value.
ยงErrors
AudioError::InvalidParameterif the envelope has fewer than two samples after the maximum (no derivative is defined).