pub struct LowPass { /* private fields */ }Expand description
3rd Order Butterworth Low Pass Filter with resonance.
Implementations§
Source§impl LowPass
impl LowPass
Sourcepub fn new(fc: MathT, r: MathT) -> LowPass
pub fn new(fc: MathT, r: MathT) -> LowPass
Creates a new low pass from the given cutoff frequency and resonance values.
§Parameters
fc- The cutoff frequency.r- The resonance of the filter. Value should be in the range [0,1]. If the value falls out of that range it is clamped to the closer value.
Sourcepub fn get_central_frequency(&self) -> MathT
pub fn get_central_frequency(&self) -> MathT
Returns the central frequency of the filter.
Sourcepub fn set_central_frequency(&mut self, fc: MathT)
pub fn set_central_frequency(&mut self, fc: MathT)
Sets the central frequency of the filter.
Sourcepub fn get_resonance(&self) -> MathT
pub fn get_resonance(&self) -> MathT
Returns the resonance of the filter.
Sourcepub fn set_resonance(&mut self, r: MathT)
pub fn set_resonance(&mut self, r: MathT)
Sets the resonance of the filter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LowPass
impl RefUnwindSafe for LowPass
impl Send for LowPass
impl Sync for LowPass
impl Unpin for LowPass
impl UnsafeUnpin for LowPass
impl UnwindSafe for LowPass
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