eq4

Four-band equalizer. The transition frequencies are 100, 500, 2000, and 6000 Hz. Lower quality version. The low band is ommitted.
Author: Johannes Taelman
License: BSD
Github: filter/eq4.axo

Inlets

frac32buffer input

Outlets

frac32buffer output

Parameters

int32 lowmid

int32 mid

int32 highmid

int32 high

Declaration
q31_t biquadStateBand2Q31[4 * 2];
q31_t biquadStateBand3Q31[4 * 2];
q31_t biquadStateBand4Q31[4 * 2];
q31_t biquadStateBand5Q31[4 * 2];
arm_biquad_casd_df1_inst_q31 S2;
arm_biquad_casd_df1_inst_q31 S3;
arm_biquad_casd_df1_inst_q31 S4;
arm_biquad_casd_df1_inst_q31 S5;
static const int NUMSTAGES = 2;
Init
arm_biquad_cascade_df1_init_q31(&S2, NUMSTAGES,
                                (q31_t *)&eq5coefs[190 * 1 + 10 * 9],
                                &biquadStateBand2Q31[0], 2);

arm_biquad_cascade_df1_init_q31(&S3, NUMSTAGES,
                                (q31_t *)&eq5coefs[190 * 2 + 10 * 9],
                                &biquadStateBand3Q31[0], 2);

arm_biquad_cascade_df1_init_q31(&S4, NUMSTAGES,
                                (q31_t *)&eq5coefs[190 * 3 + 10 * 9],
                                &biquadStateBand4Q31[0], 2);

arm_biquad_cascade_df1_init_q31(&S5, NUMSTAGES,
                                (q31_t *)&eq5coefs[190 * 4 + 10 * 9],
                                &biquadStateBand5Q31[0], 2);
Control Rate
S2.pCoeffs = (q31_t *)&eq5coefs[190 * 1 + 10 * (param_lowmid + 9)];
S3.pCoeffs = (q31_t *)&eq5coefs[190 * 2 + 10 * (param_mid + 9)];
S4.pCoeffs = (q31_t *)&eq5coefs[190 * 3 + 10 * (param_highmid + 9)];
S5.pCoeffs = (q31_t *)&eq5coefs[190 * 4 + 10 * (param_high + 9)];

arm_biquad_cascade_df1_q31(&S2, (q31_t *)inlet_in, (q31_t *)outlet_out,
                           BUFSIZE);
arm_biquad_cascade_df1_q31(&S3, (q31_t *)outlet_out, (q31_t *)outlet_out,
                           BUFSIZE);
arm_biquad_cascade_df1_q31(&S4, (q31_t *)outlet_out, (q31_t *)outlet_out,
                           BUFSIZE);
arm_biquad_cascade_df1_q31(&S5, (q31_t *)outlet_out, (q31_t *)outlet_out,
                           BUFSIZE);

Privacy

© 2024 Zrna Research