2 summary:: Shift and stretch bin position.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_MagShift
8 Shift and scale the positions of the bins. Can be used as a very crude
9 frequency shifter/scaler.
23 Scale bin location by factor.
28 Add an offset to bin position.
32 Set to 0 (default) for no interpolation, or 1 to linear-interpolate between bins.
42 c = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
46 SynthDef("help-binStretch", { arg out=0;
48 in = LFSaw.ar(200, 0, 0.2);
49 chain = FFT(LocalBuf(2048), in);
50 chain = PV_BinShift(chain, MouseX.kr(0.25, 4, \exponential) );
51 Out.ar(out, 0.5 * IFFT(chain).dup);
56 SynthDef("help-binStretch2", { arg out=0, soundBufnum=2;
58 in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
59 chain = FFT(LocalBuf(2048), in);
60 chain = PV_BinShift(chain, MouseX.kr(0.25, 4, \exponential) );
61 Out.ar(out, 0.5 * IFFT(chain).dup);
62 }).play(s,[\out, 0, \soundBufnum, c.bufnum]);
66 SynthDef("help-binShift", { arg out=0, bufnum=0;
68 in = LFSaw.ar(200, 0, 0.2);
69 chain = FFT(LocalBuf(2048), in);
70 chain = PV_BinShift(chain, 1, MouseX.kr(-128, 128) );
71 Out.ar(out, 0.5 * IFFT(chain).dup);
76 SynthDef("help-binShift2", { arg out=0, soundBufnum=2;
78 in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
79 chain = FFT(LocalBuf(2048), in);
80 chain = PV_BinShift(chain, 1, MouseX.kr(-128, 128) );
81 Out.ar(out, 0.5 * IFFT(chain).dup);
82 }).play(s,[\out, 0, \soundBufnum, c.bufnum]);