# EQ - narrow bandwith problem - negative values signal?

I asked the same question on dsp.stackexchange.com

But there nobody answered me. Maybe here anyone could help? I would be very appretiate.

I’am trying to calculate Fourier Transform for impulse response treated by equaliser. Situation like that:

Signal 1, 0, 0, 0… goes to some equalizer, and output of that equalizer goes to my FFT calculator Then I draw results on the graph - Magnitude(freq) and Phase(freq) - to see what some equalizers exactly do with frequencies and their phase.

And everything works well, until I use on EQ some extremely hight Q (very narrow bandwith) - for example Fabfilter Pro-Q. Then my graph jumps crazy. But not very crazy. Freq which I gained by EQ is OK, but all the rest around frequencies jumps together up/down/up/down/up/down… But that jumping ratio is not regular, it’s crazy

I don’t know why. How to fix it?

Of course my signal 1, 0, 0, 0… after normal EQ is changed as that there are values between 0 and 1 (sometimes little bit above 1 if gaining is high).

But I found out that after EQ with extremly high Q, in my signals there are a lot of negative values like `-0.000114598` (it’s just example). Maybe I am wrong but I suppose they make my graph jumping. But how to manage with that? I tried to send to FFT absolute values of my signal, but it’s wrong way.

Thanks for any help.

can you share a screenshot of the frequency/phase response you’re getting so we can more clearly see what the issue is?

OK I will do it evening (now I am in job, don’t have my apps here). But in the mean time, is it normal that narrow EQ generate some negative values in impulse signal?

Yes, it’s normal for negative values to be generated in your audio signal when using a single-sample impulse as input…

Have a look at http://www.micromodeler.com/dsp/. There’s not a setting specifically for parametric filters but the same effect can be seen using a low-pass filter; the bottom-right panel shows the output signal of the filter and as you can see it’s common to have negative values!

What exactly jumps? Are there jumps along your frequency axis? Or is it jumping along the time axis (frame by frame)?

If the latter one: high Q values result in a filter with a high resonance. Analog filters will even start to sing when the resonance is high enough. You can hear this resonance by simply filtering a percussive signal like drums. What you will perceive is a ringing of your filter. So why am I telling you this? Ringing means, that there is a quite long decay of the filter which you can perceive. Maybe longer than your analysis window which then is not long enough to measure the whole impulse response. The next frame then will get the decay of your previous IR and interfere with your current one, ending up in jumps in your spectrum

I really like to read your posts here as you seem to have fun learning dsp stuff in a rather intuitive than theoretical way and stumble upon a lot of things that can be explained theoretically - but I have the feeling that there is no better way to learn this theory then real experiencing effects and asking why

What is the exact length of the impulse you generate? Based on the effects danielrudich explained above I guess this might be the result of a too short impulse

1 Like

From what I’ve seen from @pajczur’s previous posts, they have one plugin generating an impulse (presumably just generating a single sample at 1.0 when prompted and then the rest 0’s) then running the output of that plugin through some filter plugins and finally analysing the resultant signal with another plugin… correct me if I’m wrong @pajczur
If that’s the case - the impulse length should just be infinite (generating zeros in realtime)?

Right, but even in this case, the analysis window can’t be infinite, I think he has some fixed number of impulse response samples he collects before calculating the FFT on that impulse response

Hello
thanks for support.

one plugin generating an impulse (presumably just generating a single sample at 1.0 when prompted and then the rest 0’s) then running the output of that plugin through some filter plugins and finally analysing the resultant signal with another plugin… correct me if I’m wrong @pajczur

Yes you are right.

But back to the question about length of my impulse. I am not sure if I understand that question. The length of the impulse is just impulse - one sample. The rest are zeros. And you probably ask how many zeros there are after impulse. So number of zeros plus one (sample of impulse) is equal to the buffer size which I use to calculate FFT. For example if I calculate FFT with buffer size 1024. Then the first sample is 1, and number of zeros is 1023. NOT INFINITE.
What do you mean infinite?
To calculate fourier transform I need finite number of samples. If I use infinite number the fourier would never stop calculating

Right, but you will likely need more than just your FFT size, some filters may be producing output from even a Dirac impulse (your single one followed by zeros) that is quite long.

By the way is there any JUCE method to pause processor block without stopping playing playhead in my host? Just want to click the button and stops the processor block in my plugin.

Right, but you will likely need more than just your FFT size, some filters may be producing output from even a Dirac impulse that is quite long.

Oh I didn’t think about that. That’s interesting

some filters may be producing output from even a Dirac impulse that is quite long.

What do you mean “quite long”. Could you give some example how long it can be for audio plugins? I am asking because I can’t even imagine if “quite long” could mean several seconds, or just half of second - which is still quite long from “buffer size” point of view. ???

If the EQ you want to measure is implemented as an IIR filter, the impulse response is - you might want to sit down for this - infinite samples long. If it’s FIR it has a fixed length.

However, depending on your desired accuracy of your measurement, you can truncate the IRs, as the late decay does not contribute to the frequency response as much as the first part. But keep in mind that high Q filters have a longer IRs than their low Q siblings, as I wrote before. So for them you should not truncate a lot.

What you can do, is take a look at the actual impulse response. Use an audio file which has only a 1 and maybe two seconds of zeros. You might also want to add some preceding zeros, as some DAWs fade in the events. And then render the actual IR to a file and look at it. After that you can figure out how many samples you want to analyze.

Edit: Maybe you could fill us in with more information about your signal chain. How many samples do you analyze? What are the filter’s settings? How high is the Q value?

danielrudrich