///////////////////////////////////////////////////
// History, as it was on Wed Aug 16 22:50:57 2006.
///////////////////////////////////////////////////

// - 0:0:0 -  
//something more with samples

// - 0:0:20.75 -  
//I just tried this with jitlib spawn and failed. Will instead do the traditional way for today

// - 0:1:6.76 -  
b=Buffer.read(s,"/Volumes/data/recordings/newalbum\?/dancepiece.wav");

// - 0:1:57.17 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum),1, startPos, 1)*amp;

Out.ar(out,sound)
}).store;

// - 0:2:4.63 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1);
1.0.wait;
};

}).play;

// - 0:2:39.12 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=PlayBuf.ar(1,bufnum,BufRateScale.kr(bufnum),1, startPos, 1)*amp;

Out.ar(out,sound)
}).store;

// - 0:2:49.05 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum),1, startPos, 1)*amp;

Out.ar(out,sound)
}).store;

// - 0:3:14.24 -  
b.bufnum

// - 0:3:19.19 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum]);
1.0.wait;
};

}).play;

// - 0:3:46.72 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum),1, startPos, 1)*amp;

Out.ar(out,sound*env)
}).store;

// - 0:3:50.35 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum]);
1.0.wait;
};

}).play;

// - 0:4:26.51 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, pan=0.0, freq=440, sustain=0.1; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=Saw.ar(freq,amp);

Out.ar(out, Pan2.ar(sound,pan))
}).store;

// - 0:5:3.26 -  
b.numChannels

// - 0:5:21.31 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum)*rate,1, startPos*(BufFrames.ir(bufnum)), 1)*amp;

Out.ar(out,sound*env)
}).store;

// - 0:5:39.81 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,1]);
1.0.wait;
};

}).play;

// - 0:5:53.37 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,1, \startPos, 1.0.rand]);
1.0.wait;
};

}).play;

// - 0:6:6.05 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,0.1, \startPos, 1.0.rand]);
1.0.wait;
};

}).play;

// - 0:6:15.74 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,0.1, \startPos, 1.0.rand]);
0.1.wait;
};

}).play;

// - 0:6:31.41 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,0.1, \startPos, 1.0.rand, \amp, 1.0.rand]);
0.1.wait;
};

}).play;

// - 0:7:1.98 -  
Tdef(\lctask1,{

inf.do {

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,rrand(1,5)*0.1, \startPos, 1.0.rand, \amp, 1.0.rand]);
0.1.wait;
};

}).play;

// - 0:11:4.28 -  
Tdef(\lctask1,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=10;

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,rrand(1,5)*0.1, \startPos, now, \amp, 1.0.rand]);

count=count+1;

0.1.wait;
};

}).play;

// - 0:11:56.88 -  
Tdef(\lctask1,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=10;

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.5+now)%1.0)*0.1, \startPos, now, \amp, 1-now]);

count=count+1;

0.1.wait;
};

}).play;

// - 0:12:24.92 -  
Tdef(\lctask1,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=10;

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.5+now)%1.0)*0.1, \startPos, now, \amp, 1-now]);

count=count+1;

0.1.wait;
};

}).play(quant:1.0);

// - 0:12:58.56 -  
Tdef(\lctask2,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=10;

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.75+now)%1.0)*0.1, \startPos, 1-now, \amp, now]);

count=count+1;

0.2.wait;
};

}).play(quant:1.0);

// - 0:13:22.51 -  
Tdef(\lctask2,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=10;

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.75+now)%1.0)*0.1, \startPos, 1-now, \amp, now, \rate,0.5]);

count=count+1;

0.2.wait;
};

}).play(quant:1.0);

// - 0:13:57.45 -  
Tdef(\lctask2,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=10;

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.75+now)%1.0)*0.5+0.2, \startPos, 1-now, \amp, now, \rate,0.5]);

count=count+1;

0.2.wait;
};

}).play(quant:1.0);

// - 0:16:11.13 -  
Tdef(\lctask3,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;
spread=rrand(0.0,0.1);

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=rrand(5,30);
spread=rrand(0.0,0.1);

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.25+now)%1.0)*0.5+0.2, \startPos, (1-now+0.5+(spread.rand))%1.0, \amp, now.squared, \rate,5/4]);

count=count+1;

0.3.wait;
};

}).play(quant:1.0);

// - 0:16:56.29 -  
Tdef(\lctask3,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;
spread=rrand(0.0,0.1);

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=rrand(5,30);
spread=rrand(0.0,0.1);

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.25+now)%1.0)*0.5+0.2, \startPos, (1-now+0.5+(spread.rand))%1.0, \amp, (target+old)*0.5, \rate,5/4]);

count=count+1;

0.3.wait;
};

}).play(quant:1.0);

// - 0:17:35.98 -  
Tdef(\lctask4,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;
spread=rrand(0.0,0.1);

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=rrand(5,30);
spread=rrand(0.0,0.1);

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.25+now)%1.0)*0.5+0.2, \startPos, (1-now+0.5+(spread.rand))%1.0, \amp, (target+old)*0.5, \rate,6/4]);

count=count+1;

0.3.wait;
};

}).play(quant:1.0);

// - 0:18:0.88 -  
Tdef(\lctask4,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;
spread=rrand(0.0,0.1);

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=rrand(5,30);
spread=rrand(0.0,0.1);

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.25+now)%1.0)*0.2+0.1, \startPos, (1-now+0.5+(spread.rand))%1.0, \amp, (target+old)*0.5, \rate,6/4]);

count=count+1;

0.3.wait;
};

}).play(quant:1.0);

// - 0:18:9.69 -  
Tdef(\lctask3,{
var old, target, now, interp, count, spread; 
var t;

old=0.5;
target=1.0.rand;

count=0;
interp=10;
spread=rrand(0.0,0.1);

inf.do {

if(count==interp,{
old=now;
target=1.0.rand;

count=0;
interp=rrand(5,30);
spread=rrand(0.0,0.1);

});

t=(count/(interp-1));

now= (1-t)*old+t*target;

Synth(\lcsynth1,[\bufnum, b.bufnum, \sustain,((0.25+now)%1.0)*0.2+0.1, \startPos, (1-now+0.5+(spread.rand))%1.0, \amp, (target+old)*0.5, \rate,5/4]);

count=count+1;

0.3.wait;
};

}).play(quant:1.0);

// - 0:18:33.45 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=Resonz.ar(PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum)*rate,1, startPos*(BufFrames.ir(bufnum)), 1)*amp,1000,0.1);

Out.ar(out,sound*env)
}).store;

// - 0:18:45.88 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=Resonz.ar(PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum)*rate,1, startPos*(BufFrames.ir(bufnum)), 1)*amp,1000,0.01);

Out.ar(out,sound*env)
}).store;

// - 0:18:53.02 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=Resonz.ar(PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum)*rate,1, startPos*(BufFrames.ir(bufnum)), 1)*amp,1000,0.01,10);

Out.ar(out,sound*env)
}).store;

// - 0:19:31.4 -  
SynthDef(\lcsynth1, {arg out=0, amp=0.1, rate=1, sustain=0.1, bufnum=0, startPos=0 ; 
var sound, env;

env=EnvGen.ar(Env([1,0],[sustain],'lin'),doneAction:2);

sound=Resonz.ar((PlayBuf.ar(2,bufnum,BufRateScale.kr(bufnum)*rate,1, startPos*(BufFrames.ir(bufnum)), 1)*amp).distort.distort.cubed*4,1000,0.01,10);

Out.ar(out,sound*env)
}).store;

// - 0:19:52.7 -  
Tdef(\lctask1).stop

// - 0:19:54.76 -  
Tdef(\lctask2).stop

// - 0:19:57.09 -  
Tdef(\lctask3).stop

// - 0:20:1.95 -  
Tdef(\lctask4).stop