INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Calculate Shelving Filter Q  (Read 8336 times)

Bccc1

  • Junior Woodchuck
  • **
  • Posts: 75
Calculate Shelving Filter Q
« on: July 26, 2015, 09:08:42 am »

Hello,

i'm trying to input a series of shelving filter with a given slope, like +10dB @151Hz, 12dB/Oct. As MC doesn't allow to input shelving filters that way, I'm trying to calculate the right Q.
I don't know much about this, but I thought that for this case a bandwith of 10/12 would be equivalent. This calculator outputs a Q of 1.707399 for that.
If I try to input that, MC is telling me "Q values greater than 1.0 won't be honored."
Does that mean my calculation is wrong, or does MC simply not support the desired filter? If so, why?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Calculate Shelving Filter Q
« Reply #1 on: July 26, 2015, 09:53:31 am »

I just did some experiments with pink noise and the analyzer to "see" what's going on.  It looks to me like the Q value really only affects the "shape" of the transition region from flat to your boosted value.  It's effect is sort of subtle, but it's there (I think).

The way this seems to work is, you input a frequency and a gain.  MC responds by boosting from zero to the gain value you want over a transition region.  The frequency you specify seems to be right in the middle of the gain target and zero.  So let's say you tell it 1000 Hz and 12 dB.  At 400 to 500 Hz, you will see the response is mostly flat and *just* starting to be boosted.  At 1000 Hz, it looks to be up about 6 dB.  By 2000 Hz it's up about 9 to 10 dB.  By 3000 Hz (or so) it's at the full 12 dB boost.

This tells me that MC spreads the gain over 2 to 2.5 (maybe 3?) octaves.  The frequency you specify will be in the middle of this boost range.  So you'll get HALF of the boost you ask for, at the frequency you ask for.  That is, if I'm reading the analyzer correctly.  It's not marked, but I'm reasonably sure it is showing 3 dB per division.

The Q value seems to affect the transition, but it only seems to spread the boost out a little, or bring it back a little. It's a small effect and hard for me to see with pink noise since pink noise is always "in motion".

Conclusion:  If you want 10 dB of boost from 151 Hz and up, use the values:

Frequency:  65 to 70 (experiment with it)
Gain:  10 dB
Q:  1.0

Your transition region will start at about 30 to 35 Hz and will be a full 10 dB up by around the 151 mark and stay 10 dB up all the way out to the end of the spectrum.  With a value this low, you might actually be better served by a high pass filter.  But I'm not sure what your application is so...

I hope this helps some.

Brian.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Calculate Shelving Filter Q
« Reply #2 on: July 26, 2015, 09:55:34 am »

MC doesn't support shelving filters with a Q greater than 1, but you can achieve higher "effective" Q's by stacking two shelving filters, and that is the solution to your problem if you need a Q steeper than 1.  

Brian is right, the set frequency is the center of the transition band, so if you want to achieve 10dB of boost before 151 Hz, you'll need to start out higher (how much higher depends on the Q and whether you've stacked fikters).  I'm not sure your calculation is entirely correct, but it's hard to tell based on the info you provided.  

A shelf doesn't rise monotonically forever and will have a different slope depending on how much boost or cut is applied.  So it's misleading to talk about the slope of a shelf as "12dB per octave." By convention, folks talk about first and second order filter slopes for shelves, but the order of a shelf doesn't establish a fixed filter slope except at fairly extreme boosts or cuts (several tens of dB).  A second order shelving filter won't have a fixed 12dB/Octave slope in most cases (unless it's a very, very tall shelf).

A Q of 1 in MC is a second order shelf.  If you want a steeper rise, stack multiple shelves (you can get really quite steep transitions this way).
Logged

Bccc1

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Calculate Shelving Filter Q
« Reply #3 on: July 27, 2015, 10:57:04 am »

Thanks a lot. I have a set of filters created by someone else for a Behringer DCX2496 that I want to use in JRiver. They a correction filters for a diy speaker, and I want to use his filters, as his measurement equipment is much better than mine. As it turns out, the 12dB/Oct shelf in the dcx is equal to a second order shelf. But the dcx seams to interpret the frequency differently. Through try and error I got f=200Hz for MC, but I'd like to have a way to calculate that. The attached picture shows the measured response from the dcx2496, the response from MC using f=151, gain=10, q=1 and from MC using f=200. Additionally on all measurments is a L-R 24dB/oct lowpass @1190Hz.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Calculate Shelving Filter Q
« Reply #4 on: July 27, 2015, 11:08:40 am »

Thanks a lot. I have a set of filters created by someone else for a Behringer DCX2496 that I want to use in JRiver. They a correction filters for a diy speaker, and I want to use his filters, as his measurement equipment is much better than mine. As it turns out, the 12dB/Oct shelf in the dcx is equal to a second order shelf. But the dcx seams to interpret the frequency differently. Through try and error I got f=200Hz for MC, but I'd like to have a way to calculate that. The attached picture shows the measured response from the dcx2496, the response from MC using f=151, gain=10, q=1 and from MC using f=200. Additionally on all measurments is a L-R 24dB/oct lowpass @1190Hz.

Unfortunately, without more information, I'm not sure that anyone can tell you how to mathematically convert a DCX shelf to a standard shelf.  The JRiver shelving frequency is the center of the transition band, which is typically how shelves are specified because it's easy to figure out.  It looks like the DCX set frequency is somewhere else in the shelf's curve, but there's no way to know where exactly without knowing precisely how they calculate their shelves.  Maybe someone here has a DCX on hand and can weigh in?

Trial and error (as you've already done) is probably the easiest way to get a similar shelf barring access to whatever formula the DCX uses. 
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Calculate Shelving Filter Q
« Reply #5 on: July 27, 2015, 11:45:18 am »

Loudspeaker correction can be done with convolution filters, which JRiver supports directly.  Can the person that did the measurement export the correction as a convolution filter?  That would be ideal and far more exact.

http://wiki.jriver.com/index.php/Convolution

Brian.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Calculate Shelving Filter Q
« Reply #6 on: July 27, 2015, 11:52:12 am »

Loudspeaker correction can be done with convolution filters, which JRiver supports directly.  Can the person that did the measurement export the correction as a convolution filter?  That would be ideal and far more exact.

http://wiki.jriver.com/index.php/Convolution

Brian.

That's a good thought, although that approach will also have the limitations mentioned in the wiki (namely latency).  If it's an audio only setup, though, that wouldn't matter.

That actually gave me an idea: OP could actually generate the convolution filter himself by dialing the DCX filter bank into Room EQ Wizard (REW), because REW has a DCX emulation mode in it (so should be able to reproduce the DCX's shelves exactly).
Logged

Bccc1

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Calculate Shelving Filter Q
« Reply #7 on: July 27, 2015, 12:17:10 pm »

I found a formular to calculate the frequency from the dcx values in the second post here. This gives me f=201,36173625666192787706568900959. A second measurment verifyed that 201,4 is better than the guessed 200Hz. I used the rounded value because if I enter the more exact value, the measurements show some weird artifacts in the frequency response.

I also tried the formulars with the filters for the tweeter and the result seems correct. In the 10-20 kHz range the dcx and jrmc shelving-filters gain drifts a bit (~0,5dB), but this could be due to the non-linear frequency response of the dcx itself. Another problem is, that the dcx interprets the q of parametric filters differently too. To match a parametric 1000Hz, -7dB, Q5 filter from the DCX you have to use a ~Q3,5 in MC. I haven't found a formular for this yet.

I could have used convolution as I measured the (borrowed) DCX myself, but I don't want the added latency and the distortion introduced by the DAADDAAD-Conversion. The DCX Simulation mode is a good idea though, I didn't know it existed.
Logged
Pages: [1]   Go Up