pub fn process_1pole_tpt_highpass(
    input: f32,
    freq: f32,
    israte: f32,
    z: &mut f32
) -> f32
Expand description

Process a very simple one pole 6dB high pass filter in TPT form. Useful in various applications.

  • input - Input sample
  • freq - Frequency between 1.0 and 22000.0Hz
  • israte - 1.0 / samplerate
  • z - The internal one sample buffer of the filter.
    use synfx_dsp::*;

    let samples  = vec![0.0; 44100];
    let mut z    = 0.0;
    let mut freq = 1000.0;

    for s in samples.iter() {
        let s_out =
            process_1pole_tpt_lowpass(*s, freq, 1.0 / 44100.0, &mut z);
        // ... do something with the result here.
    }