1

I am currently building an EQ in an music app, and it's relatively simple:

6 bands of fixed center frequency, and a Q knob to control the Q of all bands, because we do not currently have space for separate Q knobs for each individual band.

The problem is that we need to draw an EQ graph according to the user's settings like the one usually seen on a sound board.

My current understanding is that the Y axis is measured in dB's and grows linearly, and the X axis is the frequency and grows exponentially (a Lin-Log graph, that is).

I have no problem drawing this, until the Q factor comes in. I know that Q makes the affected range larger if Q is smaller, and shrinks the affected range if Q is larger.

However, I do not not how to calculate the exact staring position and end position of the "bump" of that Peak EQ filter, if I'm given a center frequency of 1 kHz and a Q of 2.0.

What is the mathematical formula to compute the beginning and end of the curve?

Marcus Müller
  • 30,525
  • 4
  • 34
  • 58
Nicholas
  • 121
  • 2
  • I went ahead and added a few line breaks (possibly: too many) to your two questions, simply to make them easier to read (and not one wall of text). – Marcus Müller Dec 16 '18 at 01:08
  • dB is a logarithmic scale. So, with respect to amplitude (or power) the described graph would be log-log, with respect to logarithmic amplitude (or power), it is indeed lin-log. – Marcus Müller Dec 16 '18 at 01:08
  • If your "Q" is the Quality Factor of a filter (I'm not well-versed in the conventions of audio terminology), then it is defined to be the ratio between passband width and center frequency. That would immediately be your formula. Does this help? – Marcus Müller Dec 16 '18 at 01:10
  • Thanks for your edition! But if the Q is defined that way, what is the "passband width" then? Say I have a Q of 0.5 on frequency 2K, isn't the width going to be 2K/0.5 which is 4K? How can the width be 4K? Or is there a value range of Q and it cannot be certain number? Thanks! @MarcusMüller – Nicholas Dec 16 '18 at 04:54
  • You might find these sources helpful in this - http://www.sengpielaudio.com/calculator-bandwidth.htm and http://www.sengpielaudio.com/calculator-cutoffFrequencies.htm – Juha P Dec 16 '18 at 08:19
  • You don't need to know the effect of Q separately while plotting the EQ response (you plot the combined output of all filters you have there) ... Q is just a parameter in filter calculation ... see: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt – Juha P Dec 16 '18 at 09:59
  • @JuhaP I wish I could do that but now as the library I use currently stands there don't seem to be a way to do that :) I'll check out the articles you've posted. – Nicholas Dec 17 '18 at 00:40
  • @JuhaP Hi I checked the links you gave me and I'm really confused over how exactly is bandwidth defined. One says it's the amplitude minus 3 dB, but the other one gives formula for octave bandwidth N and claims the 3dB definition cannot be right if the amplitude boost is less or equal to three. Are these formulas essentially the same thing? Will they give me the same value no matter which one I use? – Nicholas Dec 17 '18 at 03:13
  • @JuhaP And even if I have the bandwidth, how should I draw the peak on a graph? Apparently the bandwidth is not the width of the bump. Is it half the bump? or are these unrelated? The links do not seem to give the answer. Please bear my ignorance on this subject. – Nicholas Dec 17 '18 at 03:15
  • Here are couple examples to plot filter response : https://dsp.stackexchange.com/questions/3091/plotting-the-magnitude-response-of-a-biquad-filter and http://www.earlevel.com/main/2016/12/01/evaluating-filter-frequency-response/ ... but, methods are not what you would like to use in your software. Try find some examples by googling (from github or sourceforge) ... here's one site to start with http://iowahills.com/a7examplecodepage.html – Juha P Dec 17 '18 at 08:10

0 Answers0