linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / PV_MagClip.schelp
blob5bbf1d38b43f00ea99583f727c9fb20ea5ace173
1 class:: PV_MagClip
2 summary:: Clip bins to a threshold.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_MagAbove, Classes/PV_LocalMax, Classes/PV_MagBelow
4 categories:: UGens>FFT
6 Description::
8 Clips bin magnitudes to a maximum 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;
30 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
33         var in, chain;
34         in = Mix.arFill(3, { LFSaw.ar(exprand(100, 500), 0, 0.1); });
35         chain = FFT(LocalBuf(2048), in);
36         chain = PV_MagClip(chain, MouseX.kr(0, 15));
37         Out.ar(out, 0.5 * IFFT(chain).dup);
38 }).play(s);
42 SynthDef("help-magClip2", { arg out=0, soundBufnum=2;
43         var in, chain;
44         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
45         chain = FFT(LocalBuf(2048), in);
46         chain = PV_MagClip(chain, MouseX.kr(0, 50));
47         Out.ar(out, 0.5 * IFFT(chain).dup);
48 }).play(s, [\soundBufnum, b]);