Function synfx_dsp::process_1pole_lowpass
source · [−]Expand description
Process a very simple one pole 6dB low pass filter. Useful in various applications, from usage in a synthesizer to damping stuff in a reverb/delay.
input
- Input samplefreq
- Frequency between 1.0 and 22000.0Hzisrate
- 1.0 / sampleratez
- 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_lowpass(*s, freq, 1.0 / 44100.0, &mut z);
// ... do something with the result here.
}