uModular State Variable Filter
  • After re-reading The Art of VA Filter Design by Vadim Zavalishin I decided to have another shot at building an SVF filter. I found an excellent paper by Will Pirkle, Virtual Analog (VA) Filter Implementation and Comparisons v2.0. Using both sources I put together this implementation. It uses a tanh function as a saturation limiter to keep the filter stable (and introduce some distortion at high signal levels). It has a low-pass, band-pass and high-pass output and knobs for cutoff frequency and resonance. The frequency knob is exponential.
    Screen Shot 2017-12-15 at 5.44.01 PM.png
    3174 x 2308 - 650K
  • I can hardly wait to go home and try this out!
  • I was fooling around with the filter this morning and realized I'd put the tanh() saturator in slightly the wrong location. I fixed it and decided that the filter wasn't as interesting with it in place. The tanh() limits the feedback, keeping the filter stable, but without it, at high resonance values the filter is peaky almost to the point of self oscillation, but not quite. I limited the resonance so that it wouldn't go quite to zero at the max, so the filter is fairly stable even without the saturator. I finally decided to crossfade between the tanh() and unmodified signal so I added a third knob labeled sat. At max saturation the signal is fed only through the tanh() and at minimum there is no saturator. The resonance value is derived with a 1/exp2(k*8) expression. If you increase the multiplier (8) you will get closer to 0 and increasingly unstable without the tanh() function.
    Screen Shot 2017-12-16 at 11.43.18 AM.png
    3362 x 2506 - 717K
  • Interesting, that's a very similar approach to the binary filter I just got from pittsburgh modular. It has a resonance regulating circuit that you can turn on and off to create juicy or chaotic sounds.
  • So I have played with the new filter a bit and I think think it loses a lot of character with the resonance limiting, I had mentioned earlier that the binary filter has a switch to turn the resonance regulation on and off, so I made a little switch in my copy, attached here for your consideration.
    uSVF 1.x.audulus
    34K
  • Basically the same idea as my v1.1 with the sat knob. With the knob at minimum there is no resonance limiting
  • @RobertSyrett After looking at your patch I realized I accidentally uploaded an intermediate version of the filter with no saturation control. Here's the correct version. Should be much better now. You basically took the same approach I did using a switch rather than a knob. The version you modified had a saturator in both feedback loops which was definitely overkill. You were switching out the second saturator but not the first. The version I meant to upload has a saturator in the first loop only and it's adjustable with the knob. I actually kinda prefer it without the saturator, but for some applications it might be better to limit the "peakiness". I noticed you used an atan() function instead of the tanh(). Similar shapes but tanh has limits at -1 and 1 whereas atan() is -pi/2 and pi/2. Just curious why you switched?
    uSVF1.1 demo.audulus
    139K
    atanvstanh_zps908267a6.jpg
    800 x 487 - 73K
  • Haha! I knew something was amiss! I substituted atan(x) as I was just experimenting with the saturator and recalled @biminiroad saying he thought atan(x) sounded a little more musical. I honestly forgot to switch it back before uploading though, so I too am guilty of reckless uploading ;-) That is a handy graphic though.
  • I thought the graph was pretty neat. The tan() function isn't quite as abrupt as the tanh() and 2*pi*atan(x/(2*pi)) also gives you a -1 to 1 limit.