Aviate Audio Multiverse Library
Public Member Functions | List of all members
Aviate::IirBiQuadFilterHQ Class Reference

A High-precision version of IirBiQuadFilter often necessary for complex, multistage filters. More...

#include <LibBasicFunctions.h>

Public Member Functions

 IirBiQuadFilterHQ (unsigned maxNumStages, const int32_t *coeffs, int coeffShift=0)
 Construct a Biquad filter with specified number of stages, coefficients and scaling. More...
 
virtual ~IirBiQuadFilterHQ ()
 Destructor.
 
void changeFilterCoeffs (unsigned numStages, const int32_t *coeffs, int coeffShift=0)
 Reconfigure the filter coefficients. More...
 
bool process (int16_t *output, int16_t *input, size_t numSamples)
 Process the data using the configured IIR filter. More...
 

Detailed Description

A High-precision version of IirBiQuadFilter often necessary for complex, multistage filters.

This class uses CMSIS-DSP biquads with 64-bit internal precision instead of 32-bit.

Constructor & Destructor Documentation

◆ IirBiQuadFilterHQ()

Aviate::IirBiQuadFilterHQ::IirBiQuadFilterHQ ( unsigned  maxNumStages,
const int32_t *  coeffs,
int  coeffShift = 0 
)

Construct a Biquad filter with specified number of stages, coefficients and scaling.

See CMSIS-DSP documentation for more details

Parameters
maxNumStagesnumber of biquad stages. Each stage has 5 coefficients.
coeffspointer to an array of Q31 fixed-point coefficients (range -1 to +0.999...)
coeffShiftcoeffs are multiplied by 2^coeffShift to support coefficient range scaling

Member Function Documentation

◆ changeFilterCoeffs()

void Aviate::IirBiQuadFilterHQ::changeFilterCoeffs ( unsigned  numStages,
const int32_t *  coeffs,
int  coeffShift = 0 
)

Reconfigure the filter coefficients.

See CMSIS-DSP documentation for more details

Parameters
numStagesnumber of biquad stages. Each stage has 5 coefficients.
coeffspointer to an array of Q31 fixed-point coefficients (range -1 to +0.999...)
coeffShiftcoeffs are multiplied by 2^coeffShift to support coefficient range scaling

◆ process()

bool Aviate::IirBiQuadFilterHQ::process ( int16_t *  output,
int16_t *  input,
size_t  numSamples 
)

Process the data using the configured IIR filter.

output and input can be the same pointer if in-place modification is desired

Parameters
outputpoinvoid combine(audio_block_t *out, audio_block_t *in0, audio_block_t *in1)ter to where the output results will be written
inputpointer to where the input data will be read from
numSamplesnumber of samples to process
Returns
true if successful, false if an error occurs

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