DSPRelated.com
Forums

How to divide signal into separate subbands?

Started by jungledmnc July 10, 2008

jungledmnc wrote:

> Hi, > I'm thinking (just teoretically) how to make e.g. an audio multiband > compressor - so divide signal into a few subbands (e.g. 0-200Hz, > 200Hz-1000Hz, 1kHz-..)
If this is just the theory, then you can assume that the signal is perfectly divided into the infinite number of subbands.
>, modify each subband and then mix it together. > Logically if no change is made, resulting signal must be equal to the > original (phase changes? who knows, rather not).
What do you want to accomplish?
> So for example I can use DFT, zero the rest except requested band, IDFT > each band, perform some modifications, DFT it again, zero the rest again, > create resulting frequency domain signal using all of the bands and IDFT to > get the final results...
This can work.
> Well, sounds pretty slow... Also you cannot set > accurate frequency limits.
"Slow" and "not accurate" are not the design parameters.
> Another way is to use some kind of bandpass.
This works, too.
> Problem is, how to get filter > with cutoff fast enough.
"fast enough" is not the design parameter.
> I have read a few texts about filters, there are > lots of stuff like chebyshev etc., but I haven't find really practical > filter for this case.
"Nothing is more practical then a good theory" (c) Boltzmann
> > Please help :-).
Please send me money. Here is some meat to chew: Apply the inverse LPC filter to the signal, then apply the compressor to the LPC residual, then apply the LPC filter. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Rune Allnor wrote:

> On 10 Jul, 13:26, "jungledmnc" <jungled...@gmail.com> wrote: >> Hi, >> I'm thinking (just teoretically) how to make e.g. an audio multiband >> compressor - so divide signal into a few subbands (e.g. 0-200Hz, >> 200Hz-1000Hz, 1kHz-..), modify each subband and then mix it together. > > What do you mean by 'compressor'? Reduce the amount of data? > Some audio effect?
Almost certainly an audio effect. Dynamic Range Compression. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code." -- Paul Graham
On Jul 10, 11:09&#4294967295;pm, Erik de Castro Lopo <nos...@mega-nerd.com> wrote:
> Rune Allnor wrote: > > On 10 Jul, 13:26, "jungledmnc" <jungled...@gmail.com> wrote: > >> Hi, > >> I'm thinking (just teoretically) how to make e.g. an audio multiband > >> compressor - so divide signal into a few subbands (e.g. 0-200Hz, > >> 200Hz-1000Hz, 1kHz-..), modify each subband and then mix it together. > > > What do you mean by 'compressor'? Reduce the amount of data? > > Some audio effect? > > Almost certainly an audio effect. Dynamic Range Compression. > > Erik > -- > ----------------------------------------------------------------- > Erik de Castro Lopo > ----------------------------------------------------------------- > "The object-oriented model makes it easy to build up programs by > accretion. What this often means, in practice, is that it provides > a structured way to write spaghetti code." -- Paul Graham
I would avoid multi-rate filterbanks that are critically decimated. Yes, they give great frequency resolution, but since you are independantly processing each band, you will get incomplete alias cancellation as well as time-domain effects. Especially avoid QMF filterbanks based on IIR filters (I tried this recently and was shocked at how bad it sounded). This simplest thing to do is to mine the literature on crossover filters. In my opinion the audible effects of not having linear phase in the summed result are far less than the effects you will get with multi-rate analysis/synthesis filterbanks. The AES journal is a good source for crossover filter topologies, and I recall recently that there were some new filter topologies that had a better phase characteristics than Linkwitz/Riley. Another thing to consider is whether or not you really want sharp filters to being with. Imagine that in the band from 100hz to 400 hz, you have a 3:1 compression characteristic, and from 300Hz to 600Hz you have a 2:1 characteristic. If you are using very sharp filters, then if you play a piano scale and cross the boundary, you really don't want one note to fall completely in the lower band and the next note fall completely in the higher band; you end up with complketely different gains, which will sound very un-natural. Another approach is rather radical but used commercially by some broadcast compressors (Orban). Shift the entire audio signal up to a very high frequency like 192KHz (obviously you must interpolate the signal to a high sample-rate first, and use a Hilbert Transform method to do SSB frequency translation). Then apply this interpolated signal to a simple compressive non-linearity (memoryless). Then apply the signal to a bandpass filter with width 20KHz and centered on the audio signal at 192K. Then frequency shift back down and decimate. The way this works is that the distortion and intermodulation products that result from the compressive non-linearity are all outside the 20KHz band centered up at 192KHz, so they get removed by the bandpass filter. When you test such a system out with a sine-wave input, you find that as you increase the input sine-wave amplitude, the output level is compressed without any apparent distortion. If you input multiple sine-waves, the intermodulation products are also supressed because they fall outside the 20K band centered at the high frequency. This is probably too much complexity for your system, but I always thought ir was a cool concept. Bob Adams

Robert Adams wrote:


> Another approach is rather radical but used commercially by some > broadcast compressors (Orban). Shift the entire audio signal up to a > very high frequency like 192KHz (obviously you must interpolate the > signal to a high sample-rate first, and use a Hilbert Transform method > to do SSB frequency translation). Then apply this interpolated signal > to a simple compressive non-linearity (memoryless). Then apply the > signal to a bandpass filter with width 20KHz and centered on the audio > signal at 192K. Then frequency shift back down and decimate.
The SSB limiter is equvalent to limiting of the complex amplitude while keeping the complex phase. There is no need to do the SSB upconversion; Hilbert transform can be done in the baseband.
> The way this works is that the distortion and intermodulation products > that result from the compressive non-linearity are all outside the > 20KHz band centered up at 192KHz, so they get removed by the bandpass > filter. When you test such a system out with a sine-wave input, you > find that as you increase the input sine-wave amplitude, the output > level is compressed without any apparent distortion. If you input > multiple sine-waves, the intermodulation products are also supressed > because they fall outside the 20K band centered at the high frequency.
This is not right. The complex limiting eliminates only the products of the low even orders; the products of the odd orders and higher even orders still fall in the bandwidth of the signal.
> This is probably too much complexity for your system, but I always > thought ir was a cool concept.
Well the complex limiting is definitely better then the simple limiting, however it is not free from the artifacts. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Sat, 12 Jul 2008 03:51:39 -0700 (PDT), Robert Adams
<robert.adams@analog.com> wrote:

>I would avoid multi-rate filterbanks that are critically decimated. >Yes, they give great frequency resolution, but since you are >independantly processing each band, you will get incomplete alias >cancellation as well as time-domain effects. Especially avoid QMF >filterbanks based on IIR filters (I tried this recently and was >shocked at how bad it sounded).
This is exactly the sort of thing that I meant when I wrote, "... be prepared to deal with time domain issues."
>This simplest thing to do is to mine the literature on crossover >filters.
Given that the OP was asking a fundamental question like, "How do I divide the bands," I agree that a crossover approach is most appropriate. It's simple, intuitive, and readily available in the literature.
>Another thing to consider is whether or not you really want sharp >filters to being with. Imagine that in the band from 100hz to 400 hz, >you have a 3:1 compression characteristic, and from 300Hz to 600Hz you >have a 2:1 characteristic.
Also consider that the individual crossover filters will probably be either 3dB or 6dB down at the crossover frequencies. Suppose that you are implementing a hard-knee limiter instead of a compressor. Your signal is 5dB ABOVE the threshold, but it falls at exactly the crossover frequency. Well, in the lower band the signal registers 1dB below the threshold because the crossover filter attenuates it by 6dB at that frequency; same in the upper band. End result is that the signal is NOT limited in either band. In other words, as you indicate, band-edge effects are always a problem in multiband dynamic range compressors. Greg Berchin