pub enum SmoothingStyle {
None,
Linear(f64),
Exponential(f64),
Logarithmic(f64),
}Expand description
Smoothing style for a parameter.
Variants§
None
Linear(f64)
Straight-line ramp over the given milliseconds: a constant per-sample delta that reaches the target in exactly that time, whatever the distance. The predictable choice for click-free gain fades and crossfades where a fixed-length ramp is what you want.
Exponential(f64)
One-pole exponential over the given milliseconds: fast at first, asymptotic near the target (it lands only within the snap threshold, never exactly). The natural feel for most controls.
Logarithmic(f64)
Multiplicative (log-domain) exponential smoothing over the given
milliseconds. Ramps geometrically rather than additively, so the
perceived rate of change is constant - the right choice for
frequency and linear-gain params where a fixed ratio, not a fixed
delta, reads as “smooth”. Requires strictly positive endpoints; a
non-positive current or target snaps (a log ramp can’t cross
or touch zero).
Trait Implementations§
Source§impl Clone for SmoothingStyle
impl Clone for SmoothingStyle
Source§fn clone(&self) -> SmoothingStyle
fn clone(&self) -> SmoothingStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more