Struct State Variable Filter
pub struct StateVariableFilter { /* private fields */ }Expand description
One-channel f64 trapezoidal state-variable filter. Processing and reset allocate nothing. Coefficient replacement preserves integrator histories; callers supply any desired control smoothing. No nonlinear saturation, self-oscillation, denormal policy, arbitrary modulation stability, nonfinite audio sanitization or callback deadline guarantee is imposed.
Implementations§
§impl StateVariableFilter
impl StateVariableFilter
pub fn new(coefficients: StateVariableCoefficients) -> Self
pub fn set_coefficients(&mut self, coefficients: StateVariableCoefficients)
pub fn set_coefficients(&mut self, coefficients: StateVariableCoefficients)
Retain both integrator states while replacing prepared coefficients.
pub fn reset(&mut self)
pub fn reset(&mut self)
Clear histories while retaining coefficients.
pub fn process_sample(&mut self, input: f64) -> StateVariableOutputs
pub fn process_sample(&mut self, input: f64) -> StateVariableOutputs
Update once and return all three outputs. Nonfinite input propagates and may poison histories until reset; extreme finite amplitudes may overflow.
Trait Implementations§
§impl Clone for StateVariableFilter
impl Clone for StateVariableFilter
§fn clone(&self) -> StateVariableFilter
fn clone(&self) -> StateVariableFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StateVariableFilter
impl RefUnwindSafe for StateVariableFilter
impl Send for StateVariableFilter
impl Sync for StateVariableFilter
impl Unpin for StateVariableFilter
impl UnsafeUnpin for StateVariableFilter
impl UnwindSafe for StateVariableFilter
Blanket Implementations§
§impl<T> BorrowMut<T> for T
impl<T> BorrowMut<T> for T
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more