OpenShot Library | OpenShotAudio
0.2.2
|
A set of coefficients for use in an Filter object. More...
#include <juce_IIRFilter.h>
Public Types | |
using | Ptr = ReferenceCountedObjectPtr< Coefficients > |
The Coefficients structure is ref-counted, so this is a handy type that can be used as a pointer to one. | |
![]() | |
using | Ptr = ReferenceCountedObjectPtr< ProcessorState > |
The ProcessorState structure is ref-counted, so this is a handy type that can be used as a pointer to one. | |
Public Member Functions | |
Coefficients () | |
Creates a null set of coefficients (which will produce silence). More... | |
Coefficients (NumericType b0, NumericType b1, NumericType a0, NumericType a1) | |
Directly constructs an object from the raw coefficients. More... | |
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 |
size_t | getFilterOrder () const noexcept |
Returns the filter order associated with the coefficients. | |
double | getMagnitudeForFrequency (double frequency, double sampleRate) const noexcept |
Returns the magnitude frequency response of the filter for a given frequency and sample rate. | |
void | getMagnitudeForFrequencyArray (const double *frequencies, double *magnitudes, size_t numSamples, double sampleRate) const noexcept |
Returns the magnitude frequency response of the filter for a given frequency array and sample rate. | |
double | getPhaseForFrequency (double frequency, double sampleRate) const noexcept |
Returns the phase frequency response of the filter for a given frequency and sample rate. | |
void | getPhaseForFrequencyArray (double *frequencies, double *phases, size_t numSamples, double sampleRate) const noexcept |
Returns the phase frequency response of the filter for a given frequency array and sample rate. | |
NumericType * | getRawCoefficients () noexcept |
Returns a raw data pointer to the coefficients. More... | |
const NumericType * | getRawCoefficients () const noexcept |
Returns a raw data pointer to the coefficients. More... | |
![]() | |
void | incReferenceCount () noexcept |
Increments the object's reference count. More... | |
void | decReferenceCount () noexcept |
Decreases the object's reference count. More... | |
bool | decReferenceCountWithoutDeleting () noexcept |
Decreases the object's reference count. More... | |
int | getReferenceCount () const noexcept |
Returns the object's current reference count. More... | |
Static Public Member Functions | |
static Ptr | makeFirstOrderLowPass (double sampleRate, NumericType frequency) |
Returns the coefficients for a first order low-pass filter. More... | |
static Ptr | makeFirstOrderHighPass (double sampleRate, NumericType frequency) |
Returns the coefficients for a first order high-pass filter. More... | |
static Ptr | makeFirstOrderAllPass (double sampleRate, NumericType frequency) |
Returns the coefficients for a first order all-pass filter. More... | |
static Ptr | makeLowPass (double sampleRate, NumericType frequency) |
Returns the coefficients for a low-pass filter. More... | |
static Ptr | makeLowPass (double sampleRate, NumericType frequency, NumericType Q) |
Returns the coefficients for a low-pass filter with variable Q. More... | |
static Ptr | makeHighPass (double sampleRate, NumericType frequency) |
Returns the coefficients for a high-pass filter. More... | |
static Ptr | makeHighPass (double sampleRate, NumericType frequency, NumericType Q) |
Returns the coefficients for a high-pass filter with variable Q. More... | |
static Ptr | makeBandPass (double sampleRate, NumericType frequency) |
Returns the coefficients for a band-pass filter. More... | |
static Ptr | makeBandPass (double sampleRate, NumericType frequency, NumericType Q) |
Returns the coefficients for a band-pass filter with variable Q. More... | |
static Ptr | makeNotch (double sampleRate, NumericType frequency) |
Returns the coefficients for a notch filter. More... | |
static Ptr | makeNotch (double sampleRate, NumericType frequency, NumericType Q) |
Returns the coefficients for a notch filter with variable Q. More... | |
static Ptr | makeAllPass (double sampleRate, NumericType frequency) |
Returns the coefficients for an all-pass filter. More... | |
static Ptr | makeAllPass (double sampleRate, NumericType frequency, NumericType Q) |
Returns the coefficients for an all-pass filter with variable Q. More... | |
static Ptr | makeLowShelf (double sampleRate, NumericType cutOffFrequency, NumericType Q, NumericType gainFactor) |
Returns the coefficients for a low-pass shelf filter with variable Q and gain. More... | |
static Ptr | makeHighShelf (double sampleRate, NumericType cutOffFrequency, NumericType Q, NumericType gainFactor) |
Returns the coefficients for a high-pass shelf filter with variable Q and gain. More... | |
static Ptr | makePeakFilter (double sampleRate, NumericType centreFrequency, NumericType Q, NumericType gainFactor) |
Returns the coefficients for a peak filter centred around a given frequency, with a variable Q and gain. More... | |
Public Attributes | |
Array< NumericType > | coefficients |
The raw coefficients. More... | |
Additional Inherited Members | |
![]() | |
ReferenceCountedObject ()=default | |
Creates the reference-counted object (with an initial ref count of zero). More... | |
ReferenceCountedObject (const ReferenceCountedObject &) noexcept | |
Copying from another object does not affect this one's reference-count. More... | |
ReferenceCountedObject (ReferenceCountedObject &&) noexcept | |
Copying from another object does not affect this one's reference-count. More... | |
ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept |
Copying from another object does not affect this one's reference-count. More... | |
ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept |
Copying from another object does not affect this one's reference-count. More... | |
virtual | ~ReferenceCountedObject () |
Destructor. More... | |
void | resetReferenceCount () noexcept |
Resets the reference count to zero without deleting the object. More... | |
A set of coefficients for use in an Filter object.
Definition at line 42 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 33 of file juce_dsp/processors/juce_IIRFilter.cpp.
Referenced by juce::dsp::IIR::Coefficients< NumericType >::Coefficients(), juce::dsp::IIR::Coefficients< NumericType >::makeAllPass(), juce::dsp::IIR::Coefficients< NumericType >::makeBandPass(), juce::dsp::IIR::Coefficients< NumericType >::makeFirstOrderAllPass(), juce::dsp::IIR::Coefficients< NumericType >::makeFirstOrderHighPass(), juce::dsp::IIR::Coefficients< NumericType >::makeFirstOrderLowPass(), juce::dsp::IIR::Coefficients< NumericType >::makeHighPass(), juce::dsp::IIR::Coefficients< NumericType >::makeHighShelf(), juce::dsp::IIR::Coefficients< NumericType >::makeLowPass(), juce::dsp::IIR::Coefficients< NumericType >::makeLowShelf(), juce::dsp::IIR::Coefficients< NumericType >::makeNotch(), and juce::dsp::IIR::Coefficients< NumericType >::makePeakFilter().
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 43 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::clear(), juce::dsp::IIR::Coefficients< NumericType >::Coefficients(), and juce::dsp::IIR::Coefficients< NumericType >::coefficients.
|
static |
Returns the coefficients for a first order low-pass filter.
Definition at line 94 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for a first order high-pass filter.
Definition at line 106 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for a first order all-pass filter.
Definition at line 118 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for a low-pass filter.
Definition at line 130 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a low-pass filter with variable Q.
Definition at line 137 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for a high-pass filter.
Definition at line 156 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a high-pass filter with variable Q.
Definition at line 163 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for a band-pass filter.
Definition at line 182 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a band-pass filter with variable Q.
Definition at line 189 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for a notch filter.
Definition at line 209 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for a notch filter with variable Q.
Definition at line 216 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
static |
Returns the coefficients for an all-pass filter.
Definition at line 235 of file juce_dsp/processors/juce_IIRFilter.cpp.
|
static |
Returns the coefficients for an all-pass filter with variable Q.
Definition at line 242 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
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 261 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
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 287 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
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 313 of file juce_dsp/processors/juce_IIRFilter.cpp.
References juce::dsp::IIR::Coefficients< NumericType >::Coefficients().
|
inlinenoexcept |
Returns a raw data pointer to the coefficients.
Definition at line 290 of file juce_dsp/processors/juce_IIRFilter.h.
References juce::dsp::IIR::Filter< SampleType >::coefficients.
|
inlinenoexcept |
Returns a raw data pointer to the coefficients.
Definition at line 293 of file juce_dsp/processors/juce_IIRFilter.h.
References juce::dsp::IIR::Filter< SampleType >::coefficients.
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 299 of file juce_dsp/processors/juce_IIRFilter.h.
Referenced by juce::dsp::IIR::Coefficients< NumericType >::Coefficients(), juce::dsp::IIR::Coefficients< NumericType >::getFilterOrder(), juce::dsp::IIR::Coefficients< NumericType >::getMagnitudeForFrequency(), juce::dsp::IIR::Coefficients< NumericType >::getMagnitudeForFrequencyArray(), juce::dsp::IIR::Coefficients< NumericType >::getPhaseForFrequency(), and juce::dsp::IIR::Coefficients< NumericType >::getPhaseForFrequencyArray().