2 summary:: Random phase shifting.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_PhaseShift, Classes/PV_PhaseShift90, Classes/PV_PhaseShift270
8 Adds a different constant random phase shift to each bin. The trigger
9 will select a new set of random phases.
23 A trigger, that selects a new set of random values.
32 b = Buffer.alloc(s,2048,1);
33 c = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
38 SynthDef("help-diffuser", { arg out=0, bufnum=0 ;
40 in = Mix.ar(SinOsc.ar(200 * (1..10), 0, Array.fill(10, {rrand(0.1, 0.2)}) ));
41 chain = FFT(bufnum, in);
42 chain = PV_Diffuser(chain, MouseY.kr > 0.5 );
43 Out.ar(out, 0.5 * IFFT(chain).dup);
44 }).play(s,[\out, 0, \bufnum, b.bufnum ]);
49 SynthDef("help-diffuser2", { arg out=0, bufnum=0, soundBufnum=2;
51 in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
52 chain = FFT(bufnum, in);
53 chain = PV_Diffuser(chain, MouseY.kr > 0.5 );
54 Out.ar(out, 0.5 * IFFT(chain).dup);
55 }).play(s,[\out, 0, \bufnum, b.bufnum, \soundBufnum, c.bufnum]);