pub struct SvfCoefficients<F: Float> { /* private fields */ }Expand description
The filter coefficients that hold old necessary data to reproduce the filter
Implementations§
Source§impl<F: Float> SvfCoefficients<F>
impl<F: Float> SvfCoefficients<F>
Sourcepub fn set(
&mut self,
filter_type: FilterType,
sample_rate: F,
cutoff_frequency: F,
q: F,
gain: F,
) -> Result<(), SvfError>
pub fn set( &mut self, filter_type: FilterType, sample_rate: F, cutoff_frequency: F, q: F, gain: F, ) -> Result<(), SvfError>
The set function is setting the current parameters of the filter. Don’t call from a different thread than tick. Parameters:
- filter_type: choose one of the filter types, like peak, lowpass or highpass
- sample_rate: the sample_rate of the audio buffer that the filter should be applied on
- frequency: the frequency in Hz where the cutoff of the filter should be
- q: the steepness of the filter
- gain: the gain boost or decrease of the filter
Trait Implementations§
Source§impl<F: Clone + Float> Clone for SvfCoefficients<F>
impl<F: Clone + Float> Clone for SvfCoefficients<F>
Source§fn clone(&self) -> SvfCoefficients<F>
fn clone(&self) -> SvfCoefficients<F>
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<F: Default + Float> Default for SvfCoefficients<F>
impl<F: Default + Float> Default for SvfCoefficients<F>
Source§fn default() -> SvfCoefficients<F>
fn default() -> SvfCoefficients<F>
Returns the “default value” for a type. Read more
impl<F: Eq + Float> Eq for SvfCoefficients<F>
impl<F: Float> StructuralPartialEq for SvfCoefficients<F>
Auto Trait Implementations§
impl<F> Freeze for SvfCoefficients<F>where
F: Freeze,
impl<F> RefUnwindSafe for SvfCoefficients<F>where
F: RefUnwindSafe,
impl<F> Send for SvfCoefficients<F>where
F: Send,
impl<F> Sync for SvfCoefficients<F>where
F: Sync,
impl<F> Unpin for SvfCoefficients<F>where
F: Unpin,
impl<F> UnwindSafe for SvfCoefficients<F>where
F: UnwindSafe,
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