Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / PV_MagShift.schelp
blob17ef679f6c93fd8eadf462f2f0e44d55a9203bf7
1 class:: PV_MagShift
2 summary:: shift and stretch magnitude bin position.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_BinShift
4 categories:: UGens>FFT
6 Description::
8 Shift and stretch the positions of only the magnitude of the bins. Can be used as a very crude frequency shifter/scaler.
11 classmethods::
13 method::new
15 argument::buffer
17 FFT buffer.
20 argument::stretch
22 Scale bin location by factor.
25 argument::shift
27 Add an offset to bin position.
30 Examples::
32 code::
34 s.boot;
35 b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
38 SynthDef("help-magStretch", { arg out=0, bufnum=0;
39         var in, chain;
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);
44 }).play(s);
48 SynthDef("help-magStretch2", { arg out=0, soundBufnum=2;
49         var in, chain;
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;
59         var in, chain;
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);
64 }).play(s);
68 SynthDef("help-magShift2", {  arg out=0, soundBufnum=2;
69         var in, chain;
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]);