sclang: ServerShmInterface - try to avoid multiple destructor calls
[supercollider.git] / HelpSource / Classes / PV_RectComb.schelp
blobc94e9a6f1ce5ae72b241b934cf2d373d14d0660e
1 class:: PV_RectComb
2 summary:: Make gaps in spectrum.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_RectComb2
4 categories:: UGens>FFT
6 Description::
8 Makes a series of gaps in a spectrum.
11 classmethods::
13 method::new
15 argument::buffer
17 FFT buffer.
20 argument::numTeeth
22 Number of teeth in the comb.
25 argument::phase
27 Starting phase of comb pulse.
30 argument::width
32 Pulse width of the comb.
35 Examples::
37 code::
39 s.boot;
41 b = Buffer.alloc(s,2048,1);
44 SynthDef("help-rectcomb", { arg out=0, bufnum=0;
45         var in, chain;
46         in = {WhiteNoise.ar(0.2)}.dup;
47         chain = FFT(bufnum, in);
48         chain = PV_RectComb(chain, 8, LFTri.kr(0.097, 0, 0.4, 0.5),
49                 LFTri.kr(0.24, 0, -0.5, 0.5));
50         Out.ar(out, IFFT(chain).dup);
51 }).play(s,[\out, 0, \bufnum, b.bufnum]);
55 SynthDef("help-rectcomb2", { arg out=0, bufnum=0;
56         var in, chain;
57         in = {WhiteNoise.ar(0.2)}.dup;
58         chain = FFT(bufnum, in);
59         chain = PV_RectComb(chain,  MouseX.kr(0, 32), MouseY.kr, 0.2);
60         Out.ar(out, IFFT(chain).dup);
61 }).play(s,[\out, 0, \bufnum, b.bufnum]);