I've just started writing my own vst-plugins and I found two (one pole?) filter algoritms somewhere on the web. It's a highpass and a lowpass filter and they seem to work fine.
My question is; why? I want to know how this really works! Can anyone explain some basic filtering theory or do you know any good websites in the subject? There are a lot of dsp-websites out there but I can't find one that can explain this in a good way for dummies, with concrete examples.
Highpass:
Code: Select all
w = 2 * SamplingRate;
Cutoff *= 2 * PI;
Norm = 1 / (Cutoff + w);
a0 = (w * Norm);
a1 = -a0;
b1 = (w - Cutoff) * Norm;
Code: Select all
w = 2 * SamplingRate;
Cutoff *= 2 * PI;
Norm = 1 / (Cutoff + w);
b1 = (w - Cutoff) * Norm;
a0 = a1 = Cutoff * Norm;
Code: Select all
out[n] = in[n]*a0 + in[n-1]*a1 + out[n-1]*b1
/Henke