Struct synthrs::filter::AllPass[][src]

pub struct AllPass {
    pub feedback: f64,
    // some fields omitted
}

A stateful all-pass filter.

https://en.wikipedia.org/wiki/All-pass_filter

use synthrs::filter::AllPass;

let mut allpass = AllPass::new(1.0, 44_100, 0.5);
let samples: Vec<f64> = vec![1.0, 2.0, 3.0, 4.0];

let filtered = samples.into_iter().map(|sample| allpass.tick(sample));

Taken from: https://github.com/irh/freeverb-rs/blob/master/freeverb/src/all_pass.rs

Fields

feedback: f64

Feedback multiplier (0.5 works)

Implementations

impl AllPass[src]

pub fn new(delay_length: f64, sample_rate: usize, feedback: f64) -> AllPass[src]

Creates a new all-pass filter. Samples are delayed for delay_length seconds.

pub fn tick(&mut self, input: f64) -> f64[src]

Trait Implementations

impl Clone for AllPass[src]

impl Debug for AllPass[src]

Auto Trait Implementations

impl RefUnwindSafe for AllPass

impl Send for AllPass

impl Sync for AllPass

impl Unpin for AllPass

impl UnwindSafe for AllPass

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,