Struct synfx_dsp::fh_va::FilterParams
source · [−]pub struct FilterParams {
pub cutoff: f32,
pub res: f32,
pub drive: f32,
pub mode: SvfMode,
pub ladder_mode: LadderMode,
pub g: f32,
pub sample_rate: f32,
pub zeta: f32,
pub k_ladder: f32,
}
Expand description
Filter parameters for the filters crate::fh_va::Svf, crate::fh_va::SallenKey and crate::fh_va::LadderFilter.
Fields
cutoff: f32
Cutoff frequency 5.0 Hz to 20 kHz.
res: f32
Resonance, values between 0.0-1.0, default: 0.5
drive: f32
Filter drive, values between 1.0 and 15.8490 (gain to dB)
mode: SvfMode
The SVF filter mode.
ladder_mode: LadderMode
The Ladder filter mode.
g: f32
Calculated by the FilterParams::set_frequency function.
sample_rate: f32
Use the FilterParams::set_sample_rate function to update this.
zeta: f32
Resistance based internal parameter, set by FilterParams::set_resonance.
k_ladder: f32
Resistance based internal parameter, set by FilterParams::set_resonance.
Implementations
sourceimpl FilterParams
impl FilterParams
pub fn new() -> Self
pub fn set_resonance(&mut self, res: f32)
pub fn set_frequency(&mut self, freq: f32)
pub fn set_sample_rate(&mut self, sr: f32)
Trait Implementations
sourceimpl Clone for FilterParams
impl Clone for FilterParams
sourcefn clone(&self) -> FilterParams
fn clone(&self) -> FilterParams
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 moreAuto Trait Implementations
impl RefUnwindSafe for FilterParams
impl Send for FilterParams
impl Sync for FilterParams
impl Unpin for FilterParams
impl UnwindSafe for FilterParams
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