pub struct FilterChain { /* private fields */ }Expand description
3-stage filter chain. The stages are model-dependent (see FilterModel);
the default FilterModel::NesRf is HPF 90 Hz → HPF 440 Hz → LPF 14 kHz.
Implementations§
Source§impl FilterChain
impl FilterChain
Sourcepub fn new(sample_rate: u32) -> Self
pub fn new(sample_rate: u32) -> Self
Build the default (NES front-loader) filter chain at sample_rate Hz.
Sourcepub fn for_model(sample_rate: u32, model: FilterModel) -> Self
pub fn for_model(sample_rate: u32, model: FilterModel) -> Self
Build the filter chain for a specific FilterModel at sample_rate Hz.
The struct always keeps three one-pole stages; the softer models neutralize the second high-pass by setting its corner near-DC (~1 Hz, coefficient ≈ 1.0 → effectively transparent), so no struct/save-state layout changes.
Trait Implementations§
Source§impl Clone for FilterChain
impl Clone for FilterChain
Source§fn clone(&self) -> FilterChain
fn clone(&self) -> FilterChain
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 Debug for FilterChain
impl Debug for FilterChain
impl Copy for FilterChain
Auto Trait Implementations§
impl Freeze for FilterChain
impl RefUnwindSafe for FilterChain
impl Send for FilterChain
impl Sync for FilterChain
impl Unpin for FilterChain
impl UnsafeUnpin for FilterChain
impl UnwindSafe for FilterChain
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