QcPenPrinter: no need to allocate QPrintDialog on heap
[supercollider.git] / HelpSource / Classes / PV_MagAbove.schelp
blob125a46a2c83d677a32ee8bc6747cfbf05f869929
1 class:: PV_MagAbove
2 summary:: Pass bins above a threshold.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_LocalMax, Classes/PV_MagBelow, Classes/PV_MagClip
4 categories:: UGens>FFT
6 Description::
8 Passes only bins whose magnitude is above 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;
30 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
34 SynthDef("help-magAbove", { arg out=0;
35         var in, chain;
36         in = SinOsc.ar(SinOsc.kr(SinOsc.kr(0.08, 0, 6, 6.2).squared, 0, 100, 800));
37         //in = WhiteNoise.ar(0.2);
38         chain = FFT(LocalBuf(2048), in);
39         chain = PV_MagAbove(chain, 310);
40         Out.ar(out, 0.1 * IFFT(chain).dup);
41 }).play(s);
45 SynthDef("help-magAbove2", { arg out=0;
46         var in, chain;
47         in = WhiteNoise.ar(0.2);
48         chain = FFT(LocalBuf(2048), in);
49         chain = PV_MagAbove(chain, MouseX.kr(0, 10));
50         Out.ar(out, 0.1 * IFFT(chain).dup);
51 }).play(s);
55 SynthDef("help-magAbove3", { arg out=0, soundBufnum=2;
56         var in, chain;
57         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
58         chain = FFT(LocalBuf(2048), in);
59         chain = PV_MagAbove(chain, MouseX.kr(0, 310));
60         Out.ar(out, 0.1 * IFFT(chain).dup);
61 }).play(s, [\soundBufnum, b]);