A TPT State Variable Filter, based on the structure from Vadim Zavalishin's The Art of VA Filter Design
More...
#include <marvin_SVF.h>
template<FloatType SampleType>
class marvin::dsp::filters::SVF< SampleType >
A TPT State Variable Filter, based on the structure from Vadim Zavalishin's The Art of VA Filter Design
◆ FilterType
template<FloatType SampleType>
Represents the available filter types the SVF can process.
| Enumerator |
|---|
| Highpass | |
| Bandpass | |
| Lowpass | |
| NormalisedBandpass | |
| BandShelf | |
| LowShelf | |
| HighShelf | |
| Notch | |
| Allpass | |
◆ initialise()
template<FloatType SampleType>
Initialises the filter. This must be called before calling setFrequency() or operator().
- Parameters
-
| sampleRate | The sample rate the filter should process at. |
◆ operator()() [1/2]
template<FloatType SampleType>
Processes a sample through the filter, with a single given filter type.
- Parameters
-
| type | The FilterType to use. |
| x | The sample to process. |
- Returns
- The filtered sample.
◆ operator()() [2/2]
template<FloatType SampleType>
Processes a sample through the filter, and returns the input filtered through each filter type (with an SVF this is relatively cheap, and allows for custom switching algorithms on the user side).
- Parameters
-
- Returns
- An SVFResult<SampleType> containing the filtered results for each filter type.
◆ reset()
template<FloatType SampleType>
Resets the filter to its initial state.
◆ setFrequency()
template<FloatType SampleType>
Sets the cutoff frequency of the filter.
- Parameters
-
| newFrequency | The new filter cutoff in Hz. |
◆ setGainDb()
template<FloatType SampleType>
Sets the gain in dB for the bandshelf, lowshelf and highshelf taps. Ignored in the other filter paths.
- Parameters
-
| newGainDb | The new gain in dB. |
◆ setResonance()
template<FloatType SampleType>
Sets the resonance of the filter directly - a value of 1 achieves self oscillation, a value of 0 is no resonance.
- Parameters
-
| newResonance | The new filter resonance, between 0 and 1. |
The documentation for this class was generated from the following file:
- /home/runner/work/marvin/marvin/include/marvin/dsp/filters/marvin_SVF.h