# Generic/DCX2496 shelving filters center frequency



## Matrix86 (Apr 16, 2007)

Hello,
I'm the developer of Equalizer APO and I'm currently working on support for filter types other than peaking filters. I would like to support all filters types the "Generic" equalizer supports and stumbled over the LS/HS 6 dB/12 dB filters (which seem to be copied from the DCX2496). These look like regular shelving filters but the frequency entered into REW is not the center frequency, more like the cutoff frequency of a lowpass/highpass filter. I could not figure out what the exact meaning of the frequency is. To implement the filter as a biquad I need to know the center frequency of the shelving filter.

Does anybody know the meaning of the frequency or better, how to calculate the center frequency from it? Here are some sample values I read from Room EQ Wizard for the LS 12 dB filter with frequency 10000 Hz:

No code has to be inserted here.


----------



## JohnM (Apr 11, 2006)

To correspond to the definitions used by the DCX the frequency needs to vary with square root of gain (or square root of that for the 12 dB filters). This code fragment should convey the gist:

```
case LS6:
                gainFactor = Math.pow(10.0, Math.abs(gain)/40.0);
                omega = fc*gainFactor *norm;
                break;
                
            case HS6:
                gainFactor = Math.pow(10.0, Math.abs(gain)/40.0);
                omega = fc*norm/gainFactor ;
                break;
                
            case LS12:
                gainFactor = Math.pow(10.0, Math.abs(gain)/80.0);
                omega = fc*gainFactor *norm;
                break;
                
            case HS12:
                gainFactor = Math.pow(10.0, Math.abs(gain)/80.0);
                omega = fc*norm/gainFactor ;
                break;
```
The shelf slope is 0.5 for the 6 dB filters and 1.0 for the 12 dB.


----------



## Matrix86 (Apr 16, 2007)

Thank you very much! Your answer, especially the code, was really helpful. This thread can be closed.


----------

