pub struct SvfFilter { /* private fields */ }
Expand description
A versatile EQ filter implementation
Implemented based on a technical paper by Andrew Simper, Cytomic, 2013 also available at https://cytomic.com/technical-papers/
Implementations§
source§impl SvfFilter
impl SvfFilter
pub fn new( ty: SvfFilterType, cutoff_freq: Sample, q: Sample, gain_db: Sample ) -> Self
sourcepub fn set_coeffs(
&mut self,
cutoff: Sample,
q: Sample,
gain_db: Sample,
sample_rate: Sample
)
pub fn set_coeffs( &mut self, cutoff: Sample, q: Sample, gain_db: Sample, sample_rate: Sample )
Set the coefficients for the currently set filter type. gain_db
is only used for Bell, HighShelf and LowShelf.
pub fn init(&mut self, sample_rate: SampleRate)
pub fn process_sample(&mut self, v0: Sample) -> Sample
pub fn process(&mut self, input: &[Sample], output: &mut [Sample]) -> GenState
Trait Implementations§
source§impl Gen for SvfFilter
impl Gen for SvfFilter
source§fn process(
&mut self,
ctx: GenContext<'_, '_>,
resources: &mut Resources
) -> GenState
fn process( &mut self, ctx: GenContext<'_, '_>, resources: &mut Resources ) -> GenState
The input and output buffers are both indexed using [in/out_index][sample_index]. Read more
source§fn num_inputs(&self) -> usize
fn num_inputs(&self) -> usize
The number of inputs this
Gen
takes. Determines how big the input buffer is.source§fn num_outputs(&self) -> usize
fn num_outputs(&self) -> usize
The number of outputs this
Gen
produces. Determines how big the output buffer is.source§fn input_desc(&self, input: usize) -> &'static str
fn input_desc(&self, input: usize) -> &'static str
Return a label for a given input channel index. This sets the label in the
Connection
API.source§fn output_desc(&self, output: usize) -> &'static str
fn output_desc(&self, output: usize) -> &'static str
Return a label for a given output channel index. This sets the label in the
Connection
API.Auto Trait Implementations§
impl RefUnwindSafe for SvfFilter
impl Send for SvfFilter
impl Sync for SvfFilter
impl Unpin for SvfFilter
impl UnwindSafe for SvfFilter
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.