Multichannel Biquad filter
Peaking filter with configurable frequency, gain, and Q parameters. The module operates on multichannel data and is smoothly updating. Internally, the module uses RBF design equations.
This module is an example to be used with the documentation.
typedef struct _ModuleTutorialPeakingFilter
{
    ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
    FLOAT32 freq; // Cutoff frequency of the filter, in Hz
    FLOAT32 gain; // Amount of boost or cut to apply
    FLOAT32 Q; // Specifies the Q of the filter
    FLOAT32 smoothingTime; // Time constant of the smoothing process
    FLOAT32 smoothingCoeff; // Smoothing coefficient. This is computed based on the smoothingTime, sample rate, and block size of the module
    FLOAT32* coeffs; // Filter coefficients [b0; b1; b2; a1; a2]
    FLOAT32* currentCoeffs; // Smoothed filter coefficients [b0; b1; b2; a1; a2]
    FLOAT32* state; // State variables. 2 per channel.
} ModuleTutorialPeakingFilterClass;
Name |
Type |
Usage |
isHidden |
Default value |
Range |
Units |
freq |
float |
parameter |
0 |
250 |
10:0.1:20000 |
Hz |
gain |
float |
parameter |
0 |
0 |
-24:0.1:24 |
dB |
Q |
float |
parameter |
0 |
1 |
0:0.1:20 |
|
smoothingTime |
float |
parameter |
0 |
10 |
0:1000 |
msec |
smoothingCoeff |
float |
derived |
1 |
0.064493 |
Unrestricted |
|
coeffs |
float* |
derived |
1 |
[5 x 1] |
Unrestricted |
|
currentCoeffs |
float* |
state |
1 |
[5 x 1] |
Unrestricted |
|
state |
float* |
state |
1 |
[2 x 1] |
Unrestricted |
|
Name: in
Description: Input signal
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Name: out
Description: Output signal
Data type: float
File Name: tutorial_peaking_filter_module.m
M = tutorial_peaking_filter_module(NAME)
Example showing how to implement a peaking filter in Audio Weaver.
Arguments:
NAME - name of the module.
© DSP Concepts - 2019