2 summary:: Multiply magnitudes.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_Add, Classes/PV_CopyPhase, Classes/PV_Max, Classes/PV_Min, Classes/PV_Mul
8 Multiplies magnitudes of two inputs and keeps the phases of the first input.
26 b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
29 SynthDef("help-magMul", { arg out=0;
30 var inA, chainA, inB, chainB, chain;
31 inA = WhiteNoise.ar(0.2);
32 inB = LFSaw.ar(100, 0, 0.2);
33 chainA = FFT(LocalBuf(2048), inA);
34 chainB = FFT(LocalBuf(2048), inB);
35 chain = PV_MagMul(chainA, chainB);
36 Out.ar(out, 0.1 * IFFT(chain).dup);
41 SynthDef("help-magMul2", { arg out=0, soundBufnum=2;
42 var inA, chainA, inB, chainB, chain;
43 inA = LFSaw.ar([100, 150], 0, 0.2);
44 inB = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
45 chainA = FFT(LocalBuf(2048), inA);
46 chainB = FFT(LocalBuf(2048), inB);
47 chain = PV_MagMul(chainA, chainB);
48 Out.ar(out, 0.03 * IFFT(chain));
49 }).play(s, [\soundBufnum, b.bufnum]);