2 summary:: Maximum magnitude.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_Add, Classes/PV_CopyPhase, Classes/PV_MagMul, Classes/PV_Min, Classes/PV_Mul
8 Output copies bins with the maximum magnitude of the two inputs.
26 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
30 Dialog.getPaths({ arg paths; //get a second soundfile;
31 paths.do({ arg p; exBuf = Buffer.read(s, p);
32 SynthDef("help-max", { arg out=0, soundBufnum1=2, soundBufnum2 = 3;
33 var inA, chainA, inB, chainB, chain ;
34 inA = PlayBuf.ar(1, soundBufnum1, BufRateScale.kr(soundBufnum1), loop: 1);
35 inB = PlayBuf.ar(1, soundBufnum2, BufRateScale.kr(soundBufnum2), loop: 1);
36 chainA = FFT(LocalBuf(2048), inA);
37 chainB = FFT(LocalBuf(2048), inB);
38 chain = PV_Max(chainA, chainB);
39 Out.ar(out, 0.1 * IFFT(chain).dup);
40 }).play(s, [\soundBufnum1, b.bufnum, \soundBufnum2, exBuf.bufnum]);