OpenShot Library | OpenShotAudio 0.2.2
juce::dsp::FIR::Coefficients< NumericType > Struct Template Reference

A set of coefficients for use in an FIRFilter object. More...

#include <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. More...
 
- 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. More...
 

Public Member Functions

 Coefficients ()
 Creates a null set of coefficients (which will produce silence). More...
 
 Coefficients (size_t size)
 Creates a null set of coefficients of a given size. More...
 
 Coefficients (const NumericType *samples, size_t numSamples)
 Creates a set of coefficients from an array of samples. More...
 
 Coefficients (const Coefficients &)=default
 
 Coefficients (Coefficients &&)=default
 
Coefficientsoperator= (const Coefficients &)=default
 
Coefficientsoperator= (Coefficients &&)=default
 
size_t getFilterOrder () const noexcept
 Returns the filter order associated with the coefficients. More...
 
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. More...
 
const NumericType * getRawCoefficients () const noexcept
 Returns a raw data pointer to the coefficients. More...
 
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. 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...
 

Public Attributes

Array< NumericType > coefficients
 The raw coefficients. More...
 

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. More...
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 Copying from another object does not affect this one's reference-count. More...
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 Copying from another object does not affect this one's reference-count. More...
 
ReferenceCountedObjectoperator= (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...
 

Detailed Description

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

A set of coefficients for use in an FIRFilter object.

See also
FIRFilter

Definition at line 224 of file juce_FIRFilter.h.

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.

Definition at line 244 of file juce_FIRFilter.h.

Constructor & Destructor Documentation

◆ Coefficients() [1/3]

template<typename NumericType >
juce::dsp::FIR::Coefficients< NumericType >::Coefficients ( )
inline

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

Definition at line 228 of file juce_FIRFilter.h.

◆ Coefficients() [2/3]

template<typename NumericType >
juce::dsp::FIR::Coefficients< NumericType >::Coefficients ( size_t  size)
inline

◆ Coefficients() [3/3]

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.

Definition at line 234 of file juce_FIRFilter.h.

Member Function Documentation

◆ getFilterOrder()

template<typename NumericType >
size_t juce::dsp::FIR::Coefficients< NumericType >::getFilterOrder ( ) const
inlinenoexcept

Returns the filter order associated with the coefficients.

Definition at line 248 of file juce_FIRFilter.h.

References juce::dsp::FIR::Coefficients< NumericType >::coefficients, and juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().

◆ getRawCoefficients() [1/2]

template<typename NumericType >
NumericType * juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients ( )
inlinenoexcept

◆ getRawCoefficients() [2/2]

template<typename NumericType >
const NumericType * juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients ( ) const
inlinenoexcept

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.

Definition at line 286 of file juce_FIRFilter.h.

Referenced by juce::dsp::FIR::Coefficients< NumericType >::Coefficients(), juce::dsp::FIR::Coefficients< NumericType >::getFilterOrder(), and juce::dsp::FIR::Coefficients< NumericType >::getRawCoefficients().


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