The Patchbay_

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 sound
Cmd/Ctrl-.Stop all sound immediately
s.meter; s.plotTree;Open level meters / node tree

UGens (unit generators)

SinOsc.ar(freq, phase, mul)Sine oscillator (audio rate)
Saw.ar / Pulse.arSawtooth / pulse oscillators
LFNoise0.kr(4)Stepped random control signal
EnvGen.kr(Env.perc, doneAction:2)Envelope; free the synth when done
x !2Multichannel-expand to stereo

SynthDef

SynthDef(\beep, { |freq=440, amp=0.1|
  var sig = SinOsc.ar(freq) * amp;
  Out.ar(0, sig!2);
}).add;
Define a reusable synth
Synth(\beep, [\freq, 660]);Play an instance
x = Synth(\beep); x.set(\freq, 220);Keep a handle and change it live

Patterns

Pbind(\degree, Pseq([0,2,4,7], inf), \dur, 0.25).play;Sequence notes over time
Pseq([0,1,2], inf)A repeating sequence
Prand([0,3,5], inf)A random pick each step
Pwhite(60, 72)Random values in a range

Handy

440.cpsmidi; 69.midicps;Convert Hz ↔ MIDI note
"hello".postln;Print to the post window

SuperCollider — Real-time synthesis server + sclang. · SuperCollider in the tool directory →

← All cheat sheets