...
As there is no processing if a biquad stage is bypassed, IIR Accelerators maybe expensive if the module is used with a majority of the biquad stages bypassed. Please use the BiquadSparseV3 module in that case.
When using Raw Coefficients, the order of coefficients in the table is:
b0, b1, b2, a1, a2
TargetCoeffs are calculated from rawCoeffs to suit the structure of the High Precision filter.
CurrentCoeffs are in the same format/order as targetCoeffs subjected to the smoothing process. After the smoothing interval, the currentCoeffs should converge towards the Target Coeffs.
Type Definition
Code Block |
---|
typedef struct _ModuleBiquadSparseHP { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 numStages; // Number of cascaded stages of the second order filter. FLOAT32 smoothingTime; // Time constant of the smoothing process. INT32 updateActive; // Specifies whether the filter coefficients are updating (=1) or fixed (=0). FLOAT32 smoothingCoeff; // Smoothing coefficient. This is computed based on the smoothingTime, sample rate, and block size of the module. INT32 bulkParamsUpdate; // State variable to handle bulk changes in filter parameters. INT32 rawCoeffsIndex; // Raw coefficient filter type index. INT32* filterType; // Selects the type of filter that is implemented by the module: Bypass=0, Gain=1, Butter1stLPF=2, Butter2ndLPF=3, Butter1stHPF=4, Butter2ndHPF=5, Allpass1st=6, Allpass2nd=7, Shelf2ndLow=8, Shelf2ndLowQ=9, Shelf2ndHigh=10, Shelf2ndHighQ=11, PeakEQ=12, Notch=13, Bandpass=14, Bessel1stLPF=15, Bessel1stHPF=16, AsymShelf1stLow=17, AsymShelf1stHigh=18, SymShelf1stLow=19, SymShelf1stHigh=20, VariableQLPF=21, VariableQHPF=22, Resonant=23, RawCoeffs=24. FLOAT32* freq; // Cutoff frequency of the filter, in Hz. FLOAT32* gain; // Amount of boost or cut to apply, in dB if applicable. FLOAT32* Q; // Specifies the Q of the filter, if applicable. FLOAT32* rawCoeffs; // Matrix of filter raw coefficients. The size of the matrix is 5 x numStages x numChannels. Each column contains the variables for a biquad arranged as [b0; b1; b2; a1; a2]. FLOAT32* currentCoeffscurrenttCoeffs; // Matrix of smoothed filter current coefficients coefficients in the High Precision format. The size of the matrix is 5 x numStages x numChannels. Each column contains the variables for a biquad arranged as [b0Fb; b1Gaa; b2Gab; a1K; a2Fa]. FLOAT32* targetCoeffs; // Matrix of filter coefficients in the High Precision format. The size of the matrix is 5 x numStages x numChannels. Each column contains the variables for a biquad arranged as [Fb; Gaa; Gab; K; Fa]. FLOAT32* state; // State variables. 2*numChannels per section. INT32* bypass; // State buffer used internally to store coeffs bypass status. INT32* currentBypass; // State buffer used internally to store coeffs bypass status. void * hardware_specific_struct_pointer; // This is the internal array used for ADI IIR accelerator. Size is determined internally } ModuleBiquadSparseHPClass; |
...