class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / PV_RectComb2.schelp
blob1f67cf3b5e1ea1dac4baac43e85876b9ea94ce5f
1 class:: PV_RectComb2
2 summary:: Make gaps in spectrum.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_RectComb
4 categories:: UGens>FFT
6 Description::
8 Alternates blocks of bins between the two inputs.
11 classmethods::
13 method::new
15 argument::bufferA
17 FFT buffer A.
20 argument::bufferB
22 FFT buffer B.
25 argument::numTeeth
27 Number of teeth in the comb.
30 argument::phase
32 Starting phase of comb pulse.
35 argument::width
37 Pulse width of the comb.
40 Examples::
42 code::
44 s.boot;
45 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
48 var exBuf;
49 Dialog.getPaths({ arg paths; //get a second soundfile;
50         paths.do({ arg p; exBuf = Buffer.read(s, p);
52                 SynthDef("help-max", { arg out=0, soundBufnum1=2, soundBufnum2 = 3;
53                         var inA, chainA, inB, chainB, chain ;
54                         inA = PlayBuf.ar(1, soundBufnum1, BufRateScale.kr(soundBufnum1), loop: 1);
55                         inB =  PlayBuf.ar(1, soundBufnum2, BufRateScale.kr(soundBufnum2), loop: 1);
56                         chainA = FFT(LocalBuf(2048), inA);
57                         chainB = FFT(LocalBuf(2048), inB);
58                         chain = PV_RectComb2(chainA, chainB,  MouseX.kr(0, 32), MouseY.kr, 0.3);
59                         Out.ar(out,  0.5 * IFFT(chain).dup);
60                 }).play(s, [\soundBufnum1, b, \soundBufnum2, exBuf]);
61         })
62 },{
63         "cancelled".postln;
64 });