2 summary:: Division of magnitudes
6 Divides magnitudes of two inputs and keeps the phases of the first input.
17 number to use when bins are zeroed out, i.e. causing division by zero (defaults to 0.0001)
24 SynthDef("help-magMul", { arg out=0;
25 var inA, chainA, inB, chainB, chain;
26 inA = WhiteNoise.ar(0.2);
27 inB = LFSaw.ar(100, 0, 0.2);
28 chainA = FFT(LocalBuf(2048), inA);
29 chainB = FFT(LocalBuf(2048), inB);
30 chain = PV_MagDiv(chainA, chainB);
31 Out.ar(out, 0.5 * IFFT(chain).dup);
36 c = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
39 SynthDef("help-magMul2", { arg out=0, soundBufnum=0;
40 var inA, chainA, inB, chainB, chain;
41 inA = LFSaw.ar([100, 150], 0, 0.2);
42 inB = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
43 chainA = FFT(LocalBuf(2048), inA);
44 chainB = FFT(LocalBuf(2048), inB);
45 chain = PV_MagDiv(chainA, chainB);
46 Out.ar(out, 0.1 * IFFT(chain));
47 }).play(s,[\out, 0, \soundBufnum, c]);