linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / PV_BinWipe.schelp
blob167aa924d1ff767be7d02dcd6dad8e96a3f461c9
1 class:: PV_BinWipe
2 summary:: Combine low and high bins from two inputs.
3 categories:: UGens>FFT
5 Description::
7 Copies low bins from one input and the high bins of the other.
10 classmethods::
12 method::new
14 argument::bufferA
16 FFT buffer A.
19 argument::bufferB
21 FFT buffer B.
24 argument::wipe
26 Can range between -1 and +1.
30 code::wipe::  == 0, then the output is the same
32 code::bufferA:: .
36 code::wipe::  > 0, then it begins replacing
37 with bins from
38 code::bufferB::  from the bottom up.
42 code::wipe::  < 0, then it begins replacing
43 with bins from
44 code::bufferB::  from the top down.
47 Examples::
49 code::
50 s.boot;
51 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
54 SynthDef("help-binWipe", { arg out=0;
55         var inA, chainA, inB, chainB, chain;
56         inA = WhiteNoise.ar(0.2);
57         inB = LFSaw.ar(100, 0, 0.2);
58         chainA = FFT(LocalBuf(2048), inA);
59         chainB = FFT(LocalBuf(2048), inB);
60         chain = PV_BinWipe(chainA, chainB, MouseX.kr(-1, 1));
61         Out.ar(out, 0.1 * IFFT(chain).dup);
62 }).play(s);
66 SynthDef("help-binWipe2", { arg out=0, soundBufnum=2;
67         var inA, chainA, inB, chainB, chain;
68         inA = WhiteNoise.ar(0.2);
69         inB = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
70         chainA = FFT(LocalBuf(2048), inA);
71         chainB = FFT(LocalBuf(2048), inB);
72         chain = PV_BinWipe(chainA, chainB, MouseX.kr(-1, 1));
73         Out.ar(out, 0.1 * IFFT(chain).dup);
74 }).play(s, [\soundBufnum, b]);