Skip to content

Commit

Permalink
PV_BinShift helpfile improved
Browse files Browse the repository at this point in the history
(cherry picked from commit 52ebf57)

Signed-off-by: Dan Stowell <danstowell@users.sourceforge.net>
  • Loading branch information
Julian Rohrhuber authored and danstowell committed Jun 16, 2012
1 parent 4288bf8 commit aa9c7a7
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions HelpSource/Classes/PV_BinShift.schelp
Expand Up @@ -35,48 +35,47 @@ code::
s.boot;

(
b = Buffer.alloc(s,2048,1);
c = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
)

(
SynthDef("help-binStretch", { arg out=0, bufnum=0;
SynthDef("help-binStretch", { arg out=0;
var in, chain;
in = LFSaw.ar(200, 0, 0.2);
chain = FFT(bufnum, in);
chain = FFT(LocalBuf(2048), in);
chain = PV_BinShift(chain, MouseX.kr(0.25, 4, \exponential) );
Out.ar(out, 0.5 * IFFT(chain).dup);
}).play(s,[\out, 0, \bufnum, b.bufnum]);
}).play;
)

(
SynthDef("help-binStretch2", { arg out=0, bufnum=0, soundBufnum=2;
SynthDef("help-binStretch2", { arg out=0, soundBufnum=2;
var in, chain;
in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
chain = FFT(bufnum, in);
chain = FFT(LocalBuf(2048), in);
chain = PV_BinShift(chain, MouseX.kr(0.25, 4, \exponential) );
Out.ar(out, 0.5 * IFFT(chain).dup);
}).play(s,[\out, 0, \bufnum, b.bufnum, \soundBufnum, c.bufnum]);
}).play(s,[\out, 0, \soundBufnum, c.bufnum]);
)

(
SynthDef("help-binShift", { arg out=0, bufnum=0;
var in, chain;
in = LFSaw.ar(200, 0, 0.2);
chain = FFT(bufnum, in);
chain = FFT(LocalBuf(2048), in);
chain = PV_BinShift(chain, 1, MouseX.kr(-128, 128) );
Out.ar(out, 0.5 * IFFT(chain).dup);
}).play(s,[\out, 0, \bufnum, b.bufnum]);
}).play;
)

(
SynthDef("help-binShift2", { arg out=0, bufnum=0, soundBufnum=2;
SynthDef("help-binShift2", { arg out=0, soundBufnum=2;
var in, chain;
in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
chain = FFT(bufnum, in);
chain = FFT(LocalBuf(2048), in);
chain = PV_BinShift(chain, 1, MouseX.kr(-128, 128) );
Out.ar(out, 0.5 * IFFT(chain).dup);
}).play(s,[\out, 0, \bufnum, b.bufnum, \soundBufnum, c.bufnum]);
}).play(s,[\out, 0, \soundBufnum, c.bufnum]);
)

::
Expand Down

0 comments on commit aa9c7a7

Please sign in to comment.