Cabbage Logo
Back to Cabbage Site

Multiband

Hey there fellow cabbages!
Apologies if this isnt the right place to post but Im I’m dire neee for some help!

Im looking to build a multiband stereo imager however cannot find a way for csound / cabbage to analyse an incoming sound and split it into different frequency regions.

I have tried using the opcode trsplit however with no luck. Perhaps I am using it wrong or its not the right opcode. Any help would be much appreciated!

To be honest, I’m not all that familiar with multiband imaging(my producing skills are pretty minimal!). But if you need to prepare different bands from the incoming signal why not use some bandpass filters? The following code will split the incoming signal into different frequency region, 0-500Hz, 500-1500Hz and 1500-5500Hz:

aLeft, aRight ins

;first band, 0, 500hz
aBand1 butterbp (a1+a2)/2, 0, 1000
;second band, 500, 1500hz
aBand2 butterbp (a1+a2)/2, 1000, 1000
;third band, 1500, 5500hz
aBand3 butterbp (a1+a2)/2, 3500, 5000 

Once you have you bands you can do what you like with them.

You could send alternate frequency bins from pvsanal to the left and right speakers:

iFFTsize	=		2048
 fSig		pvsanal	aSig, iFFTsize,iFFTsize/4, iFFTsize, 1
 aL		pvsadsyn	fSig, iFFTsize/4, 1, 0, 2
 aR		pvsadsyn	fSig, iFFTsize/4, 1, 1, 2

Maybe this article is also of interest:
http://csoundjournal.com/issue14/PseudoStereo.html

Hey Rory,

Sorry for only getting back now, yep this works great thanks a mill for the help!

Thanks for the reply!
The article is definitely of interest cheers for getting back!