scide: implement selectionLength for openDocument
[supercollider.git] / HelpSource / Classes / PV_MagBelow.schelp
blob71d72f3200c83c2ef1f1ff0ae9bb64f383afc35a
1 class:: PV_MagBelow
2 summary:: Pass bins below a threshold.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_MagAbove, Classes/PV_LocalMax, Classes/PV_MagClip
4 categories:: UGens>FFT
6 Description::
8 Passes only bins whose magnitude is below a threshold.
11 classmethods::
13 method::new
15 argument::buffer
17 FFT buffer.
20 argument::threshold
22 Magnitude threshold.
25 Examples::
27 code::
29 s.boot;
32 b = Buffer.alloc(s,2048,1);
33 c = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
37 SynthDef("help-magBelow", { arg out=0, bufnum=0;
38         var in, chain;
39         in = SinOsc.ar(SinOsc.kr(SinOsc.kr(0.08, 0, 6, 6.2).squared, 0, 100, 800));
40         chain = FFT(bufnum, in);
41         chain = PV_MagBelow(chain, 10);
42         Out.ar(out, 0.5 * IFFT(chain).dup);
43 }).play(s,[\out, 0, \bufnum, b.bufnum]);
47 SynthDef("help-magBelow2", { arg out=0, bufnum=0;
48         var in, chain;
49         in = WhiteNoise.ar(0.2);
50         chain = FFT(bufnum, in);
51         chain = PV_MagBelow(chain, MouseX.kr(0, 7));
52         Out.ar(out, 0.5 * IFFT(chain).dup);
53 }).play(s,[\out, 0, \bufnum, b.bufnum]);
57 SynthDef("help-magBelow3", { arg out=0, bufnum=0, soundBufnum=2;
58         var in, chain;
59         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
60         chain = FFT(bufnum, in);
61         chain = PV_MagBelow(chain, MouseX.kr(0, 310));
62         Out.ar(out, 0.5 * IFFT(chain).dup);
63 }).play(s,[\out, 0, \bufnum, b.bufnum, \soundBufnum, c.bufnum]);