Granular Synthesis
A very simple Granular Synthesis case:

/* IZ 030913
Basic (fast) sine grains
8 parameters: 
-frequency
-frequency deviation
-amplitude
-amplitude deviation
-duration
-duration deviation
-period
-period deviation
*/

( // ============= 1. boot server, load synthdef =============
s = Server.local;
s.boot;
a = s.addr;
d = SynthDef("sinegrain01", { arg freq = 800, amp = 0.1, dur = 0.1;
	Out.ar(0, 
		FSinOsc.ar(freq, 0, EnvGen.kr(Env.sine(dur, amp), doneAction: 2))); 
	});
d.load(s);
)

// ============= 2. Various ways of starting a single grain: =============

// no parameters - defaults are used: 
a.sendMsg("s_new", "sinegrain01", -1);
// as above, using a numeric code for "s_new". Saves cpu time for symbol lookup. 
a.sendMsg(9, "sinegrain01", -1);
a.sendMsg("s_new", "sinegrain01", -1, 0, 0, 0, 1000);
a.performList(\sendMsg, "s_new", "sinegrain01", [-1, 0, 0, 0, 700]);
a.sendBundle(nil, ["s_new", "sinegrain01", -1, 0, 0, 0, 700]);
a.performList(\sendBundle, [nil, ["s_new", "sinegrain01", -1, 0, 0, 0, 700]]);

// ============ 3. Test a train of grains: =============
(
var 	freq = 800, 
	freq_d = 0.3,
	amp = 0.1, 
	amp_d = 0.3,
	dur = 0.1, 
	dur_d = 0.3,
	per = 0.05, 
	per_d = 0.3;

var rangify; // store function for obtaining a random value within a range here
                  
                  // this function returns a random value within -(range / 2) and 
                  // +(range / 2) of the middle value val: 
rangify = { arg val, range;
	var med;
	med = (val * range) / 2; 
	(val - med).rrand(val + med);
};

Routine({
	100.do({ // use numeric code "9" for maximum efficiency in starting the grain: 
		a.sendMsg(9, "sinegrain01", -1, 0, 0,
			0, rangify.value(freq, freq_d), 
			1, rangify.value(amp, amp_d), 
			2, rangify.value(dur, dur_d)
		);
		rangify.value(per, per_d).wait;
	});
}).play;
)