pub enum SmoothingStyle {
None,
Linear(f32),
Exponential(f32),
Logarithmic(f32),
}Expand description
Smoothing algorithm selection.
The f32 parameter is the smoothing time in milliseconds.
Variants§
None
No smoothing - value changes instantly.
Linear(f32)
Linear interpolation over specified milliseconds. Reaches target exactly after the specified time. Good for: general purpose, predictable behavior.
Exponential(f32)
Exponential (one-pole IIR) smoothing. Fast initial response, asymptotically approaches target. Reaches ~63% of target in the specified time (time constant). Good for: most musical parameters, can cross zero.
Logarithmic(f32)
Logarithmic smoothing for frequency and other positive-only values. Slow start, accelerating curve. CANNOT cross zero or handle negative values - use Exponential for dB parameters. Good for: filter frequencies (Hz), other always-positive parameters.
Trait Implementations§
Source§impl Clone for SmoothingStyle
impl Clone for SmoothingStyle
Source§fn clone(&self) -> SmoothingStyle
fn clone(&self) -> SmoothingStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SmoothingStyle
impl Debug for SmoothingStyle
Source§impl Default for SmoothingStyle
impl Default for SmoothingStyle
Source§impl PartialEq for SmoothingStyle
impl PartialEq for SmoothingStyle
impl Copy for SmoothingStyle
impl StructuralPartialEq for SmoothingStyle
Auto Trait Implementations§
impl Freeze for SmoothingStyle
impl RefUnwindSafe for SmoothingStyle
impl Send for SmoothingStyle
impl Sync for SmoothingStyle
impl Unpin for SmoothingStyle
impl UnwindSafe for SmoothingStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more