2 summary:: Copy magnitudes and phases.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_Add, Classes/PV_MagMul, Classes/PV_Max, Classes/PV_Min, Classes/PV_Mul
8 Combines magnitudes of first input and phases of the second input.
25 b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
28 SynthDef("help-copyPhase", { arg out=0;
29 var inA, chainA, inB, chainB, chain;
30 inA = SinOsc.ar(SinOsc.kr(SinOsc.kr(0.08, 0, 6, 6.2).squared, 0, 100, 800));
31 inB = WhiteNoise.ar(0.2);
32 chainA = FFT(LocalBuf(2048), inA);
33 chainB = FFT(LocalBuf(2048), inB);
34 chain = PV_CopyPhase(chainA, chainB);
35 Out.ar(out, 0.1 * IFFT(chain).dup);
40 SynthDef("help-copyPhase2", { arg out=0, soundBufnum=2;
41 var inA, chainA, inB, chainB, chain;
42 inA = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
43 inB = SinOsc.ar(SinOsc.kr(SinOsc.kr(0.08, 0, 6, 6.2).squared, 0, 100, 800));
44 chainA = FFT(LocalBuf(2048), inA);
45 chainB = FFT(LocalBuf(2048), inB);
46 chain = PV_CopyPhase(chainA, chainB);
47 Out.ar(out, 0.1 * IFFT(chain).dup);
48 }).play(s, [\soundBufnum, b]);