[LAD] A short technote on digital state-variable filters

Florian Paul Schmidt mista.tapas at gmx.net
Wed Jan 13 12:16:18 CET 2021


Hi Fons,

I have a question (sanity checking my understanding) regarding the
implementation: You note in your introduction that the SV-Filter
provides lowpass, highpass and bandpass outputs. If I wanted to provide
all three to the user then this could be done with the following C-Code,
right (adapted from your individual examples)?

d0_high = 1 - c1 / 2 + c1 * c2 / 4;

d1_band = 1 - c2;
d0_band = d1 * c1 / 2;

d0_low = c1 * c2 / 4;
d1_low = c2;

for (i = 0; i < n; ++i)
{
	x = inp[i] - z1 - z2;
	out_high = d0_high * x;
	out_band = d0_band * x + d1_band * z1;
	z2 = c2 * z1;
	out_low = d0_low * x + z2;
	z1 = c1 * x;
}

Regards,
FPS

Oh, looking at it again, and if I'm not completely confused, this should
also be equivalent:

for (i = 0; i < n; ++i)
{
	x = inp[i] - z1 - z2;
	z2 = c2 * z1;
	out_high = d0_high * x;
	out_band = d0_band * x + d1_band * z1;
	out_low = d0_low * x + z2;
	z1 = c1 * x;
}


On 11/19/2020 10:05 PM, Fons Adriaensen wrote:
> Hello all,
>
> Some people have asked me to provide a bit more documentation
> on the state-variable filters I used in zita-eq1 and zita-jacktools.
>
> So I've written a short technical note on this. You can find it at
>
> <http://kokkinizita.linuxaudio.org/papers/digsvfilt.pdf>
>
> Ciao,
>

--
https://fps.io


More information about the Linux-audio-dev mailing list