linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / PV_RandComb.schelp
blob46a143d264b20e7d198f0b44e875fe5071928653
1 class:: PV_RandComb
2 summary:: Pass random bins.
3 related:: Classes/PV_RandWipe
4 categories:: UGens>FFT
6 Description::
8 Randomly clear bins.
11 classmethods::
13 method::new
15 argument::buffer
17 FFT buffer.
20 argument::wipe
22 Clears bins from input in a random order as wipe goes from 0 to
26 argument::trig
28 A trigger, that selects a new random ordering.
31 Examples::
33 code::
35 s.boot;
38 b = Buffer.alloc(s,2048,1);
39 c = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
43 SynthDef("help-randcomb", { arg out=0, bufnum=0;
44         var in, chain;
45         in = {WhiteNoise.ar(0.8)}.dup;
46         chain = FFT(bufnum, in);
47         chain = PV_RandComb(chain, 0.95, Impulse.kr(0.4));
48         Out.ar(out, IFFT(chain).dup);
49 }).play(s,[\out, 0, \bufnum, b.bufnum]);
53 //trig with MouseY
54 SynthDef("help-randcomb2", { arg out=0, bufnum=0, soundBufnum=2;
55         var in, chain;
56         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
57         chain = FFT(bufnum, in);
58         chain = PV_RandComb(chain, MouseY.kr, Impulse.kr(0.4));
59         Out.ar(out, IFFT(chain).dup);
60 }).play(s,[\out, 0, \bufnum, b.bufnum, \soundBufnum, c.bufnum]);