Complex EQ using Convolution?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I have a fairly complex EQ that I want to apply to the audio path in my plugin, and by complex, I mean about 15 specific peak and shelving filters. I've been thinking about applying that EQ with convolution, similar to cabinet simulation but obviously without the reverb component. I'm wondering if this is reasonable.

Here's my theoretical workflow:

- Create the desired EQ in Logic using several copies of it's Channel EQ in series, which is mostly shelving and peak filters.
- Send a sine sweep through the EQ and record the result.
- Deconvolve the EQ'd sine sweep using Voxengo's Deconvolve to produce an impulse response.
- Use that IR with a convolution algorithm to filter my audio stream.

Does that make sense? Are there any problems with this workflow?

Post

joshb wrote:I have a fairly complex EQ that I want to apply to the audio path in my plugin, and by complex, I mean about 15 specific peak and shelving filters. I've been thinking about applying that EQ with convolution, similar to cabinet simulation but obviously without the reverb component. I'm wondering if this is reasonable.

Here's my theoretical workflow:

- Create the desired EQ in Logic using several copies of it's Channel EQ in series, which is mostly shelving and peak filters.
- Send a sine sweep through the EQ and record the result.
- Deconvolve the EQ'd sine sweep using Voxengo's Deconvolve to produce an impulse response.
- Use that IR with a convolution algorithm to filter my audio stream.

Does that make sense? Are there any problems with this workflow?
In digital there's little need to sine sweep then deconvolve. You can simply feed an impulse, a sample of 1.0 amplitude followed by zeroes. The output of the filter is the impulse response. Depending on the required resolution you can choose the length of the impulse to feed into your system.

Processing of parametric EQs is not too heavy on the CPU, generally. You might find it less taxing CPU wise just to use regular EQ and copy the settings rather than use convolution. Plus there are other drawbacks to convolution.

Post

You can simply feed an impulse, a sample of 1.0 amplitude followed by zeroes. The output of the filter is the impulse response.
Doh...of course. Thank you.
Depending on the required resolution you can choose the length of the impulse to feed into your system.
I was wondering about that. Can you be more specific? I'm guessing that bass response is affected most by the length of the IR (assuming EQ only). So if the sampleRate is 48k, would that mean that an IR of 48k samples would suffice?
Processing of parametric EQs is not too heavy on the CPU, generally. You might find it less taxing CPU wise just to use regular EQ and copy the settings rather than use convolution. Plus there are other drawbacks to convolution.
That's what I'm trying to figure out...at what number of IIR filters would be more efficient than using convolution.
Plus there are other drawbacks to convolution
Such as?

Thank you.

Post

For once, convolution, even via FFT, is slower than IIR. Then the sharper the spectrum, the longer the impulse has to be. Don't forget that you are trying to match poles with an infinite number of roots. It's... not that easy.

Post

One drawback would be to find out an algorithm that yields a minimum phase FIR impulse response to be used with convolution. I haven't yet seen one that has made immediate sense to me. I have seen papers like this https://www.researchgate.net/publicatio ... l_Cepstrum and there was some sample code in a minBLEP sample I had found in the net, but nothing easily understandable. I would be more concerned about this than the amount of cpu cycles that convolution would waste.
~stratum~

Post

joshb wrote:I was wondering about that. Can you be more specific? I'm guessing that bass response is affected most by the length of the IR (assuming EQ only). So if the sampleRate is 48k, would that mean that an IR of 48k samples would suffice?
No, in order for perfect convolution your impulse response needs to be as long as the impulse response of the filter you are sampling. Which could be anything from relatively short to infinitly long. In an EQ filter I'd guess most impulse responses would decay towards the noise floor. This could take thousands of samples, maybe. Chaining EQ filters will likely increase the overall IR length. You're right that bass resolution suffers the most as we shorten the IR. I also noticed, looking at cabinet impulse responses, that shortening the IR tended to smooth the spectrum. I'd guess you'd need to make a judgement call. Weighing up factors like CPU efficiency, latency and audible differences in sound quality to arrive at a suitable length.
joshb wrote:That's what I'm trying to figure out...at what number of IIR filters would be more efficient than using convolution.
A lot would depend on your actual implementations and how efficient you get them. You'd need to profile to get a solid figure.
joshb wrote:
Plus there are other drawbacks to convolution
Such as?

Thank you.
Other draw backs are that brute force convolution becomes extremely taxing on the CPU once the IR gets large. You can increase efficiency with FFT convolution at the cost of added latency. The latency can be reduced (all the way to zero if required) with partitioned convolution at the cost of algorithmic complexity and issues around multi threading as well as increased CPU load.
stratum wrote:One drawback would be to find out an algorithm that yields a minimum phase FIR impulse response to be used with convolution.
I don't think this is an issue if we are sampling minimum phase equipment as in the OPs question.

Post

Thanks for all the comments, gents.

Based on all your help and expertise, I think I'm going to try using a bunch of biquads instead.

Thanks again.

Post

I don't think this is an issue if we are sampling minimum phase equipment as in the OPs question.
It's not. Should it be? could be a question though. Before seeking this I used to assume that linear phase is good enough for all purposes, but it turns out it is not: http://www.fabfilter.com/help/pro-q/usi ... essingmode
~stratum~

Post

stratum wrote:
I don't think this is an issue if we are sampling minimum phase equipment as in the OPs question.
It's not. Should it be?
I don't think so. Not in the context of sampling a minimum phase EQ anyway.

We could decide that transforming FIR kernels between minimum, maximum, mixed and or linear phase could be cool, but we'd be straying pretty far off topic.

Post

I don't think so. Not in the context of sampling a minimum phase EQ anyway.
Ok, I see it's not because he intends to sample another EQ which does not have the delay problem.
~stratum~

Post Reply

Return to “DSP and Plugin Development”