Re: [music-dsp] Splitting audio signal into N frequency bands
On 2011-11-02, Theo Verelst wrote: Given S is a linear system with the n poles given below, scetch the rough contour of the system impulse as a function of Omega on the centimeter paper Second year (from before the time that it was (wrongly) considered OK to make all MSc engineers bachelors EEs first) stupid example Include sampling considerations for the above and qualitative describe the effect of a too low sampling frequency Why do you think these questions are stupid? To my ear they seem to be addressing pertinent questions, and are geared to improve your intuitive grasp of the subject. Sure, they might be elementary in that they leave a lot out; I for certain could give some rather nasty examples with, say, bandpass delta-sigma-techniques which turn the question on its head. Even as an amateur. But I certainly wouldn't say these kinds of questions are stupid or meaningless -- far from it in fact. -- Sampo Syreeni, aka decoy - de...@iki.fi, http://decoy.iki.fi/front +358-50-5756111, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2 -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
Thilo, I would ask the question as to if your ultimate goal is really to totally and completely separate the bands, or, rather, to control levels in a subtle, musical manner. If the former, then ask yourself what happens when an instrument or voice straddles the crossover frequency, moving from one band to another. If the band borders are abrupt, when the gains are very different from band-to-band the result will be very obvious, and unnatural. On the other hand when using gradual filters for crossovers, such as first order IIR, it will be extremely unusual to notice any such effect. That's been my experience, and I have successful commercial product designs in everyday use that exploit this as a feature, not a bug. For my purposes, since a multi-band compressor is ultimately designed to be listened to, the solution that is least objectionable sonically is the one I choose. And if it is simpler, so much the better. :-) Kind Regards, David Reaves On Monday, October 31, 2011 10:47 AM Thilo K?hler koehlerth...@gmx.de wrote: Hello all! I have implemented a multi-band compressor (3 bands). However, I am not really satisfied with the splitting of the bands, they have quite a large overlap. What I do is taking the input singal, perfoming a low pass filter (say 250Hz) and use the result for the low band#1. Then I subtract the LP result from the original input and do a lowepass again with a higher frequency (say 4000Hz). The result is my mid band#2, and after subtracting again the remaining signal is my highest band#3. I assume this proceedure is appropriate, please tell me otherwise The question is now the choise of the filter. I have tried various filters from the music-dsp code archive, but i still havent found a satisfiying filter. I need a steep LP filter (12db/oct or more), without resonance and fewest ringing possible. The result subtracted from the input must works as a HP filter. Are there any concrete suggestions how such a LP filter should look like, or is there even a different, better way to split the audio signal into 3 bands (or N bands)? I know I can use FFT, but for speed reasons, I want to avoid FFT. Regards, Thilo Koehler -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
'Biquad' is a filter topology meaning the transfer function is expressed as a quadratic divided by another quadratic (biquadratic). They are pretty common in the world of digital filters because there are very simple to convert into an efficient algorithm (Direct form 1 etc...). See http://en.wikipedia.org/wiki/Digital_biquad_filter A Butterworth filter has a particular transfer function, see http://en.wikipedia.org/wiki/Butterworth_filter. I think there are a few implementations in the music DSP archives. I think David made a good point that you don't really want an aggressive cut off with your filter, since sounds which straddle the crossover frequencies can suffer quite badly. As he suggests using simpler, less aggressive filters (e.g. pretty much any first or second order iir filter) will probably be acoustically a lot nicer. Thomas -Original Message- From: music-dsp-boun...@music.columbia.edu [mailto:music-dsp-boun...@music.columbia.edu] On Behalf Of Thilo Köhler Sent: 02 November 2011 12:10 To: music-dsp@music.columbia.edu Subject: Re: [music-dsp] Splitting audio signal into N frequency bands Hello Thomas, Wen! Thank you for the quick input on this. 1. I found that in the 3-band case, splitting up the low and high band from the input and then generating the mid band by subtracting them works much better than the salami stategy (chopping off slices with a LP). Thanks! 2. Subtracting the LP part makes sense only if the LP filter is zero-phase. I dont know if my filters are zero phase, I am not that deep into the filter math to tell you straight away. It is an IIRC taken from here: http://www.musicdsp.org/showArchiveComment.php?ArchiveID=259 This one seems to work best for my purposes, but that is just from subjective listening wihtout any mathematical evidence. Is this a butterworth filter like Thomas suggests? (sorry if the question sounds like a noob...) In the comment they call it biquad, i dont know if a biquad can be butterworth or this is mutual exclusive. I have also tried: http://www.musicdsp.org/showArchiveComment.php?ArchiveID=266 Doesnt work well for low cutoff frequencies, like 150Hz. I am using single precision. http://www.musicdsp.org/showArchiveComment.php?ArchiveID=117 Seems to be too flat, not steep enough. http://www.musicdsp.org/showArchiveComment.php?ArchiveID=237 Seems to be too flat, not steep enough. I think in the use case of a mulit-band compressor, perfect reconstruction is important. That is my I want to create the band by subtracting and not with independent filters. I assume this is a good strategy, no? Regards, Thilo I believe the typical way is to directly construct a series of steep band-pass filters to cover the whole frequency range. This is very flexible but usually means the individual parts do not accurately add up to the original signal. On the other hand, if perfect sum is desirable you may wish to take a look at mirror filters, such as QMF. These are pairs of LP and HP filters designed to guarantee perfect reconstruction. -- From: Thilo K?hler koehlerth...@gmx.de Sent: Monday, October 31, 2011 10:47 AM To: music-dsp@music.columbia.edu Subject: [music-dsp] Splitting audio signal into N frequency bands Hello all! I have implemented a multi-band compressor (3 bands). However, I am not really satisfied with the splitting of the bands, they have quite a large overlap. What I do is taking the input singal, perfoming a low pass filter (say 250Hz) and use the result for the low band#1. Then I subtract the LP result from the original input and do a lowepass again with a higher frequency (say 4000Hz). The result is my mid band#2, and after subtracting again the remaining signal is my highest band#3. I assume this proceedure is appropriate, please tell me otherwise The question is now the choise of the filter. I have tried various filters from the music-dsp code archive, but i still havent found a satisfiying filter. I need a steep LP filter (12db/oct or more), without resonance and fewest ringing possible. The result subtracted from the input must works as a HP filter. Are there any concrete suggestions how such a LP filter should look like, or is there even a different, better way to split the audio signal into 3 bands (or N bands)? I know I can use FFT, but for speed reasons, I want to avoid FFT. Regards, Thilo Koehler -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
Filtering a signal x(t) with a LP filter H(z) then subtract the result from x(t) itself is equivalent to filtering x(t) with a filter 1-H(z), which is a HP filter only if H(j2*pi*f) is close to 1 in the pass band (i.e. unit gain and zero phase). Otherwise the result after subtraction will still contain substantial low-frequency components. If you want to use the subtraction method to split your signal then you need to have some idea of how much LP leak is going into 1-H(z) so that you know what outcome to expect. But is there any special reason why you want to do the subtraction? If it's perfect reconstruction you're after then quadratic mirror filters may serve all right. They're usually not very steep but are stable and reasonably well-behaved. -- From: ThiloKöhler koehlerth...@gmx.de Sent: Wednesday, November 02, 2011 12:09 PM To: music-dsp@music.columbia.edu Subject: Re: [music-dsp] Splitting audio signal into N frequency bands Hello Thomas, Wen! Thank you for the quick input on this. 1. I found that in the 3-band case, splitting up the low and high band from the input and then generating the mid band by subtracting them works much better than the salami stategy (chopping off slices with a LP). Thanks! 2. Subtracting the LP part makes sense only if the LP filter is zero-phase. I dont know if my filters are zero phase, I am not that deep into the filter math to tell you straight away. It is an IIRC taken from here: http://www.musicdsp.org/showArchiveComment.php?ArchiveID=259 This one seems to work best for my purposes, but that is just from subjective listening wihtout any mathematical evidence. Is this a butterworth filter like Thomas suggests? (sorry if the question sounds like a noob...) In the comment they call it biquad, i dont know if a biquad can be butterworth or this is mutual exclusive. I have also tried: http://www.musicdsp.org/showArchiveComment.php?ArchiveID=266 Doesnt work well for low cutoff frequencies, like 150Hz. I am using single precision. http://www.musicdsp.org/showArchiveComment.php?ArchiveID=117 Seems to be too flat, not steep enough. http://www.musicdsp.org/showArchiveComment.php?ArchiveID=237 Seems to be too flat, not steep enough. I think in the use case of a mulit-band compressor, perfect reconstruction is important. That is my I want to create the band by subtracting and not with independent filters. I assume this is a good strategy, no? Regards, Thilo I believe the typical way is to directly construct a series of steep band-pass filters to cover the whole frequency range. This is very flexible but usually means the individual parts do not accurately add up to the original signal. On the other hand, if perfect sum is desirable you may wish to take a look at mirror filters, such as QMF. These are pairs of LP and HP filters designed to guarantee perfect reconstruction. -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
Thilo, If you use traditional (analog-similar) IIR filters, you can create a simple, first-order low-pass, then subtract that signal from the original to create a perfectly-summing, complementary high-pass. This is what I usually do. To create more bands, I just do the same thing again to those signals. The crossovers in Aphex's (analog) Dominator multiband limiter use this method. My analog and digital Ariane AGC designs use it for four bands. Keep in mind that even a basic first-order filter is ultimately 20dB per decade, which really is pretty useful. When you use two-pole (second-order) filters, not only is the design more complex, you also risk phase anomalies around the crossover point, usually requiring you to invert the polarity of one of the bands. For perfect summation, you can use the same trick i.e., subtracting the two-pole low-pass from the original signal, but the resultant high-pass created will only be single-pole. If delay time is no issue, and your computing power plentiful, you can do ANYthing with FIR filters. :-) I've never had that luxury. Kind Regards, David Reaves Recklinghausen, Germany On 02 Nov 2011 14:21:21, Thilo K?hler koehlerth...@gmx.de wrote: Hello David! I would ask the question as to if your ultimate goal is really to totally and completely separate the bands, or, rather, to control levels in a subtle, musical manner. The latter case. Total seperation is NOT wanted, because a single sin-tone should not jump between two bands, if it is close to the splitting frequency. So a reasonable overlap is desired. If the former, then ask yourself what happens when an instrument or voice straddles the crossover frequency, moving from one band to another. If the band borders are abrupt, when the gains are very different from band-to-band the result will be very obvious, and unnatural. Yes. I fully agree. For my purposes, since a multi-band compressor is ultimately designed to be listened to, the solution that is least objectionable sonically is the one I choose. And if it is simpler, so much the better. :-) So, may I ask what kind of filter did you use and how your splitting strategy looks like? First order IIRC seems too flat to me, I liked second order better because the seperation is more clear. But I havent played around enough to tell if that also works best for the acutal multi-band compression. Regards, Thilo Koehler -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
On 11/2/11 2:37 PM, David Reaves wrote: When you use two-pole (second-order) filters, not only is the design more complex, you also risk phase anomalies around the crossover point, usually requiring you to invert the polarity of one of the bands. this might be when it's useful to look up Linkwitz-Riley filters. -- r b-j r...@audioimagination.com Imagination is more important than knowledge. -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
Style impression from a fist year exam from my univ. education Electrical Engineering: Given S is a linear system with the n poles given below, scetch the rough contour of the system impulse as a function of Omega on the centimeter paper Second year (from before the time that it was (wrongly) considered OK to make all MSc engineers bachelors EEs first) stupid example Include sampling considerations for the above and qualitative describe the effect of a too low sampling frequency Theo Verelst -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
[music-dsp] Splitting audio signal into N frequency bands
Hello all! I have implemented a multi-band compressor (3 bands). However, I am not really satisfied with the splitting of the bands, they have quite a large overlap. What I do is taking the input singal, perfoming a low pass filter (say 250Hz) and use the result for the low band#1. Then I subtract the LP result from the original input and do a lowepass again with a higher frequency (say 4000Hz). The result is my mid band#2, and after subtracting again the remaining signal is my highest band#3. I assume this proceedure is appropriate, please tell me otherwise The question is now the choise of the filter. I have tried various filters from the music-dsp code archive, but i still havent found a satisfiying filter. I need a steep LP filter (12db/oct or more), without resonance and fewest ringing possible. The result subtracted from the input must works as a HP filter. Are there any concrete suggestions how such a LP filter should look like, or is there even a different, better way to split the audio signal into 3 bands (or N bands)? I know I can use FFT, but for speed reasons, I want to avoid FFT. Regards, Thilo Koehler -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
I think you will get better results doing a lowpass highpass, then subtracting those from your original signal to get a middle band. For the filter I would have thought you want something as 'clean' as possible, i.e. no ripple, flat as possible in the passband and with a linear falloff (it shouldn't need to be particularly steep, but 12db/oct does sound about right). For me a Butterworth springs straight to mind, second order will give you 12db/oct. It's pretty cheap as well if that is a concern. I am interested to know how other people do the splitting into bands as well though, I plan on implementing a multiband compressor shortly myself. Multiple bandpass filters would seem logical, but there must be a bit of an issue with colouring the signal. Thomas Young -Original Message- From: music-dsp-boun...@music.columbia.edu [mailto:music-dsp-boun...@music.columbia.edu] On Behalf Of Thilo Köhler Sent: 31 October 2011 10:47 To: music-dsp@music.columbia.edu Subject: [music-dsp] Splitting audio signal into N frequency bands Hello all! I have implemented a multi-band compressor (3 bands). However, I am not really satisfied with the splitting of the bands, they have quite a large overlap. What I do is taking the input singal, perfoming a low pass filter (say 250Hz) and use the result for the low band#1. Then I subtract the LP result from the original input and do a lowepass again with a higher frequency (say 4000Hz). The result is my mid band#2, and after subtracting again the remaining signal is my highest band#3. I assume this proceedure is appropriate, please tell me otherwise The question is now the choise of the filter. I have tried various filters from the music-dsp code archive, but i still havent found a satisfiying filter. I need a steep LP filter (12db/oct or more), without resonance and fewest ringing possible. The result subtracted from the input must works as a HP filter. Are there any concrete suggestions how such a LP filter should look like, or is there even a different, better way to split the audio signal into 3 bands (or N bands)? I know I can use FFT, but for speed reasons, I want to avoid FFT. Regards, Thilo Koehler -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] Splitting audio signal into N frequency bands
Subtracting the LP part makes sense only if the LP filter is zero-phase. I believe the typical way is to directly construct a series of steep band-pass filters to cover the whole frequency range. This is very flexible but usually means the individual parts do not accurately add up to the original signal. On the other hand, if perfect sum is desirable you may wish to take a look at mirror filters, such as QMF. These are pairs of LP and HP filters designed to guarantee perfect reconstruction. -- From: Thilo Köhler koehlerth...@gmx.de Sent: Monday, October 31, 2011 10:47 AM To: music-dsp@music.columbia.edu Subject: [music-dsp] Splitting audio signal into N frequency bands Hello all! I have implemented a multi-band compressor (3 bands). However, I am not really satisfied with the splitting of the bands, they have quite a large overlap. What I do is taking the input singal, perfoming a low pass filter (say 250Hz) and use the result for the low band#1. Then I subtract the LP result from the original input and do a lowepass again with a higher frequency (say 4000Hz). The result is my mid band#2, and after subtracting again the remaining signal is my highest band#3. I assume this proceedure is appropriate, please tell me otherwise The question is now the choise of the filter. I have tried various filters from the music-dsp code archive, but i still havent found a satisfiying filter. I need a steep LP filter (12db/oct or more), without resonance and fewest ringing possible. The result subtracted from the input must works as a HP filter. Are there any concrete suggestions how such a LP filter should look like, or is there even a different, better way to split the audio signal into 3 bands (or N bands)? I know I can use FFT, but for speed reasons, I want to avoid FFT. Regards, Thilo Koehler -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp