Algorithms & Educational Resources

Yes, the following source code implements a linear 2-pole SVF with trapezoidal integration:

header /// code

There are probably simpler code snippets for educational purpose because the implementation is spread across multiple classes (Svf2p, SvfMixer*) for flexibility and performance reasons and comments are on the rare side, but it should be clear enough. The following source code by Urs Heckmann goes one step further and implements a classic 4-pole filter with nonlinearities:

header

However the code implementation is only the last step of the filter design. It’s almost impossible to understand how it really works without the differential equations from which the filter was derived. The previously quoted Andrew Simper’s documents and the Vadim’s book The art of VA Filter Design are a must-read on this topic. If you can read French I wrote an introductory paper on the topic.

1 Like