Loading...
Searching...
No Matches
juce::dsp::LinkwitzRileyFilter< SampleType > Class Template Reference

`#include <juce_LinkwitzRileyFilter.h>`

## Public Types

using | Type = LinkwitzRileyFilterType

## Public Member Functions

| LinkwitzRileyFilter ()
void | setType (Type newType)
void | setCutoffFrequency (SampleType newCutoffFrequencyHz)
Type | getType () const noexcept
SampleType | getCutoffFrequency () const noexcept
void | prepare (const ProcessSpec &spec)
void | reset ()
template<typename ProcessContext>
void | process (const ProcessContext &context) noexcept
SampleType | processSample (int channel, SampleType inputValue)
void | processSample (int channel, SampleType inputValue, SampleType &outputLow, SampleType &outputHigh)
void | snapToZero () noexcept

## Detailed Description

template<typename SampleType>
class juce::dsp::LinkwitzRileyFilter< SampleType >

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).

Definition at line 48 of file juce_LinkwitzRileyFilter.h.

## Member Typedef Documentation

## Type

template<typename SampleType>

using juce::dsp::LinkwitzRileyFilter< SampleType >::Type = LinkwitzRileyFilterType

Definition at line 52 of file juce_LinkwitzRileyFilter.h.

## Constructor & Destructor Documentation

## LinkwitzRileyFilter()

template<typename SampleType>

juce::dsp::LinkwitzRileyFilter< SampleType >::LinkwitzRileyFilter | ( |  | ) |

Constructor.

Definition at line 31 of file juce_LinkwitzRileyFilter.cpp.

## Member Function Documentation

## getCutoffFrequency()

template<typename SampleType>

SampleType juce::dsp::LinkwitzRileyFilter< SampleType >::getCutoffFrequency | ( |  | ) | const

inline noexcept

Returns the cutoff frequency of the filter.

Definition at line 70 of file juce_LinkwitzRileyFilter.h.

## getType()

template<typename SampleType>

Type juce::dsp::LinkwitzRileyFilter< SampleType >::getType | ( |  | ) | const

inline noexcept

Returns the type of the filter.

Definition at line 67 of file juce_LinkwitzRileyFilter.h.

## prepare()

template<typename SampleType>

void juce::dsp::LinkwitzRileyFilter< SampleType >::prepare | ( | const ProcessSpec & | spec | ) |

Initialises the filter.

Definition at line 54 of file juce_LinkwitzRileyFilter.cpp.

## process()

template<typename SampleType>
template<typename ProcessContext>

void juce::dsp::LinkwitzRileyFilter< SampleType >::process | ( | const ProcessContext & | context | ) |

inline noexcept

Processes the input and output samples supplied in the processing context.

Definition at line 82 of file juce_LinkwitzRileyFilter.h.

## processSample() [1/2]

template<typename SampleType>

SampleType juce::dsp::LinkwitzRileyFilter< SampleType >::processSample | ( | int | channel,
|  | SampleType | inputValue )

Performs the filter operation on a single sample at a time.

Definition at line 87 of file juce_LinkwitzRileyFilter.cpp.

Referenced by process().

## processSample() [2/2]

template<typename SampleType>

void juce::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.

Definition at line 112 of file juce_LinkwitzRileyFilter.cpp.

## reset()

template<typename SampleType>

void juce::dsp::LinkwitzRileyFilter< SampleType >::reset | ( |  | ) |

Resets the internal state variables of the filter.

Definition at line 71 of file juce_LinkwitzRileyFilter.cpp.

Referenced by prepare().

## setCutoffFrequency()

template<typename SampleType>

void juce::dsp::LinkwitzRileyFilter< SampleType >::setCutoffFrequency | ( | SampleType | newCutoffFrequencyHz | ) |

Sets the cutoff frequency of the filter in Hz.

Definition at line 44 of file juce_LinkwitzRileyFilter.cpp.

## setType()

template<typename SampleType>

void juce::dsp::LinkwitzRileyFilter< SampleType >::setType | ( | Type | newType | ) |

Sets the filter type.

Definition at line 38 of file juce_LinkwitzRileyFilter.cpp.

## snapToZero()

template<typename SampleType>

void juce::dsp::LinkwitzRileyFilter< SampleType >::snapToZero | ( |  | ) |

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.

Definition at line 78 of file juce_LinkwitzRileyFilter.cpp.

Referenced by process().

The documentation for this class was generated from the following files:

- juce_LinkwitzRileyFilter.h
- juce_LinkwitzRileyFilter.cpp