OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
juce::dsp::IIR::Coefficients< NumericType > Struct Template Reference

`#include <juce_IIRFilter.h>`

Inheritance diagram for juce::dsp::IIR::Coefficients< NumericType >:

## Public Types
using | Ptr = ReferenceCountedObjectPtr< Coefficients >
Public Types inherited from juce::dsp::ProcessorState
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
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
Public Member Functions inherited from juce::ReferenceCountedObject
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
Protected Member Functions inherited from juce::ReferenceCountedObject
| ReferenceCountedObject ()=default
| ReferenceCountedObject (const ReferenceCountedObject &) noexcept
| ReferenceCountedObject (ReferenceCountedObject &&) noexcept
ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept
ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept
virtual | ~ReferenceCountedObject ()
void | resetReferenceCount () noexcept

## Detailed Description

template<typename NumericType>
struct juce::dsp::IIR::Coefficients< NumericType >

A set of coefficients for use in an Filter object.

See also
  IIR::Filter

Definition at line 157 of file juce_dsp/processors/juce_IIRFilter.h.

## Member Typedef Documentation

## ◆ Ptr

template<typename NumericType >

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 183 of file juce_dsp/processors/juce_IIRFilter.h.

## Constructor & Destructor Documentation

## ◆ Coefficients() [1/4]

template<typename NumericType >

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.

## ◆ Coefficients() [2/4]

template<typename NumericType >

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.

## ◆ Coefficients() [3/4]

template<typename NumericType >

juce::dsp::IIR::Coefficients< NumericType >::Coefficients | ( | NumericType | b0,
|  | NumericType | b1,
|  | NumericType | b2,
|  | NumericType | a0,
|  | NumericType | a1,
|  | NumericType | a2
| ) |  |

Definition at line 58 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ Coefficients() [4/4]

template<typename NumericType >

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 75 of file juce_dsp/processors/juce_IIRFilter.cpp.

## Member Function Documentation

## ◆ getFilterOrder()

template<typename NumericType >

size_t juce::dsp::IIR::Coefficients< NumericType >::getFilterOrder
| noexcept

Returns the filter order associated with the coefficients

Definition at line 337 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ getMagnitudeForFrequency()

template<typename NumericType >

double juce::dsp::IIR::Coefficients< NumericType >::getMagnitudeForFrequency | ( | double | frequency,
|  | double | sampleRate
| ) |  | const
| noexcept

Returns the magnitude frequency response of the filter for a given frequency and sample rate

Definition at line 343 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ getMagnitudeForFrequencyArray()

template<typename NumericType >

void juce::dsp::IIR::Coefficients< NumericType >::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.

Definition at line 373 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ getPhaseForFrequency()

template<typename NumericType >

double juce::dsp::IIR::Coefficients< NumericType >::getPhaseForFrequency | ( | double | frequency,
|  | double | sampleRate
| ) |  | const
| noexcept

Returns the phase frequency response of the filter for a given frequency and sample rate

Definition at line 409 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ getPhaseForFrequencyArray()

template<typename NumericType >

void juce::dsp::IIR::Coefficients< NumericType >::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.

Definition at line 439 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ getRawCoefficients() [1/2]

template<typename NumericType >

const NumericType * juce::dsp::IIR::Coefficients< NumericType >::getRawCoefficients | ( |  | ) | const
| inline noexcept

Returns a raw data pointer to the coefficients.

Definition at line 289 of file juce_dsp/processors/juce_IIRFilter.h.

## ◆ getRawCoefficients() [2/2]

template<typename NumericType >

NumericType * juce::dsp::IIR::Coefficients< NumericType >::getRawCoefficients | ( |  | ) |
| inline noexcept

Returns a raw data pointer to the coefficients.

Definition at line 286 of file juce_dsp/processors/juce_IIRFilter.h.

## ◆ makeAllPass() [1/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeAllPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for an all-pass filter.

Definition at line 235 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeAllPass() [2/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeAllPass | ( | double | sampleRate,
|  | NumericType | frequency,
|  | NumericType | Q
| ) |  |
| static

Returns the coefficients for an all-pass filter with variable Q.

Definition at line 242 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeBandPass() [1/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeBandPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a band-pass filter.

Definition at line 182 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeBandPass() [2/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeBandPass | ( | double | sampleRate,
|  | NumericType | frequency,
|  | NumericType | Q
| ) |  |
| static

Returns the coefficients for a band-pass filter with variable Q.

Definition at line 189 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeFirstOrderAllPass()

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeFirstOrderAllPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a first order all-pass filter.

Definition at line 118 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeFirstOrderHighPass()

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeFirstOrderHighPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a first order high-pass filter.

Definition at line 106 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeFirstOrderLowPass()

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeFirstOrderLowPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a first order low-pass filter.

Definition at line 94 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeHighPass() [1/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeHighPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a high-pass filter.

Definition at line 156 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeHighPass() [2/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeHighPass | ( | double | sampleRate,
|  | NumericType | frequency,
|  | NumericType | Q
| ) |  |
| static

Returns the coefficients for a high-pass filter with variable Q.

Definition at line 163 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeHighShelf()

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeHighShelf | ( | double | sampleRate,
|  | NumericType | cutOffFrequency,
|  | NumericType | Q,
|  | NumericType | gainFactor
| ) |  |
| 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.

## ◆ makeLowPass() [1/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeLowPass | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a low-pass filter.

Definition at line 130 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeLowPass() [2/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeLowPass | ( | double | sampleRate,
|  | NumericType | frequency,
|  | NumericType | Q
| ) |  |
| static

Returns the coefficients for a low-pass filter with variable Q.

Definition at line 137 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeLowShelf()

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeLowShelf | ( | double | sampleRate,
|  | NumericType | cutOffFrequency,
|  | NumericType | Q,
|  | NumericType | gainFactor
| ) |  |
| 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.

## ◆ makeNotch() [1/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeNotch | ( | double | sampleRate,
|  | NumericType | frequency
| ) |  |
| static

Returns the coefficients for a notch filter.

Definition at line 209 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makeNotch() [2/2]

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makeNotch | ( | double | sampleRate,
|  | NumericType | frequency,
|  | NumericType | Q
| ) |  |
| static

Returns the coefficients for a notch filter with variable Q.

Definition at line 216 of file juce_dsp/processors/juce_IIRFilter.cpp.

## ◆ makePeakFilter()

template<typename NumericType >

IIR::Coefficients< NumericType >::Ptr juce::dsp::IIR::Coefficients< NumericType >::makePeakFilter | ( | double | sampleRate,
|  | NumericType | centreFrequency,
|  | NumericType | Q,
|  | NumericType | gainFactor
| ) |  |
| 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.

## Member Data Documentation

## ◆ coefficients

template<typename NumericType >

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 295 of file juce_dsp/processors/juce_IIRFilter.h.

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

- juce_dsp/processors/juce_IIRFilter.h
- juce_dsp/processors/juce_IIRFilter.cpp