///////////////////////////////////////////////////
// History, as it was on Sat Aug 19 12:32:46 2006.
///////////////////////////////////////////////////

// - 0:0:0 - 

q = q ? ();

q.x = Set[1, 3, 5, 6, 11];
q.y = Set[0, 2, 5, 8, 11];

q.x | q.y;

(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain);
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	);
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain), doneAction:2)
		)
	)

}).store;
);

// - 0:1:10.2 -  
(
Pdef(\x, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray,
		\degree, Pbrown(-5, 10, 1, inf)
	)
).play;
);

// - 0:1:21.33 -  
(
Pdef(\x, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray,
		\degree, Pbrown(-5, 10, 1, inf)
	)
).play;
);

// - 0:1:43.94 -  
 q.x.asArray

// - 0:1:53.75 -  
(
Pdef(\x, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf)
	)
).play;
);

// - 0:1:57.69 -  
 q.x.asArray.sort

// - 0:2:21.5 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain);
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	);
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:2:35.89 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf)
	)
).play;
);

// - 0:3:3.6 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain);
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:3:55.17 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf)
	)
).play;
);

// - 0:4:24.9 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf)
	)
).play
);

// - 0:4:56.33 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain * Rand(0, 0.5));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:5:2.68 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain * Rand(0, 1));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:5:27.27 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:5:41.13 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:5:56.15 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:6:24.81 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain * Rand(0, 0.01));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:6:34.55 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [7/4, 5/3, 8/7], sustain * Rand(0, 0.01));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 3, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:6:59.69 -  
Pdefn(\scale_y, q.x.asArray.sort);

// - 0:7:5.3 -  
Pdefn(\scale_z, q.x.asArray.sort);

// - 0:7:29.51 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:7:40.96 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_z),
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:8:16.29 -  
Pdefn(\scale_y, (q.x & q.y).asArray.sort);

// - 0:8:40.57 -  
Pdefn(\scale_z, (q.x - q.y).asArray.sort.postln);

// - 0:8:44.61 -  
Pdefn(\scale_y, (q.x & q.y).asArray.sort.postln);

// - 0:8:59.83 -  
q.x = Set[1, 3, 5, 6, 10];

// - 0:9:1.05 -  
Pdefn(\scale_y, (q.x & q.y).asArray.sort.postln);

// - 0:9:1.2 -  
Pdefn(\scale_z, (q.x - q.y).asArray.sort.postln);

// - 0:9:8.3 -  
q.y = Set[0, 1, 5, 8, 11];

// - 0:9:9.81 -  
Pdefn(\scale_y, (q.x & q.y).asArray.sort.postln);

// - 0:9:9.93 -  
Pdefn(\scale_z, (q.x - q.y).asArray.sort.postln);

// - 0:9:29.72 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0, 0.01));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 3, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:9:55.18 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\legato, Prand([1, 0.2, 0.1, 2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:10:26.28 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.1));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 3, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:10:36.7 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 3, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:11:3.36 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 3 + (f), 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:11:13.84 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:11:31.9 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:11:34.62 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\legato, Prand([1, 0.2, 0.1, 2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:11:54.02 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.25, 0.25, 0.5], inf),
		\legato, Prand([1, 0.2, 0.1, 2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:11:56.76 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 2, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:12:5.31 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	u = BPF.ar(
		LFSaw.ar(f),
		freq * 4, 
		0.1
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:12:30.31 -  
Pdefn(\scale_y, (q.x -- q.y).asArray.sort.postln);

// - 0:12:37.08 -  
Pdefn(\scale_z, (q.x & q.y).asArray.sort.postln);

// - 0:12:43.85 -  
Pdefn(\scale_z, (q.x | q.y).asArray.sort.postln);

// - 0:13:43.08 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pn(Pseries(-5, 1, 14)),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:14:12.46 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.25, 0.25, 0.5], inf) * (1/3),
		\legato, Prand([1, 0.2, 0.1, 2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:14:27.18 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	u = BPF.ar(
		LFSaw.ar(f) * 2,
		freq * 4, 
		0.05
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:14:36.65 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.25, 0.25, 0.5], inf) * (1/3),
		\legato, Prand([1, 0.2, 0.1, 2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:14:43.02 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pn(Pseries(-5, 1, 14)),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:15:2.66 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	u = BPF.ar(
		LFSaw.ar(f) * 4,
		freq * 4, 
		0.01
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:15:35.19 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u, d;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	d = LFSaw.ar(f);
	u = BPF.ar(
		d * 4,
		freq * 4, 
		0.01
	).sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:15:47 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u, d;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	d = LFSaw.ar(f);
	u = BPF.ar(
		d * 4,
		freq * 4, 
		0.01
	);
	u = u * d;
	u = u.sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:15:54.34 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u, d;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.5));
	f = f * 0.25;
	d = LFSaw.ar(f.neg);
	u = BPF.ar(
		d * 4,
		freq * 4, 
		0.01
	);
	u = u * d;
	u = u.sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:16:7.12 -  
Pdefn(\scale_z, (q.x -- q.y).asArray.sort.postln);

// - 0:16:8.26 -  
Pdefn(\scale_y, (q.x -- q.y).asArray.sort.postln);

// - 0:16:10.87 -  
Pdefn(\scale_y, (q.x & q.y).asArray.sort.postln);

// - 0:16:18.38 -  
Pdefn(\scale_y, (q.x | q.y).asArray.sort.postln);

// - 0:16:44 -  
// some set theory.

// - 0:17:11.01 -  
q.z = Set[0, 4, 6, 10];

// - 0:17:18.93 -  
Pdefn(\scale_y, (q.x | q.y & q.z).asArray.sort.postln);

// - 0:17:50.61 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pn(Pbrown(-5, 10, 1, 14)),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:18:5.32 -  
Pdefn(\scale_y, (q.x & q.y | q.z).asArray.sort.postln);

// - 0:18:8.89 -  
Pdefn(\scale_y, (q.x | q.y & q.z).asArray.sort.postln);

// - 0:18:9.09 -  
Pdefn(\scale_y, (q.x & q.y | q.z).asArray.sort.postln);

// - 0:18:41.32 -  
Pdef(\z).fadeTime = 15;

// - 0:18:47.36 -  
Pdef(\y).fadeTime = 15;

// - 0:18:51.81 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pn(Pbrown(-5, 10, 1, 14)),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf) * 0.25,
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_z),
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf) * 0.25,
		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:19:10.41 -  
Pdef(\z).fadeTime = nil;

// - 0:19:13.14 -  
Pdef(\y).fadeTime = nil;

// - 0:19:38.63 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.25, 0.25, 0.5], inf) * (1/3),

		\legato, Prand([1, 0.2, 0.1, 2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
				\legato, Prand([1, 0.2, 0.1, 2], inf),

		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:19:52.88 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, q.x.asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf),
		\legato, Prand([0.1, 0.2, 0.1, 0.2], inf),

		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:20:0.63 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, (q.x & q.y).asArray.sort,
		\degree, Pbrown(-5, 10, 1, inf),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.25, 0.25, 0.5], inf) * (1/3),

		\legato, Prand([0.1, 0.2, 0.1, 0.2], inf),
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:20:14.96 -  
Pdefn(\scale_z, (q.x -- q.y | q.y).asArray.sort.postln);

// - 0:20:30.14 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pn(Pbrown(-5, 10, 1, 14)),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf) * 0.125,
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:20:32.06 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_z),
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf) * 0.125,
		\pan, Prand([-1, 1], inf)
	)
).play
);

// - 0:20:45.29 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u, d;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.05));
	f = f * 0.25;
	d = LFSaw.ar(f.neg);
	u = BPF.ar(
		d * 4,
		freq * 4, 
		0.01
	);
	u = u * d;
	u = u.sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:20:53.87 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u, d;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.05));
	f = f * 1;
	d = LFSaw.ar(f.neg);
	u = BPF.ar(
		d * 4,
		freq * 4, 
		0.01
	);
	u = u * d;
	u = u.sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:20:59.63 -  
(
SynthDef("pine", { |out, freq, amp=0.1, pan, sustain=1.0|
	var f, u, d;
	f = XLine.ar(freq, freq * [1, 1.5], sustain * Rand(0.01, 0.05));
	f = f * 1;
	d = LFSaw.ar(f.neg);
	u = BPF.ar(
		d * 4,
		freq * 1, 
		0.01
	);
	u = u * d;
	u = u.sum;
	Out.ar(out, 
		Pan2.ar(
			u,
			pan,
			EnvGen.kr(Env.perc(0, sustain, amp), doneAction:2)
		)
	)

}).store;
);

// - 0:21:5.98 -  
Pdefn(\scale_y, (q.x & q.y | q.z).asArray.sort.postln);

// - 0:21:8.02 -  
Pdefn(\scale_y, (q.x | q.y & q.z).asArray.sort.postln);

// - 0:21:17.02 -  
Pdefn(\scale_z, (q.x -- q.y -- q.y).asArray.sort.postln);

// - 0:21:26.63 -  
Pdefn(\scale_z, (q.x & q.y & q.y).asArray.sort.postln);

// - 0:21:36.66 -  
Pdefn(\scale_y, (q.x & q.y & q.z).asArray.sort.postln);

// - 0:21:41.63 -  
Pdefn(\scale_y, (q.x & q.y & q.z).asArray.sort.postln);

// - 0:21:46.17 -  
Pdefn(\scale_y, (q.x & q.y | q.z).asArray.sort.postln);

// - 0:21:49.07 -  
Pdefn(\scale_y, (q.x | q.y | q.z).asArray.sort.postln);

// - 0:21:52.67 -  
Pdefn(\scale_z, (q.x -- q.y -- q.y).asArray.sort.postln);

// - 0:21:56.63 -  
(
Pdef(\y, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_y),
		\degree, Pn(Pbrown(-5, 10, 1, 14)),
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf) * 0.125,
		\pan, Pseq([-1, 1, 0.5], inf)
	)
).play
);

// - 0:21:58.69 -  
(
Pdef(\z, 
	Pbind(
		\instrument, \pine,
		\scale, Pdefn(\scale_z),
		\degree, Pbrown(-5, 10, 1, inf),
		\octave, 4,
		\dur, Pseq([1, 1, Pn(3/2, 4), 0.5, 0.5], inf) * 0.125,
		\pan, Prand([-1, 1], inf)
	)
).play
);