State Variable Filter
A resonant filter suitable for modulation
A filter implemented with a state variable filter algorithm suitable for modulation.
What
This is an alternative filter from BiquadFilterNode implemented in Web Audio API.
From Digital State Variable Filters:
... the biquad is not without problems. One of them is potential instability in case the coefficients are interpolated, for example to avoid ’zipper noise’ in audio equalisers. Another problem is numerical precision.
The digital state-variable filter does not have these problems. So one may wonder why it is not used more often.
It uses an optimized version described by Solving continuous SVF equations using trapezoidal integration by Andrew Simper (Cytomic) and implemented by Fred Anton Corvest. Thanks both!
Parameters
filterType
: the type of the filter. By default isSvfType.LowPass
.frequency
: the frequency of the filter in Hz. Default is 440Hz. Range: [20-2000]Q
: the resonance of the filter. Default is 0.5. Range: [0.025-40]
Available filter types are:
SvfType.ByPass
= 0,SvfType.LowPass
= 1,SvfType.BandPass
= 2,SvfType.HighPass
= 3,SvfType.Notch
= 4,SvfType.Peak
= 5,SvfType.AllPass
= 6,
References
- Digital State Variable Filters by Fons Adriaensen
- State Variable Filters by Julius O. Smith III
- Solving continuous SVF equations using trapezoidal integration by Andrew Simper (Cytomic)