Loading...
Searching...
No Matches
juce::dsp::FIR::Coefficients< NumericType > Struct Template Reference

## Detailed Description

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

A set of coefficients for use in an FIR::Filter object.

See also
  FIR::Filter

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

- juce_dsp/processors/juce_FIRFilter.h

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

## 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.
Public Types inherited from juce::dsp::ProcessorState
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).
| Coefficients (size_t size)
| Creates a null set of coefficients of a given size.
| Coefficients (const NumericType *samples, size_t numSamples)
| Creates a set of coefficients from an array of samples.
| 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 (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.
const NumericType * | getRawCoefficients () const noexcept
| Returns a raw data pointer to the coefficients.
void | normalise () noexcept
| Scales the values of the FIR filter with the sum of the squared coefficients.
Public Member Functions inherited from juce::ReferenceCountedObject
void | incReferenceCount () noexcept
| Increments the object's reference count.
void | decReferenceCount () noexcept
| Decreases the object's reference count.
bool | decReferenceCountWithoutDeleting () noexcept
| Decreases the object's reference count.
int | getReferenceCount () const noexcept
| Returns the object's current reference count.

## Public Attributes

Array< NumericType > | coefficients
| The raw coefficients.

## Additional Inherited Members

Protected Member Functions inherited from juce::ReferenceCountedObject
| ReferenceCountedObject ()=default
| Creates the reference-counted object (with an initial ref count of zero).
| ReferenceCountedObject (const ReferenceCountedObject &) noexcept
| Copying from another object does not affect this one's reference-count.
| ReferenceCountedObject (ReferenceCountedObject &&) noexcept
| Copying from another object does not affect this one's reference-count.
ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept
| Copying from another object does not affect this one's reference-count.
ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept
| Copying from another object does not affect this one's reference-count.
virtual | ~ReferenceCountedObject ()
| Destructor.
void | resetReferenceCount () noexcept
| Resets the reference count to zero without deleting the object.

## Member Typedef Documentation

## Ptr

template<typename NumericType>

using juce::dsp::FIR::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.

## Constructors and Destructors

## Coefficients() [1/5]

template<typename NumericType>

juce::dsp::FIR::Coefficients< NumericType >::Coefficients | ( |  | ) |

inline

Creates a null set of coefficients (which will produce silence).

References coefficients.

Referenced by Coefficients(), Coefficients(), operator=(), and operator=().

## Coefficients() [2/5]

template<typename NumericType>

juce::dsp::FIR::Coefficients< NumericType >::Coefficients | ( | size_t | size | ) |

inline

Creates a null set of coefficients of a given size.

References coefficients.

## Coefficients() [3/5]

template<typename NumericType>

juce::dsp::FIR::Coefficients< NumericType >::Coefficients | ( | const NumericType * | samples,
|  | size_t | numSamples )

inline

Creates a set of coefficients from an array of samples.

References coefficients.

## Coefficients() [4/5]

template<typename NumericType>

juce::dsp::FIR::Coefficients< NumericType >::Coefficients | ( | const Coefficients< NumericType > & |  | ) |

default

References Coefficients().

## Coefficients() [5/5]

template<typename NumericType>

juce::dsp::FIR::Coefficients< NumericType >::Coefficients | ( | Coefficients< NumericType > && |  | ) |

default

References Coefficients().

## Member Functions

## operator=() [1/2]

template<typename NumericType>

Coefficients & juce::dsp::FIR::Coefficients< NumericType >::operator= | ( | const Coefficients< NumericType > & |  | ) |

default

References Coefficients().

## operator=() [2/2]

template<typename NumericType>

Coefficients & juce::dsp::FIR::Coefficients< NumericType >::operator= | ( | Coefficients< NumericType > && |  | ) |

default

References Coefficients().

## getFilterOrder()

template<typename NumericType>

size_t juce::dsp::FIR::Coefficients< NumericType >::getFilterOrder | ( |  | ) | const

inline noexcept

Returns the filter order associated with the coefficients.

References coefficients.

## getMagnitudeForFrequency()

template<typename NumericType>

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

noexcept

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

## getMagnitudeForFrequencyArray()

template<typename NumericType>

void juce::dsp::FIR::Coefficients< NumericType >::getMagnitudeForFrequencyArray | ( | 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.

## getPhaseForFrequency()

template<typename NumericType>

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

noexcept

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

## getPhaseForFrequencyArray()

template<typename NumericType>

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

## getRawCoefficients() [1/2]

template<typename NumericType>

NumericType * juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients | ( |  | ) |

inline noexcept

Returns a raw data pointer to the coefficients.

References coefficients.

## getRawCoefficients() [2/2]

template<typename NumericType>

const NumericType * juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients | ( |  | ) | const

inline noexcept

Returns a raw data pointer to the coefficients.

References coefficients.

## normalise()

template<typename NumericType>

void juce::dsp::FIR::Coefficients< NumericType >::normalise | ( |  | ) |

noexcept

Scales the values of the FIR filter with the sum of the squared coefficients.

## Member Data Documentation

## coefficients

template<typename NumericType>

Array<NumericType> juce::dsp::FIR::Coefficients< NumericType >::coefficients

The raw coefficients.

You should leave these numbers alone unless you really know what you're doing.

Referenced by Coefficients(), Coefficients(), Coefficients(), getFilterOrder(), getRawCoefficients(), and getRawCoefficients().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited