///////////////////////////////////////////////////
// History, as it was on Thu Aug 17 11:37:44 2006.
///////////////////////////////////////////////////

// - 0:0:0 -  
//ok, jitlib and soundfiles, extra rehearsal to make up for missing Tuesday

// - 0:2:3.27 -  
b=Buffer.read(s,"/Volumes/data/SuperCollider/SCsamp/realsource/lampbeat1.wav");

// - 0:2:7.74 -  
b.numChannels

// - 0:2:15.46 -  
p=ProxySpace.push(s)

// - 0:2:20.86 -  
~out.play

// - 0:2:25.84 -  
p

// - 0:3:56.96 -  
~rate={LFNoise0.kr(0.5,0.2,0.25)}

// - 0:4:10.82 -  
~a= {PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,1, 0, 1);}

// - 0:4:15.89 -  
~out=~a

// - 0:4:58.68 -  
~rate2={LFNoise0.kr(0.5,0.2,0.25)}

// - 0:5:2.24 -  
~rate2={LFNoise0.kr(0.51,0.2,0.25)}

// - 0:5:28.64 -  
~rate2={LFNoise0.kr(0.51,0.2,2.25)}

// - 0:5:34.34 -  
~b= {PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate2,1, 0, 1);}

// - 0:5:40.28 -  
~out=~a+~b

// - 0:5:52.29 -  
~rate2={LFNoise0.kr(0.51,0.2,4.25)}

// - 0:5:55.71 -  
~rate2={LFNoise0.kr(0.51,0.2,2.25)}

// - 0:6:2.83 -  
~rate2.fadeTime=10

// - 0:6:6.29 -  
~rate2={LFNoise0.kr(0.51,0.2,10.25)}

// - 0:6:21.89 -  
~rate2={LFNoise0.kr(0.51,0.2,0.25)}

// - 0:6:40.69 -  
~rate2={LFNoise0.kr(0.51,0.2,100.25)}

// - 0:6:51.24 -  
~rate2={LFNoise0.kr(0.51,0.1,0.15)}

// - 0:7:47.73 -  
~trig={Dust.kr(0.51)}

// - 0:7:49.69 -  
~a= {PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, 0, 1);}

// - 0:8:36.44 -  
~pos= {SinOsc.kr(0.49,0,0.5,0.5)}

// - 0:8:37.24 -  
~a= {PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);}

// - 0:8:43.35 -  
~out=~a

// - 0:9:18.94 -  
~rate={LFNoise0.kr([0.5,0.51],0.05,1)}

// - 0:9:29.17 -  
~rate={LFNoise0.kr([0.5,0.51],0.01,1)}

// - 0:9:49.42 -  
~rate={LFNoise0.kr([0.5,0.51],0.01,0.03)}

// - 0:11:10.89 -  
~c={0.2*Klank.ar(`[[1,5/4,3/2,9/7]*500, nil, [1, 1, 1, 1]],~a)}

// - 0:11:19.11 -  
~out.fadeTime=5

// - 0:11:23.08 -  
~out=~c

// - 0:11:27.15 -  
~out=~a

// - 0:11:58.93 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*500, nil, [1, 1, 1, 1]*0.1],~a)}

// - 0:12:3.6 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, nil, [1, 1, 1, 1]*0.1],~a)}

// - 0:12:6.64 -  
~out=~a

// - 0:12:12.75 -  
~out=~c

// - 0:12:17.9 -  
~out=~a

// - 0:12:33.59 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, nil, [1, 1, 1, 1]*0.01],~a)}

// - 0:12:36.65 -  
~out=~a

// - 0:12:38.85 -  
~out=~c

// - 0:12:40.78 -  
~out=~a

// - 0:13:2.98 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [1, 1, 1, 1]*0.01],~a)}

// - 0:13:6.58 -  
~out=~c

// - 0:13:12.86 -  
~out=~a

// - 0:13:48.42 -  
~d={Impulse.ar(3)}

// - 0:13:49.94 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [1, 1, 1, 1]*0.01],~d)}

// - 0:13:53.82 -  
~out=~a+~c

// - 0:13:58.46 -  
~out=~a

// - 0:14:15.36 -  
a={ Klank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;

// - 0:14:25.58 -  
a.free

// - 0:14:35.04 -  
[1,5/4,3/2,9/7]*1000

// - 0:14:55.53 -  
a={ Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [1, 1, 1, 1]*0.01], Impulse.ar(2, 0, 0.1)) }.play;

// - 0:14:59.44 -  
a.free

// - 0:15:7.39 -  
a={ Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1], [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;

// - 0:15:11.27 -  
a.free

// - 0:15:31.89 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [1, 1, 1, 1]*0.01],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:15:35.33 -  
~out=~c

// - 0:15:44.4 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1], [1, 1, 1, 1]],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:15:55.25 -  
~trig={Dust.kr(0.51)}

// - 0:15:57.57 -  
~trig={Dust.kr(5.51)}

// - 0:16:10.42 -  
~rate={LFNoise0.kr([0.5,0.51],0.1,0.3)}

// - 0:16:17.14 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [1, 1, 1, 1]],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:16:27.38 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [5, 4, 3, 2]],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:16:39.11 -  
~c={0.1*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [5, 4, 3, 2]*0.1],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:16:47.63 -  
~c={Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [5, 4, 3, 2]*0.1],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:16:53.53 -  
~c={0.5*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [5, 4, 3, 2]*0.1],PlayBuf.ar(1,b.bufnum,BufRateScale.kr(b.bufnum)*~rate,~trig, BufFrames.kr(b.bufnum)*~pos, 1);)}

// - 0:17:0.86 -  
~out=~c+~a

// - 0:17:11.11 -  
~out=~c+~a+~b

// - 0:17:20.14 -  
~rate2={LFNoise0.kr(0.51,1,1.5)}

// - 0:18:21.9 -  
Tdef(\lctask1,{

inf.do {

~rate2={LFNoise0.kr(exprand(0.1,3),0.5,exprand(0.5,4))};

5.0.wait;
};

}).play;

// - 0:18:48.57 -  
Tdef(\lctask1,{

inf.do {

~rate2={LFNoise0.kr(exprand(0.1,3),0.5,exprand(0.5,4))};
~trig={Dust.kr(exprand(0.5,10))};

5.0.wait;
};

}).play;

// - 0:18:55.89 -  
~out=~a+~b

// - 0:20:0.87 -  
Tdef(\lctask1,{
var tmp;

inf.do {

~rate2={LFNoise0.kr(exprand(0.1,3),0.5,exprand(0.5,4))};
~trig={Dust.kr(exprand(0.5,10))};
tmp=exprand(0.1,3);
~rate={LFNoise0.kr([1,1.1]*tmp,tmp*0.5,tmp)};

5.0.wait;
};

}).play;

// - 0:20:41.38 -  
~out={CombN.ar(~a+~b,0.1,0.1,10,0.5)}

// - 0:21:10.2 -  
~out.play

// - 0:21:17.1 -  
~out={CombN.ar(~a.ar+~b.ar,0.1,0.1,10,0.5)}

// - 0:21:27.56 -  
~out={CombN.ar(~a.ar+~b.ar,0.1,0.1,1,0.5)}

// - 0:21:49.51 -  
~c={0.5*Klank.ar(`[[1,5/4,3/2,9/7]*1000, [1,1,1,1]*0.1, [5, 4, 3, 2]*0.1],~a.ar)}

// - 0:22:11.53 -  
~out={CombN.ar(~a.ar+~b.ar,0.1,0.1,1,0.5,~c.ar)}

// - 0:22:38.03 -  
~out.release

//not very good really, but illuminating