Struct synfx_dsp::BiquadCoefs
source · [−]Fields
a1: f32
a2: f32
b0: f32
b1: f32
b2: f32
Implementations
sourceimpl BiquadCoefs
impl BiquadCoefs
pub fn new(b0: f32, b1: f32, b2: f32, a1: f32, a2: f32) -> Self
sourcepub fn butter_lowpass(sample_rate: f32, cutoff: f32) -> BiquadCoefs
pub fn butter_lowpass(sample_rate: f32, cutoff: f32) -> BiquadCoefs
Returns settings for a Butterworth lowpass filter. Cutoff is the -3 dB point of the filter in Hz.
sourcepub fn calc_cascaded_butter_q(order: usize, casc_idx: usize) -> f32
pub fn calc_cascaded_butter_q(order: usize, casc_idx: usize) -> f32
Returns the Q for cascading a butterworth filter:
sourcepub fn lowpass(sample_rate: f32, q: f32, cutoff: f32) -> BiquadCoefs
pub fn lowpass(sample_rate: f32, q: f32, cutoff: f32) -> BiquadCoefs
Returns settings for a lowpass filter with a specific q
sourcepub fn resonator(sample_rate: f32, center: f32, bandwidth: f32) -> BiquadCoefs
pub fn resonator(sample_rate: f32, center: f32, bandwidth: f32) -> BiquadCoefs
Returns settings for a constant-gain bandpass resonator. The center frequency is given in Hz. Bandwidth is the difference in Hz between -3 dB points of the filter response. The overall gain of the filter is independent of bandwidth.
Trait Implementations
sourceimpl Clone for BiquadCoefs
impl Clone for BiquadCoefs
sourcefn clone(&self) -> BiquadCoefs
fn clone(&self) -> BiquadCoefs
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for BiquadCoefs
impl Debug for BiquadCoefs
sourceimpl Default for BiquadCoefs
impl Default for BiquadCoefs
sourcefn default() -> BiquadCoefs
fn default() -> BiquadCoefs
Returns the “default value” for a type. Read more
impl Copy for BiquadCoefs
Auto Trait Implementations
impl RefUnwindSafe for BiquadCoefs
impl Send for BiquadCoefs
impl Sync for BiquadCoefs
impl Unpin for BiquadCoefs
impl UnwindSafe for BiquadCoefs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more