// Presentation Chooser v005 121106

(
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");

// original
	l = ["Benjamin Sugar", "Roy Knouker", "Aaron Sayers", "Chris Dartnell", "Adam Raw", "Jake Sparrow-Hunter", "Ben Rickard", "Sam Hopkins", "Jimmy Morris", "Josh Brown", "Adam Coller", "Daniel Wakenell"];

// Clear the post window first...
(
l = ["Benjamin Sugar", "Roy Knouker", "Aaron Sayers", "Chris Dartnell", "Adam Raw", "Jake Sparrow-Hunter", "Ben Rickard", "Sam Hopkins", "Jimmy Morris", "Josh Brown", "Adam Coller", "Daniel Wakenell"];

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 is...".postln;
	" ".postln;
	l.at(rand(l.size)).postln;
	" ".postln;
	"***************************************************".postln;
	"***************************************************".postln;
	}).play; // end task
)

t.reset; t.play

 ["Benjamin Sugar", "Roy Knouker", "Aaron Sayers", "Chris Dartnell", "Adam Raw", "Jake Sparrow-Hunter", "Ben Rickard", "Sam Hopkins", "Jimmy Morris", "Josh Brown", "Adam Coller", "Daniel Wakenell"]
 
 ["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"]