Simplifying: I would like to apply the spectral harmony of one sound to another.
template = Mix(SinOsc.ar(400 * [1,1.25,1.5])/3);
source = Mix(SinOsc.ar([1000,1200])/2);
desiredResult = Mix(SinOsc.ar(([1000,1200] *.1 [1,1.25,1.5]).flat)/6);
Here I’m putting sine waves, but in the end I would like to do this with any recorded sound (both as target and source).
My idea would be:
- detect template’s fundamental freq f0
- calculate CQT for template
- shift CQT’s bins so that f0 gets into the first bin
- convolution of shifted CQT with source’s CQT: each partial from source becomes the fundamental of template’s “intervallic” spectrum.
- inverse CQT
I’m thinking of CQT because I don’t think it’s possible to create an “interval spectrum” with FFT. I would loose all the information when squeezing it down to the lowest bins
Before I dig into how to get a CQT in SuperCollider… does anyone have any easier idea?