Split Audio into 8 frequency blocks
I'm just trying a couple of quick proof of concepts for a bigger idea.
What I'd like to do is split an audio stream (aif file for now) into 8 equal frequency blocks and then apply treatments or use those audio segments separately.
Over the weekend I got something working, using fffb~ that seems to give me what I want, but I'm unsure about a couple of things. The demo patch just makes a visualizer of sorts.
There's a video and a picture of the patch here:
What is the relationship of Q to the frequency? I understand I can't get sharp cut offs, but if I want somewhat self contained blocks of frequency, whats the best Q value to pass into ~fffb?
Maybe try something along the lines of [pfft~] it might give you a bit more control. Have a look through the built-in tutorials, MSP tutorials 25 and 26 should give you something to start with.
I looked at pfft and fft and 25 and 26, but they seem to be more focused on the visualizations of sound rather than the actual sound. The tutorial 25 even says you wouldn't want to listen to the output of fft as it won't sound like the original, it's the amplitude within a frequency.
Maybe my proof of concept gives the wrong impression, the final project will not use the amplitude of a frequency range, it'll use the actual audio from that range, I'll be rooting the outs from fffb to 8 dacs.
i am working along these lines regularily, so i am sure pfft~does the job quite fine.
my installation circle_of_fifths uses this technique to extract individula pitches from orchestral recordings:
http://www.hans-w-koch.org/installations/circle_of_fifths.html
to get you started:
save this as spectralbandpass1~
and create a pfft~ with its name. lower/upper edge are the frequency boundaries for the signal going in the first inlet. you can easily expand this to 8 bands by sticking more "p spectralband" in it and consequently more inlets for lower/upper and outlets.
hth
hans
Hans, that is awesome, and exactly the point in the right direction I needed.
I added your code to this patch, as a proof of concept and it tracks perfectly.
Now I just need to get 1 in, 8 outs and I'm there. Oh and see if I can work out what your code actually does. I don't mind saying that fft makes absolutely no sense to me.
Hans, I think you just saved my life.
was your life being threatened by the attack of the evil combined bins? :-)
but glad it helped you.
hans