2 summary:: shift and stretch magnitude bin position.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_BinShift
8 Shift and stretch the positions of only the magnitude of the bins. Can be used as a very crude frequency shifter/scaler.
22 Scale bin location by factor.
27 Add an offset to bin position.
35 b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
38 SynthDef("help-magStretch", { arg out=0, bufnum=0;
40 in = LFSaw.ar(200, 0, 0.2);
41 chain = FFT(LocalBuf(2048), in);
42 chain = PV_MagShift(chain, MouseX.kr(0.25, 4, \exponential) );
43 Out.ar(out, 0.1 * IFFT(chain).dup);
48 SynthDef("help-magStretch2", { arg out=0, soundBufnum=2;
50 in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
51 chain = FFT(LocalBuf(2048), in);
52 chain = PV_MagShift(chain, MouseX.kr(0.25, 4, \exponential) );
53 Out.ar(out, 0.1 * IFFT(chain).dup);
54 }).play(s, [\soundBufnum, b]);
58 SynthDef("help-magShift", { arg out=0;
60 in = LFSaw.ar(200, 0, 0.2);
61 chain = FFT(LocalBuf(2048), in);
62 chain = PV_MagShift(chain, 1, MouseX.kr(-128, 128) );
63 Out.ar(out, 0.1 * IFFT(chain).dup);
68 SynthDef("help-magShift2", { arg out=0, soundBufnum=2;
70 in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
71 chain = FFT(LocalBuf(2048), in);
72 chain = PV_MagShift(chain, 1, MouseX.kr(-128, 128) );
73 Out.ar(out, 0.1 * IFFT(chain).dup);
74 }).play(s, [\soundBufnum, b]);