sclang: ServerShmInterface - try to avoid multiple destructor calls
[supercollider.git] / HelpSource / Classes / PV_BinScramble.schelp
blob263ce27962d5e4782d898f7e0fcb35e070e0561a
1 class:: PV_BinScramble
2 summary:: Scramble bins.
3 categories:: UGens>FFT
5 Description::
7 Randomizes the order of the bins. The trigger will select a new random ordering.
10 classmethods::
12 method::new
14 argument::buffer
16 FFT buffer.
19 argument::wipe
21 Scrambles more bins as wipe moves from 0 to 1.
24 argument::width
26 A value from zero to one, indicating the maximum randomized
27 distance of a bin from its original location in the spectrum.
30 argument::trig
32 A trigger, that selects a new random ordering.
35 Examples::
37 code::
39 s.boot;
40 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
43 //trig with MouseY
44 SynthDef("help-binScramble", { arg out=0, soundBufnum=2;
45         var in, chain;
46         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
47         chain = FFT(LocalBuf(2048), in);
48         chain = PV_BinScramble(chain, MouseX.kr , 0.1, MouseY.kr > 0.5 );
49         Out.ar(out, 0.1 * IFFT(chain).dup);
50 }).play(s, [\soundBufnum, b]);