// Presentation Chooser v004 100310

(
s.waitForBoot({
	(
		SynthDef("ScetPing", { 
			arg out=0, freq=1600, sustain=0.05, amp=0.3, pan=0;
			var env, snd;
			env = EnvGen.kr(
				Env.perc(0.01, sustain, 0.2), doneAction:2
			);
			snd = SinOsc.ar(freq, 0, env);
			Out.ar(out, Pan2.ar(snd, pan,  amp))
		}).send(s);
	);
});
)

	Synth.new("ScetPing");

// Clear the post window first...
(
l = ["Igor Bankovskis", "Chris Barn", "Dave Burden", "Greg Ellingworth", "Jonas Ramanauskas", "Simon Scott", "Kevin Garrod", "Ben Giller", "Simeon Kauffmann", "Justinas Ramanauskas", "Theodore Taylor", "Michael Sands", "Richard Smyth", "Nicholas May"];

t = Task.new({
	var pan, sust;
	
	(70.rand+20).do({
		pan = if (0.5.coin, {-1}, {1});
		sust = if (0.8.coin, {0.05}, {1.5});
		Synth.new("ScetPing",   
					[\freq, rrand(200, 2000), \amp, 0.2, \pan, pan, \sustain, sust]
				);
		[0.1, 0.05, 0.075].choose.yield;
		}); // end do
	"***************************************************".postln;
	"***************************************************".postln;
	"The next person chosen to make a presentation is...".postln;
	" ".postln;
	l.at(rand(l.size)).postln;
	" ".postln;
	"***************************************************".postln;
	"***************************************************".postln;
	}).play; // end task
)

t.reset; t.play

 ["Igor Bankovskis", "Chris Barn", "Dave Burden", "Greg Ellingworth", "Jonas Ramanauskas", "Simon Scott", "Kevin Garrod", "Ben Giller", "Simeon Kauffmann", "Justinas Ramanauskas", "Theodore Taylor", "Michael Sands", "Richard Smyth", "Nicholas May"]