Menu

How to use custom coefficients?

2019-05-27
2019-06-10
  • Brian Zheng

    Brian Zheng - 2019-05-27

    Hi,

    I'm trying to use a low shelf filter on EqualizerAPO with adjustable Q. The Q is fixed in Equalizer APO's implementation of shelf filters for some reason. Therefore, I used the biquad filter spreadsheet here to calculate the biquad for the shelving filter I want.

    However, when I input the custom coefficients for a 550Hz, Q = 0.7, Gain = 3.5dB low shelf like this, using the values generated by that spreadsheet, I get something very messed up.

    Filter: ON IIR Order 2 Coefficients 1.011337149377030 -1.897763711474370 0.893574517364046 1 1.898949042894940 -0.903726335320503

    Does Equalizer APO's implementation of IIR filters somehow expect a different form of coefficients?

     
  • Peter Verbeek

    Peter Verbeek - 2019-05-27

    Just out of curiosity, can't you use the slope value to make the slope steeper or less steep?
    For instance, FILTER 1 ON HSC 6 dB Fc 100 Hz Gain -6.0 dB where 6 dB determines the slope.

     
  • Brian Zheng

    Brian Zheng - 2019-05-27

    I could, but I would really like to have control of Q. I'm just much more familiar with that, and it gives greater control of the shape of the shelf filter, which is probably more important. If I can't do this I would have to do it in FIR, which I'd prefer not to do.

     
  • Peter Verbeek

    Peter Verbeek - 2019-05-27

    I guess it's possible to calculate the Q from the slope and vice versa. After a quick look I found this page which has a formula to calculate the Q from the gain and the slope S. I don't know how it works as S isn't in dB. I think S = 1 for a 12 dB/octave slope. If so, the formula given on webpage can be used.

    I don't know if Jonas Thedering can easily create a shelf filter with a Q parameter. It depends of course if he understands the conversion and is willing.

     
  • Brian Zheng

    Brian Zheng - 2019-05-28

    From quickly looking at the source code, it looks like he already can. The formulas in biquad.cpp are exactly like the audio cookbook formulas for biquads. I didn't look in the source code deep enough to see why he's not using it for low shelf filters.

     
  • Peter Verbeek

    Peter Verbeek - 2019-05-28

    Yes, looking at the cookbook for shelving filters the calculation of coefficients is using α which is sin(ω0)2⋅Q so that's easy to implement, I guess, because it's already done for the other type of filters. Still, there could be a reason Jonas has used the Slope instead of the Q.

     
  • Jonas Dahlinger

    Jonas Dahlinger - 2019-05-28

    The reason is that I just wanted to implement the filters that Room EQ Wizard supports, which only supports slope not Q. Yes, the required effort to enable Q for shelving filters is minimal as even the parsing already supports Q for shelving filters but just outputs an error message in that case.

     
  • Brian Zheng

    Brian Zheng - 2019-05-28

    Jonas thanks for stopping by. Any chance this can be added? Are you still developing EqualizerAPO? If not, I don't mind editting the source code myself, but I don't know how to build.

     
  • Brian Zheng

    Brian Zheng - 2019-05-30

    Jonas, any insights on my custom coefficient problem? Really appreciate any help on it.

     
  • Jonas Dahlinger

    Jonas Dahlinger - 2019-06-10

    I just released version 1.2.1, which now supports Q for shelving filters. You can use the Configuration Editor to comfortably define them or see the syntax in the Configuration reference.

     
  • Peter Verbeek

    Peter Verbeek - 2019-06-10

    Thanks Jonas for your swift implementation. It's awesome :)

     
  • Brian Zheng

    Brian Zheng - 2019-06-10

    Wow! What a way to wake up! Thank you very much Jonas!!!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.