Gaining frequency areas separately?

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

Post

An idea occured to me on my current plug-in. I think I'd like to increase the volume of some specific frequency bands (like in "shelf EQ"-style, merely increase the band's volume), but currently I have no filterbanks, nor bandpass filters, but can get the frequency ranges from the user.

So do I necessarily need to create some sort of cross-over filtering in order to pull this off? I'm taking FFT, but it shouldn't be used for output since it smears the sound almost in all cases that I've heard.

The application is similar to if one'd want to have a band-specific input/output gain in a dynamic eq band.

BTW, is doing e.g. 3-way cross-over filtering and then gaining the middle band different than having a band-shelf EQ and equalizing the "middle band"? Or is it the same procedure?

Post

Doing that over an FFT is not as straightforward. You basically are multiplying your spectrum with another signal, meaning that it's a convolution in the time domain, so you can't just process n samples after the other without handling the n-1 samples that you have generated in the frequency domain.
It's far easier to have 4 filters to make the crossover for 3 bands in the end and sum the result together. There are filters that are made for that witht he proper coefficients at the cut frequency (Linkwitz Riley, I'm looking at you).

Post

Pretty much what Miles said. I happened to have a basic Linkwitz Riley filter set up already for an experiment when I read this, so I did what you were suggesting and took a screenshot of some frequency sweeps with the gain of the middle band multiplied in 10% increments:

image:
Image

That is a basic shelf/peak/shelf 3-band filter that 'works' if you don't need much control over bandwidth, range, or curve shape (since the bands are tied together at the crossover points). Hope that helps.

Post

But:

is doing e.g. 3-way cross-over filtering and then gaining the middle band different than having a band-shelf EQ and equalizing the "middle band" (that is, without any cross-over network)? Or is it the same procedure?

A high order Butterworth bandshelf creates a rather nice shelf. At orders over 10 it's almost like a box. Chebyshev type I does as well.

Post

It's nice, but it's not worth it for several reasons:
- order 10 starts being too much for the usual implementation forms (direct 1, 2 or the transposed one), you are getting close to the unit circle and instabilities
- Chebyshev has ripple, you shouldn't use that for EQ
- you don't want a box for your actual filters.
That's why no one actually uses FFT to make filters, they are not realistic, and they have ripples, phase issues...

If you write down the math, you end up with a shelf filter by writing the 3 separate bands. The order of the resulting filter will be different than an order 2 shelving filter.

Post

Any ready C++ implementations for the cross-over? My filter library is DSPFilters, but it doesn't have a ready crossover. Nor can I see Linkwitz-Riley anywhere. Can you build one in AudioTK?

Post

Yes, I have LR filters. The cross over is simply compute the LP filter with fc, do the same for the HP with the same fc, and that's it. Crossover finished, you can process the different bands separately.

Post

The RBJ Eq filters are popular for this kind of thing and are used in a LOT of eq plugins.

Linkwitz-Riley also works but it messes up the phase... if that's the kind of sound you're going after, it's simple and good though.

There's also the FFT thing used in linear-phase eqs... but it has latency.

Post

The RBJ filters have to be adjusted for the frequency cut though, and you have to pay attention to their gain as well.
The LR filters phase starts transitioning earlier indeed: http://matt.eifelle.com/2015/07/28/audi ... s-filters/

Post

Fluky wrote:is doing e.g. 3-way cross-over filtering and then gaining the middle band different than having a band-shelf EQ and equalizing the "middle band" (that is, without any cross-over network)? Or is it the same procedure?
the phase response will be different. depending on what kind of crossover you use, you may either see a linear phase response with the splitting+gain approach (when you use a FIR crossover) or you may see an allpass response, even without applying any gain (when using a Linkwitz-Riley crossover - here, the split/recombine operation results in an allpass response). a typical bell/peak eq (like the RBJ ones) has a minimal phase response
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

Fluky wrote:Any ready C++ implementations for the cross-over? My filter library is DSPFilters, but it doesn't have a ready crossover. Nor can I see Linkwitz-Riley anywhere. Can you build one in AudioTK?
linkwitz/riley is actually two equal butterworth filters in series. for this reason, it's also sometimes called a butterworth-squared filter. so, having a butterworth design routine in place, you have everything you need for linkwitz/riley already
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post Reply

Return to “DSP and Plugin Development”