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. Logically if no change is made, resulting signal must be equal to the original (phase changes? who knows, rather not). 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... Well, sounds pretty slow... Also you cannot set accurate frequency limits. Another way is to use some kind of bandpass. Problem is, how to get filter with cutoff fast enough. 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. Please help :-).
How to divide signal into separate subbands?
Started by ●July 10, 2008
Reply by ●July 10, 20082008-07-10
"jungledmnc" <jungledmnc@gmail.com> wrote in message news:t_6dnXSoT_Wfb-jVnZ2dnUVZ_jidnZ2d@giganews.com...> > Another way is to use some kind of bandpass. Problem is, how > to get filter > with cutoff fast enough. 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. > > Please help :-).What is the result that you are trying to accomplish?
Reply by ●July 10, 20082008-07-10
On Jul 10, 7:26 am, "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. > Logically if no change is made, resulting signal must be equal to the > original (phase changes? who knows, rather not). > > 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... Well, sounds pretty slow... Also you cannot set > accurate frequency limits. > > Another way is to use some kind of bandpass. Problem is, how to get filter > with cutoff fast enough. 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. > > Please help :-).Sounds like what you might want is a "perfect reconstruction filter bank." Your suggested DFT/zero/IDFT approach will probably not give you what you want. You will see ringing in the time domain due to the sharp transitions in your frequency domain filter (a rectangle, whose impulse response is a sinc). Jason
Reply by ●July 10, 20082008-07-10
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?> Logically if no change is made, resulting signal must be equal to the > original (phase changes? who knows, rather not).What about lossy compression (if data compression is indeed what you attempt to do)?> 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...I'll almost guarantee you will end up with ringing and other bad stuff in time doamain if you just zero out DFT coefficients.> Well, sounds pretty slow..What do you try to accomplish by this algorithm?> Also you cannot set > accurate frequency limits.Why do you need accurate frequency limits? Steep filter flanks is one more of those things that tend to make a mess in time domain.> Another way is to use some kind of bandpass. Problem is, how to get filter > with cutoff fast enough.What do you mean by 'cutoff fast enough'? Do you mean 'steep rolloff' or 'computationally cheap'? If the former, there are very good reasons for people not using them. If the latter, you haven't looked hard enough. ? 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.Look up quadrature filter banks and subband coders. Maybe you fuind something useful there. But first of all, make up your mind about what you want to do. Then re-read this post and come up with answers to all the 'why?'s and 'what?'s. Not because I'm intersted in the answers (I'm not) but because you need to be aware of them to have any hope of solving whatever problem you have set up for yourself. Rune
Reply by ●July 10, 20082008-07-10
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. > Logically if no change is made, resulting signal must be equal to the > original (phase changes? who knows, rather not).As Jason has mentioned, you want a "perfect reconstruction filter bank". Since you want to process audio, you could use a wavelet-based filter bank approach. You can easily make a perfect reconstruction filter bank out of a bunch of linear-phase lowpass FIR filters - this gives you the most flexibility in the design of the filter bank. I had to use a multirate filter-bank (not wavelet-based) for a multiband audio compressor because of the low frequencies involved (100Hz lowpass at 96kHz sampling rate makes for a long FIR if you want reasonable performance). Multirate FB are efficient to compute but a bitch to implement.> > 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... Well, sounds pretty slow... Also you cannot set > accurate frequency limits.???> > Another way is to use some kind of bandpass. Problem is, how to get filter > with cutoff fast enough. 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.Multiband compressors have been around for some time now. Try DAFX. Surely you'll find something with Google. Is this a real-time project? Regards, Andor
Reply by ●July 10, 20082008-07-10
On Jul 10, 7:26�am, "jungledmnc" <jungled...@gmail.com> wrote:> 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. > Logically if no change is made, resulting signal must be equal to the > original (phase changes? who knows, rather not).Start out with something simple. Implement a multiband Linkwitz-Riley crossover, maybe 4th order. The bands sum to allpass, so you'll have overall phase shift but you might find that you don't care. If the rolloff isn't steep enough, increase the filter order. If you can't tolerate the phase shift, then investigate perfect reconstruction filters but be prepared to deal with time domain issues. Greg
Reply by ●July 10, 20082008-07-10
>As Jason has mentioned, you want a "perfect reconstruction filter >bank". Since you want to process audio, you could use a wavelet-based >filter bank approach. You can easily make a perfect reconstruction >filter bank out of a bunch of linear-phase lowpass FIR filters - this >gives you the most flexibility in the design of the filter bank. I had >to use a multirate filter-bank (not wavelet-based) for a multiband >audio compressor because of the low frequencies involved (100Hz >lowpass at 96kHz sampling rate makes for a long FIR if you want >reasonable performance). Multirate FB are efficient to compute but a >bitch to implement.Well, so called "filter bank" is probably exactly what I need. You know, there is nothing so high-class-technical. As you have mentioned, multi-band compressors are nothing new. However I used it as an example, because dividing into frequency bands could be used for several cool things. So the main question is - HOW TO IMPLEMENT A FILTER BANK? :-) Specifically what kind of filter should I use (practical text would be great since I'm really not into the hardcore matematical stuff, I can understand, but it takes too much time :-)). Btw. would it be stable? Some people have written that DFT would cause ringing (which I understand), but wouldn't this do similar artefacts? Thanks.
Reply by ●July 10, 20082008-07-10
On 10 Jul., 15:44, Greg Berchin <gberc...@sentientscience.com> wrote:> On Jul 10, 7:26�am, "jungledmnc" <jungled...@gmail.com> wrote: > > > 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. > > Logically if no change is made, resulting signal must be equal to the > > original (phase changes? who knows, rather not). > > Start out with something simple. �Implement a multiband Linkwitz-Riley > crossover, maybe 4th order. �The bands sum to allpass, so you'll have > overall phase shift but you might find that you don't care. �If the > rolloff isn't steep enough, increase the filter order. �If you can't > tolerate the phase shift, then investigate perfect reconstruction > filters but be prepared to deal with time domain issues.I wouldn't use LR, because the sum of the low- and high-pass filters might cause significant overshoot of the audio signal (have you seen the output of the LR allpass filter with a square wave input?). A simple two-band filter bank can be implemented with the binomial averaging lowpass h1 = [1/4 1/2 1/4] and the corresponding second difference highpass h2 = [-1/4 1/2 -1/4]. If you sum their outputs, you get the identity. Also, their outputs are guaranteed not to overshoot, which is important if the application is multiband compression. So, jungledmnc, would you know how to implement a bandsplit with the above two simple filters? Regards, Andor
Reply by ●July 10, 20082008-07-10
>I wouldn't use LR, because the sum of the low- and high-pass filters >might cause significant overshoot of the audio signal (have you seen >the output of the LR allpass filter with a square wave input?). > >A simple two-band filter bank can be implemented with the binomial >averaging lowpass > >h1 =3D [1/4 1/2 1/4] > >and the corresponding second difference highpass > >h2 =3D [-1/4 1/2 -1/4]. > >If you sum their outputs, you get the identity. Also, their outputs >are guaranteed not to overshoot, which is important if the application >is multiband compression. > >So, jungledmnc, would you know how to implement a bandsplit with the >above two simple filters? > >Regards, >AndorThanks a lot. I don't know, what the notation means, but isn't it a simple FIR with 3-taps as defined? If it is so, then I need to be able to set the frequency limits ('cos this would be let's say SR/4, or something). Well, and if it is not so, then I don't understand :-). And in this case can u give me a hint? (online introduction or whatever)... Thx
Reply by ●July 10, 20082008-07-10
On Jul 10, 10:23�am, Andor <andor.bari...@gmail.com> wrote:> I wouldn't use LR, because the sum of the low- and high-pass filters > might cause significant overshoot of the audio signal (have you seen > the output of the LR allpass filter with a square wave input?).Sure. I've written papers about it. But it's the classic tradeoff between frequency domain performance and time domain performance that every crossover topology strives to optimize in one way or another. With Linkwitz-Riley the OP has a lot of published info to guide his efforts, minimizing his need to invent things before he gets a good understanding of the tradeoffs involved. Greg






