SuperCollider Cheat Sheet
A quick reference for sclang — booting the server, making sound, writing SynthDefs, and sequencing with patterns. Press Cmd/Ctrl-. to stop everything.
Server & sound
s.boot;Boot the audio server{ SinOsc.ar(440, 0, 0.1) }.play;Play a function as soundCmd/Ctrl-.Stop all sound immediatelys.meter; s.plotTree;Open level meters / node treeUGens (unit generators)
SinOsc.ar(freq, phase, mul)Sine oscillator (audio rate)Saw.ar / Pulse.arSawtooth / pulse oscillatorsLFNoise0.kr(4)Stepped random control signalEnvGen.kr(Env.perc, doneAction:2)Envelope; free the synth when donex !2Multichannel-expand to stereoSynthDef
SynthDef(\beep, { |freq=440, amp=0.1|
var sig = SinOsc.ar(freq) * amp;
Out.ar(0, sig!2);
}).add;Define a reusable synthSynth(\beep, [\freq, 660]);Play an instancex = Synth(\beep); x.set(\freq, 220);Keep a handle and change it livePatterns
Pbind(\degree, Pseq([0,2,4,7], inf), \dur, 0.25).play;Sequence notes over timePseq([0,1,2], inf)A repeating sequencePrand([0,3,5], inf)A random pick each stepPwhite(60, 72)Random values in a rangeHandy
440.cpsmidi; 69.midicps;Convert Hz ↔ MIDI note"hello".postln;Print to the post windowSuperCollider — Real-time synthesis server + sclang. · SuperCollider in the tool directory →