// first (one-liner) sound examples

// 1. step: boot the server  (scsynth)
// on OSX: click on the [Boot] button in the server window
// elsewhere: do the following

s = Server.local;		// evaluate this line

s.boot;				// and then this

// watch the post window until "SuperCollider 3 server ready.." appears

// 2. step: evaluate each of the following lines
// stop the noise by [CMD-.] (OSX) or [ALT-.] (Win)

{ SinOsc.ar(440, 0, 0.1) }.play

{ SinOsc.ar(60.midicps, 0, 0.1) }.play

{ Saw.ar(36.midicps, 0.1) }.play

{ Pulse.ar(50, 0.1, 0.1) }.play

{ Saw.ar( XLine.kr(36, 60, 10).midicps, 0.1) }.play

{ Saw.ar( LFPulse.kr(1).range(55, 60).midicps, 0.1) }.play

{ Pulse.ar(50, LFTri.kr(0.3).range(0.01, 0.5), 0.1) }.play

// do you have a microphone connected to your computer?
{ CombN.ar(AudioIn.ar(1), 1, 0.5, 3.0) }.play

// subtractive synthesis with a resonance filter:
{ Resonz.ar(Saw.ar(100), LFNoise1.kr(1).range(300, 1200), 0.1) }.play

// subtractive synthesis with a resonant lowpass filter
// and two detuned sawtooths in stereo:
{ RLPF.ar(Saw.ar([100, 101], 0.5), LFNoise1.kr(1).range(300, 1200), 0.1) }.play

// independant random generators for resonance frequencies:
{ RLPF.ar(Saw.ar([100, 101], 0.3), LFNoise1.kr([1,1]).range(300, 1200), 0.03) }.play

// additive synthesis (boring ...)
20.do { arg i;  { SinOsc.ar((i+1) * 300, 0, (i+1).reciprocal * 0.3) }.play }

// additive synthesis (... more interesting)
20.do { arg i;  { SinOsc.ar((i+1) * 300, 0, LFNoise2.kr((i+1)*0.5).exprange(0.001, (i+1).reciprocal) * 0.3) }.play }

// additive synthesis (... deterministic version)
20.do { arg i;  { SinOsc.ar((i+1) * 300, 0, SinOsc.kr((i+1)*0.5).exprange(0.001, (i+1).reciprocal) * 0.3) }.play }

// additive synthesis, inharmonic
20.do { arg i;  { SinOsc.ar(rrand(200.0, 1800.0), 0, LFNoise2.kr(rrand(0.3, 1.0)).exprange(0.001,0.2)) }.play }

// additive synthesis, inharmonic and stereo
30.do { arg i;  { Pan2.ar(SinOsc.ar(rrand(200.0, 1800.0), 0, LFNoise2.kr(rrand(0.3, 1.0)).exprange(0.001,0.2)), 1.0.rand2) }.play }