I often find myself wanting to apply processing to specific frequency bands. I was wondering what is the best way to split a track into separate tracks containing different frequency bands so that it can be recombined with minimal artifacts?
The first step is to duplicate the track according to the number of bands you wish eventually.
Then follows the separation per high/low-pass filtering.
(the code snippets are for the Nyquist Prompt)
(lp s 500)
(hp s 500)
Those are the filters with the flattest slope, i.e. 6 dB per octave and the separation is therefore fairly poor.
You can replace them with those for 12,24, 36 or 48 dB, namely
(high-/)lowpass2, lowpass4, lowpass6 or lowpass8.
Unfortunately, these filters are not complementary–they do not add up to one.
The trick is to use just one of them and to take the difference.
(lowpass8 s 500)
(diff s (lowpass8 s 500))
Things get a little complicated when you want multiple bands. You’ve essentially to redo the previous separation in order to split further apart.
This is due to the phase shifts introduced.
You could also use FIR filters instead of IIRs that do have a linear phase response.