Wednesday, August 09, 2006

Creative Computing - Week 2 - BBCut2

(
//Global Variables
~thisPath = (PathName.new(Document.current.path)).pathOnly;

//Buffer Sounds
~sf1 = BBCutBuffer(~thisPath++"drum.wav");
~sf2 = BBCutBuffer(~thisPath++"fx.wav");
~sf3 = BBCutBuffer(~thisPath++"indian.wav");
)

(
// Clock
~clock = ExternalClock(TempoClock(2.5));
~clock.play;

//Cut Buffers
~cutB1 = CutBuf1(~sf1, 0.1);
~cutB2 = CutBuf1(~sf2,0.1);
~cutB3 = CutBuf1(~sf3,0.1);

//Playback Buffers
~bufC1 = BBCut2([~cutB1, CutMixer(0, 1.0, 1.0, {0.1.rand})]).play(~clock);
~bufC2 = BBCut2([~cutB2, CutMixer(0, 1.0, 1.0, {0.3.rand})]).play(~clock);
~bufC3 = BBCut2([~cutB3, CutMixer(0, 0.07, 1.0, {0.9.rand})]).play(~clock);
)

//ChangeTempoClock

~clock.tempo=0.1;
~clock.tempo=1;
~clock.tempo=2;
~clock.tempo=3;
~clock.tempo=4;

//Clear Buffers

~bufC1.clear;
~bufC2.clear;
~bufC3.clear;

0 Comments:

Post a Comment

<< Home