A filter class designed to perform multi-band separation using the TPT (Topology-Preserving Transform) structure. More...
#include <juce_LinkwitzRileyFilter.h>
Public Types | |
using | Type = LinkwitzRileyFilterType |
Public Member Functions | |
LinkwitzRileyFilter () | |
Constructor. | |
void | setType (Type newType) |
Sets the filter type. | |
void | setCutoffFrequency (SampleType newCutoffFrequencyHz) |
Sets the cutoff frequency of the filter in Hz. | |
Type | getType () const noexcept |
Returns the type of the filter. | |
SampleType | getCutoffFrequency () const noexcept |
Returns the cutoff frequency of the filter. | |
void | prepare (const ProcessSpec &spec) |
Initialises the filter. | |
void | reset () |
Resets the internal state variables of the filter. | |
template<typename ProcessContext > | |
void | process (const ProcessContext &context) noexcept |
Processes the input and output samples supplied in the processing context. | |
SampleType | processSample (int channel, SampleType inputValue) |
Performs the filter operation on a single sample at a time. | |
void | processSample (int channel, SampleType inputValue, SampleType &outputLow, SampleType &outputHigh) |
Performs the filter operation on a single sample at a time, and returns both the low-pass and the high-pass outputs of the TPT structure. | |
void | snapToZero () noexcept |
Ensure that the state variables are rounded to zero if the state variables are denormals. | |
A filter class designed to perform multi-band separation using the TPT (Topology-Preserving Transform) structure.
Linkwitz-Riley filters are widely used in audio crossovers that have two outputs, a low-pass and a high-pass, such that their sum is equivalent to an all-pass filter with a flat magnitude frequency response. The Linkwitz-Riley filters available in this class are designed to have a -24 dB/octave slope (LR 4th order).
using dsp::LinkwitzRileyFilter< SampleType >::Type = LinkwitzRileyFilterType |
dsp::LinkwitzRileyFilter< SampleType >::LinkwitzRileyFilter | ( | ) |
Constructor.
void dsp::LinkwitzRileyFilter< SampleType >::setType | ( | Type | newType | ) |
Sets the filter type.
void dsp::LinkwitzRileyFilter< SampleType >::setCutoffFrequency | ( | SampleType | newCutoffFrequencyHz | ) |
Sets the cutoff frequency of the filter in Hz.
|
noexcept |
Returns the type of the filter.
|
noexcept |
Returns the cutoff frequency of the filter.
void dsp::LinkwitzRileyFilter< SampleType >::prepare | ( | const ProcessSpec & | spec | ) |
Initialises the filter.
void dsp::LinkwitzRileyFilter< SampleType >::reset | ( | ) |
Resets the internal state variables of the filter.
|
noexcept |
Processes the input and output samples supplied in the processing context.
References jassert, dsp::LinkwitzRileyFilter< SampleType >::processSample(), and dsp::LinkwitzRileyFilter< SampleType >::snapToZero().
SampleType dsp::LinkwitzRileyFilter< SampleType >::processSample | ( | int | channel, |
SampleType | inputValue ) |
Performs the filter operation on a single sample at a time.
Referenced by dsp::LinkwitzRileyFilter< SampleType >::process().
void dsp::LinkwitzRileyFilter< SampleType >::processSample | ( | int | channel, |
SampleType | inputValue, | ||
SampleType & | outputLow, | ||
SampleType & | outputHigh ) |
Performs the filter operation on a single sample at a time, and returns both the low-pass and the high-pass outputs of the TPT structure.
|
noexcept |
Ensure that the state variables are rounded to zero if the state variables are denormals.
This is only needed if you are doing sample by sample processing.
Referenced by dsp::LinkwitzRileyFilter< SampleType >::process().