2 summary:: Pass bins which are a local maximum.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_MagAbove, Classes/PV_MagBelow, Classes/PV_MagClip
8 Passes only bins whose magnitude is above a threshold and above their nearest neighbors.
29 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
33 SynthDef("help-localMax", { arg out=0;
35 in = Mix.arFill(3, { LFSaw.ar(exprand(100, 500), 0, 0.1); });
36 chain = FFT(LocalBuf(2048), in);
37 chain = PV_LocalMax(chain, MouseX.kr(0, 50));
38 Out.ar(out, 0.5 * IFFT(chain).dup);
43 SynthDef("help-localMax2", { arg out=0, soundBufnum=2;
45 in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
46 chain = FFT(LocalBuf(2048), in);
47 chain = PV_LocalMax(chain, MouseX.kr(0, 100));
48 Out.ar(out, 0.1 * IFFT(chain).dup);
49 }).play(s, [\soundBufnum, b]);