Multi-mode filter based on the Moog ladder filter. More...
#include <juce_LadderFilter.h>
Public Types | |
using | Mode = LadderFilterMode |
Public Member Functions | |
LadderFilter () | |
Creates an uninitialised filter. | |
void | setEnabled (bool isEnabled) noexcept |
Enables or disables the filter. | |
void | setMode (Mode newMode) noexcept |
Sets filter mode. | |
void | prepare (const ProcessSpec &spec) |
Initialises the filter. | |
size_t | getNumChannels () const noexcept |
Returns the current number of channels. | |
void | reset () noexcept |
Resets the internal state variables of the filter. | |
void | setCutoffFrequencyHz (SampleType newCutoff) noexcept |
Sets the cutoff frequency of the filter. | |
void | setResonance (SampleType newResonance) noexcept |
Sets the resonance of the filter. | |
void | setDrive (SampleType newDrive) noexcept |
Sets the amount of saturation in the filter. | |
template<typename ProcessContext > | |
void | process (const ProcessContext &context) noexcept |
Protected Member Functions | |
SampleType | processSample (SampleType inputValue, size_t channelToUse) noexcept |
void | updateSmoothers () noexcept |
Multi-mode filter based on the Moog ladder filter.
using dsp::LadderFilter< SampleType >::Mode = LadderFilterMode |
dsp::LadderFilter< SampleType >::LadderFilter | ( | ) |
Creates an uninitialised filter.
Call prepare() before first use.
|
noexcept |
Enables or disables the filter.
If disabled it will simply pass through the input signal.
|
noexcept |
Sets filter mode.
void dsp::LadderFilter< SampleType >::prepare | ( | const ProcessSpec & | spec | ) |
Initialises the filter.
|
noexcept |
Returns the current number of channels.
Referenced by dsp::LadderFilter< SampleType >::process().
|
noexcept |
Resets the internal state variables of the filter.
|
noexcept |
Sets the cutoff frequency of the filter.
newCutoff | cutoff frequency in Hz |
|
noexcept |
Sets the resonance of the filter.
newResonance | a value between 0 and 1; higher values increase the resonance and can result in self oscillation! |
|
noexcept |
Sets the amount of saturation in the filter.
newDrive | saturation amount; it can be any number greater than or equal to one. Higher values result in more distortion. |
|
noexcept |
|
protectednoexcept |
Referenced by dsp::LadderFilter< SampleType >::process().
|
protectednoexcept |
Referenced by dsp::LadderFilter< SampleType >::process().