# [music-dsp] Andrew Simper's State Variable Filter

Russell Borogove kaleja at estarcion.com
Sat Jun 22 18:56:20 EDT 2002

```I have naive filter questions.

I've been using a Chamberlin state-variable filter in my VST
plugins for several months, and have occasionally been bitten
by the instability at (not all that high) frequencies that the filter
exhibits.

In the MusicDSP code archive, I see Andrew Simper's double-
sampled stable version of the filter, but looking at the calculation
of the freq term:

freq   = MIN(0.25, 2.0*sin(PI*fc/(fs*2)));  // the fs*2 is because it's
double sampled

...it seems to me that because of the MIN, it won't be adjustable

freq = 0.25 = 2.0*sin( PI * fc / (fs*2) )
0.125 = sin( PI * fc / (fs*2) )
arcsin( 0.125 ) = PI * fc / (fs * 2)
0.1253278 = PI * fc/(fs*2)
0.03989 = fc / (fs * 2)
fc = fs * 0.07978

...or ~3.5KHz for a Fs of 44100Hz. I suppose that's one way to make
sure the code doesn't do anything weird at high Fc! Fc doesn't seem
to be used anywhere else in the calculation. Am I interpreting this
correctly? What's the deal here?

I tried a naive approach to extending the stable range of the
Chamberlin SVF: Upsampling the input 4:1 with linear interpolation,
running it through 4 iterations of the SVF with Fs 4 times normal,
and averaging the output over those iterations, and it added more
noise than even my tin ear found acceptable. Is it worth trying this
technique with a higher-order interpolation, or is it fundamentally