vinniefalco / DSPFilters

A Collection of Useful C++ Classes for Digital Signal Processing
1.79k stars 371 forks source link

Error in high shelf Biquad coefficients? #27

Closed 0joshuaolson1 closed 8 years ago

0joshuaolson1 commented 8 years ago

From https://forum.juce.com/t/implementing-a-dsp-class-that-contains-includes-and-namespaces-vinne-falco-dspfilters/15684

Just in case you want to use a high shelf Biquad from DspFilters, I should point out there is an error in the coefficients. Vinnie never got around to fixing this, so I run a local branch of my own with the following changes to HighShelf::setup which can be found in shared\DSPFilters\source\RBJ.cpp, lines 159-164:

double b0 =    A*( (A+1) + (A-1)*cs + sq );
double b1 = -2*A*( (A-1) + (A+1)*cs );
double b2 =    A*( (A+1) + (A-1)*cs - sq );
double a0 =        (A+1) - (A-1)*cs + sq;
double a1 =    2*( (A-1) - (A+1)*cs );
double a2 =        (A+1) - (A-1)*cs - sq;
AndrewJJ commented 8 years ago

This is the same as #9 I think

0joshuaolson1 commented 8 years ago

Way for me to miss it. Now it's fresher I guess?