{
   "code" : "// By Nathaniel Virgo\r\n// https://listarc.cal.bham.ac.uk/lists/sc-users-2009/msg55766.html\r\n\r\n// This comes from the mailing list as an attempt to simulate the vst Shapee\r\n\r\n(\r\ns.boot.doWhenBooted {\r\nc = Buffer.read(s,\"sounds/a11wlk01.wav\");\r\n}\r\n)\r\n\r\n(\r\nx = {\r\n    // parameters to play with - width should be an integer - I think 4 is the theoretical optimum\r\n    var fftsize = 512, width=4;\r\n\r\n    var in, chain, in2, chain2, out;\r\n\r\n    // timbre source - vocal sample\r\n    in = PlayBuf.ar(1, c, BufRateScale.kr(c), loop: 1);\r\n\r\n    // pitch source - random polyphonic line\r\n    in2 = Saw.ar(LFNoise0.ar(1!3).exprange(100,5000)).mean;\r\n\r\n    chain = FFT(LocalBuf(fftsize), in, wintype:1);       \r\n    chain2 = FFT(LocalBuf(fftsize), in2, wintype:1);\r\n   \r\n    chain = chain.pvcalc2(chain2, fftsize, {|e_mags, e_phases, f_mags, f_phases|\r\n\r\n        var fbins = e_mags.clump(width).collect(_.sum) / f_mags.clump(width).collect(_.sum);\r\n       \r\n        [f_mags*fbins.stutter(width), f_phases];\r\n        //[e_mags, f_phases];\r\n    });\r\n       \r\n\r\n    out = IFFT(chain);\r\n    Out.ar(0, 0.5 * out.dup);\r\n}.play(s);\r\n)",
   "is_private" : null,
   "id" : "1-5hg",
   "labels" : [
      "fft",
      "spectral crosssynthesis",
      "spectral",
      "phase vocoder"
   ],
   "ancestor_list" : [],
   "description" : "By Nathaniel Virgo. See https://listarc.cal.bham.ac.uk/lists/sc-users-2009/msg55766.html\r\n\r\nThis comes from the mailing list as an attempt to simulate the vst Shapee.",
   "author" : "zecraum",
   "name" : "Spectral Cross-Synthesis"
}
