linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / PV_Min.schelp
blobd9b4bf89c4312d762f49123d84ce66af752b0854
1 class:: PV_Min
2 summary:: Minimum magnitude.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_Add, Classes/PV_CopyPhase, Classes/PV_MagMul, Classes/PV_Max, Classes/PV_Mul
4 categories:: UGens>FFT
6 Description::
8 Output copies bins with the minimum magnitude of the two inputs.
11 classmethods::
13 method::new
15 argument::bufferA
16 FFT buffer A.
18 argument::bufferB
19 FFT buffer B.
21 Examples::
23 code::
25 s.boot;
26 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
29 var exBuf;
30 Dialog.getPaths({ arg paths; //get a second soundfile;
31         paths.do({ arg p; exBuf = Buffer.read(s, p);
32                 SynthDef("help-min", { arg out=0, soundBufnum1=2, soundBufnum2 = 3;
33                         var inA, chainA, inB, chainB, chain ;
34                         inA = PlayBuf.ar(1, soundBufnum1, BufRateScale.kr(soundBufnum1), loop: 1);
35                         inB =  PlayBuf.ar(1, soundBufnum2, BufRateScale.kr(soundBufnum2), loop: 1);
36                         chainA = FFT(LocalBuf(2048), inA);
37                         chainB = FFT(LocalBuf(2048), inB);
38                         chain = PV_Min(chainA, chainB);
39                         Out.ar(out,  0.1 * IFFT(chain).dup);
40                 }).play(s,[\soundBufnum1, b.bufnum, \soundBufnum2, exBuf.bufnum]);
41         })
42 },{
43         "cancelled".postln;
44 });
47 b.free