Code: Select all
esp_err_t dsps_biquad_gen_peakingEQ_f32(float *coeffs, float f, float qFactor);
I would have like to write my own implementation based on the current one but I do not understand how the coefficients are calculated ?
In the lib there is:
Code: Select all
float b0 = alpha;
float b1 = 0;
float b2 = -alpha;
float a0 = 1 + alpha;
float a1 = -2 * c;
float a2 = 1 - alpha;
Code: Select all
float b0 = 1 + alpha;
float b1 = -2 * c;
float b2 = 1 - alpha;
float a0 = 1 + alpha;
float a1 = -2 * c;
float a2 = 1 - alpha;
Code: Select all
float A = sqrtf(pow(10, (double)gain / 20.0));
float b0 = 1 + alpha * A;
float b1 = -2 * c;
float b2 = 1 - alpha * A;
float a0 = 1 + alpha / A;
float a1 = -2 * c;
float a2 = 1 - alpha / A;