Hi Guenter + all,
I was trying to build a graphic EQ using a chain of RBJ peaking filters (inspired by a message on music-dsp) and noticed that ggee's equalizer object doesn't seem to generate the right coefficients. I'm guessing it's supposed to be the peakingEQ from http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt. The code in question is (ggee/filters/equalizer.c)
t_float b0 = 1 + alpha*e_A(x->x_gain); t_float b1 = -2.*cos(omega); t_float b2 = 1; t_float a0 = 1 + alpha; t_float a1 = -2.*cos(omega); t_float a2 = 1 - alpha;
but I think it should be
t_float b0 = 1 + alpha * e_A(x->x_gain); t_float b1 = -2. * cos(omega); t_float b2 = 1 - alpha * e_A(x->x_gain); t_float a0 = 1 + alpha / e_A(x->x_gain); t_float a1 = -2. * cos(omega); t_float a2 = 1 - alpha / e_A(x->x_gain);
After changing these lines, it behaves as expected (as a peaking filter, while before it was a funny-shaped peak with a notch beside it).
Ben
Hi Ben,
Yes, you are absolutely right ! Wondering how this could happen ... The version in CVS is fixed now. Thanks a lot for tracking this down.
Greetings,
Guenter
On Tue, 26 Nov 2002, Ben Saylor wrote:
Hi Guenter + all,
I was trying to build a graphic EQ using a chain of RBJ peaking filters (inspired by a message on music-dsp) and noticed that ggee's equalizer object doesn't seem to generate the right coefficients. I'm guessing it's supposed to be the peakingEQ from http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt. The code in question is (ggee/filters/equalizer.c)
t_float b0 = 1 + alpha*e_A(x->x_gain); t_float b1 = -2.*cos(omega); t_float b2 = 1; t_float a0 = 1 + alpha; t_float a1 = -2.*cos(omega); t_float a2 = 1 - alpha;
but I think it should be
t_float b0 = 1 + alpha * e_A(x->x_gain); t_float b1 = -2. * cos(omega); t_float b2 = 1 - alpha * e_A(x->x_gain); t_float a0 = 1 + alpha / e_A(x->x_gain); t_float a1 = -2. * cos(omega); t_float a2 = 1 - alpha / e_A(x->x_gain);
After changing these lines, it behaves as expected (as a peaking filter, while before it was a funny-shaped peak with a notch beside it).
Ben
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev