#include <juce_IIRFilter.h>
Public Types | |
using | Ptr = ReferenceCountedObjectPtr<Coefficients> |
![]() | |
using | Ptr = ReferenceCountedObjectPtr<ProcessorState> |
Public Member Functions | |
Coefficients () | |
Coefficients (NumericType b0, NumericType b1, NumericType a0, NumericType a1) | |
Coefficients (NumericType b0, NumericType b1, NumericType b2, NumericType a0, NumericType a1, NumericType a2) | |
Coefficients (NumericType b0, NumericType b1, NumericType b2, NumericType b3, NumericType a0, NumericType a1, NumericType a2, NumericType a3) | |
Coefficients (const Coefficients &)=default | |
Coefficients (Coefficients &&)=default | |
Coefficients & | operator= (const Coefficients &)=default |
Coefficients & | operator= (Coefficients &&)=default |
template<size_t Num> | |
Coefficients (const std::array< NumericType, Num > &values) | |
template<size_t Num> | |
Coefficients & | operator= (const std::array< NumericType, Num > &values) |
size_t | getFilterOrder () const noexcept |
double | getMagnitudeForFrequency (double frequency, double sampleRate) const noexcept |
void | getMagnitudeForFrequencyArray (const double *frequencies, double *magnitudes, size_t numSamples, double sampleRate) const noexcept |
double | getPhaseForFrequency (double frequency, double sampleRate) const noexcept |
void | getPhaseForFrequencyArray (double *frequencies, double *phases, size_t numSamples, double sampleRate) const noexcept |
NumericType * | getRawCoefficients () noexcept |
const NumericType * | getRawCoefficients () const noexcept |
template<size_t Num> | |
Coefficients< NumericType > & | assignImpl (const NumericType *values) |
![]() | |
void | incReferenceCount () noexcept |
void | decReferenceCount () noexcept |
bool | decReferenceCountWithoutDeleting () noexcept |
int | getReferenceCount () const noexcept |
Static Public Member Functions | |
static Ptr | makeFirstOrderLowPass (double sampleRate, NumericType frequency) |
static Ptr | makeFirstOrderHighPass (double sampleRate, NumericType frequency) |
static Ptr | makeFirstOrderAllPass (double sampleRate, NumericType frequency) |
static Ptr | makeLowPass (double sampleRate, NumericType frequency) |
static Ptr | makeLowPass (double sampleRate, NumericType frequency, NumericType Q) |
static Ptr | makeHighPass (double sampleRate, NumericType frequency) |
static Ptr | makeHighPass (double sampleRate, NumericType frequency, NumericType Q) |
static Ptr | makeBandPass (double sampleRate, NumericType frequency) |
static Ptr | makeBandPass (double sampleRate, NumericType frequency, NumericType Q) |
static Ptr | makeNotch (double sampleRate, NumericType frequency) |
static Ptr | makeNotch (double sampleRate, NumericType frequency, NumericType Q) |
static Ptr | makeAllPass (double sampleRate, NumericType frequency) |
static Ptr | makeAllPass (double sampleRate, NumericType frequency, NumericType Q) |
static Ptr | makeLowShelf (double sampleRate, NumericType cutOffFrequency, NumericType Q, NumericType gainFactor) |
static Ptr | makeHighShelf (double sampleRate, NumericType cutOffFrequency, NumericType Q, NumericType gainFactor) |
static Ptr | makePeakFilter (double sampleRate, NumericType centreFrequency, NumericType Q, NumericType gainFactor) |
Public Attributes | |
Array< NumericType > | coefficients |
Additional Inherited Members | |
![]() | |
ReferenceCountedObject ()=default | |
ReferenceCountedObject (const ReferenceCountedObject &) noexcept | |
ReferenceCountedObject (ReferenceCountedObject &&) noexcept | |
ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept |
ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept |
virtual | ~ReferenceCountedObject () |
void | resetReferenceCount () noexcept |
A set of coefficients for use in an Filter object.
Definition at line 123 of file juce_dsp/processors/juce_IIRFilter.h.
using juce::dsp::IIR::Coefficients< NumericType >::Ptr = ReferenceCountedObjectPtr<Coefficients> |
The Coefficients structure is ref-counted, so this is a handy type that can be used as a pointer to one.
Definition at line 157 of file juce_dsp/processors/juce_IIRFilter.h.
juce::dsp::IIR::Coefficients< NumericType >::Coefficients | ( | ) |
Creates a null set of coefficients (which will produce silence).
Definition at line 276 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by makeAllPass(), makeAllPass(), makeBandPass(), makeBandPass(), makeFirstOrderAllPass(), makeFirstOrderHighPass(), makeFirstOrderLowPass(), makeHighPass(), makeHighPass(), makeHighShelf(), makeLowPass(), makeLowPass(), makeLowShelf(), makeNotch(), makeNotch(), makePeakFilter(), and operator=().
juce::dsp::IIR::Coefficients< NumericType >::Coefficients | ( | NumericType | b0, |
NumericType | b1, | ||
NumericType | a0, | ||
NumericType | a1 ) |
Directly constructs an object from the raw coefficients. Most people will want to use the static methods instead of this, but the constructor is public to allow tinkerers to create their own custom filters!
Definition at line 283 of file juce_dsp/processors/juce_IIRFilter.cpp.
juce::dsp::IIR::Coefficients< NumericType >::Coefficients | ( | NumericType | b0, |
NumericType | b1, | ||
NumericType | b2, | ||
NumericType | a0, | ||
NumericType | a1, | ||
NumericType | a2 ) |
Definition at line 291 of file juce_dsp/processors/juce_IIRFilter.cpp.
juce::dsp::IIR::Coefficients< NumericType >::Coefficients | ( | NumericType | b0, |
NumericType | b1, | ||
NumericType | b2, | ||
NumericType | b3, | ||
NumericType | a0, | ||
NumericType | a1, | ||
NumericType | a2, | ||
NumericType | a3 ) |
Definition at line 299 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
inlineexplicit |
Constructs from an array.
Definition at line 148 of file juce_dsp/processors/juce_IIRFilter.h.
Coefficients< NumericType > & juce::dsp::IIR::Coefficients< NumericType >::assignImpl | ( | const NumericType * | values | ) |
Definition at line 33 of file juce_IIRFilter_Impl.h.
|
noexcept |
Returns the filter order associated with the coefficients
Definition at line 430 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by getMagnitudeForFrequency(), getMagnitudeForFrequencyArray(), getPhaseForFrequency(), and getPhaseForFrequencyArray().
|
noexcept |
Returns the magnitude frequency response of the filter for a given frequency and sample rate
Definition at line 436 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
noexcept |
Returns the magnitude frequency response of the filter for a given frequency array and sample rate.
Definition at line 466 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
noexcept |
Returns the phase frequency response of the filter for a given frequency and sample rate
Definition at line 502 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
noexcept |
Returns the phase frequency response of the filter for a given frequency array and sample rate.
Definition at line 532 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
inlinenoexcept |
Returns a raw data pointer to the coefficients.
Definition at line 263 of file juce_dsp/processors/juce_IIRFilter.h.
|
inlinenoexcept |
Returns a raw data pointer to the coefficients.
Definition at line 260 of file juce_dsp/processors/juce_IIRFilter.h.
Referenced by getRawCoefficients().
|
static |
Returns the coefficients for an all-pass filter.
Definition at line 388 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for an all-pass filter with variable Q.
Definition at line 395 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a band-pass filter.
Definition at line 358 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a band-pass filter with variable Q.
Definition at line 365 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a first order all-pass filter.
Definition at line 321 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a first order high-pass filter.
Definition at line 314 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designIIRHighpassHighOrderButterworthMethod().
|
static |
Returns the coefficients for a first order low-pass filter.
Definition at line 307 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designIIRLowpassHighOrderButterworthMethod().
|
static |
Returns the coefficients for a high-pass filter.
Definition at line 343 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designIIRHighpassHighOrderButterworthMethod().
|
static |
Returns the coefficients for a high-pass filter with variable Q.
Definition at line 350 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a high-pass shelf filter with variable Q and gain.
The gain is a scale factor that the high frequencies are multiplied by, so values greater than 1.0 will boost the high frequencies, values less than 1.0 will attenuate them.
Definition at line 412 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a low-pass filter.
Definition at line 328 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by juce::dsp::FilterDesign< FloatType >::designIIRLowpassHighOrderButterworthMethod().
|
static |
Returns the coefficients for a low-pass filter with variable Q.
Definition at line 335 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a low-pass shelf filter with variable Q and gain.
The gain is a scale factor that the low frequencies are multiplied by, so values greater than 1.0 will boost the low frequencies, values less than 1.0 will attenuate them.
Definition at line 403 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a notch filter.
Definition at line 373 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a notch filter with variable Q.
Definition at line 380 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a peak filter centred around a given frequency, with a variable Q and gain.
The gain is a scale factor that the centre frequencies are multiplied by, so values greater than 1.0 will boost the centre frequencies, values less than 1.0 will attenuate them.
Definition at line 421 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
inline |
Assigns contents from an array.
Definition at line 152 of file juce_dsp/processors/juce_IIRFilter.h.
Array<NumericType> juce::dsp::IIR::Coefficients< NumericType >::coefficients |
The raw coefficients. You should leave these numbers alone unless you really know what you're doing.
Definition at line 269 of file juce_dsp/processors/juce_IIRFilter.h.
Referenced by getFilterOrder(), getMagnitudeForFrequency(), getMagnitudeForFrequencyArray(), getPhaseForFrequency(), getPhaseForFrequencyArray(), getRawCoefficients(), and getRawCoefficients().