home/ modules/ supercollider-synthesis-environment

SuperCollider: coding synthesis from UGens to patterns

  • learner can work in the SuperCollider client/server model — write SynthDefs from UGens, route buses, manage node order, and play/pattern them safely
  • learner can build synthesis instruments in code: additive stacks, granular UGens, envelopes, filters, and effects
  • learner can sequence and perform SuperCollider patches with Pbind/Pdef, respond to incoming OSC messages, and update patterns live

Write a SuperCollider SynthDef for a subtractive voice with a bandpass dry/wet filter blend (XFade2), an ADSR, and reverb, sequence it live with a Pdef-wrapped Pbind, and add a second granular SynthDef triggered by incoming OSC messages via OSCdef.

This module turns synthesis theory into a playable instrument you build entirely in text. In a live-coding set — laptop on stage, projector showing your editor, audience hearing every evaluation — SuperCollider is the rig where a subtractive lead, a granular wash, and their sequencing all live in one file you rewrite while it plays. That is the whole task here: author voices as code, wire them safely through the server, and perform them as running patterns you mutate without stopping the music.

The arc starts fully supported. First internalize that SuperCollider is two networked programs (sclang talking OSC to scsynth) and that a Unit Generator is a server-side signal object — then drill the IDE evaluate-a-block workflow until it is reflexive, plotting before playing to protect your ears and monitors. Early exercises hand you working SynthDefs to modify: swap oscillators, remap modulators with .range/.exprange, shape amplitude with ADSR envelopes and doneAction so silent synths free themselves. Mid-module you build from scratch — additive stacks via iteration, buffer playback with PlayBuf and BufRd, an XFade2 dry/wet bandpass blend for the filtered voice, comb-delay effects — and learn why the reverb Synth must sit after its source in the node tree, reading from a properly allocated private bus. Sequencing then layers on: Pbind maps pattern streams onto SynthDef arguments, the pitch hierarchy resolves degrees to frequencies, Pdef lets you re-evaluate patterns mid-stream — the core live-performance move — and OSCdef routes incoming address-patterned OSC messages into the running patch.

The required atoms are exactly what the capstone exercises unsupported: a filtered voice built on a bandpass blend, correct envelope gating, bus-and-node-order routing, Pdef-wrapped sequencing, and a granular layer answering incoming OSC. Supporting atoms widen the palette — wavetable morphing, Klank resonators, polyphonic MIDI, live-input granulation safety, historic UGen lineage — enriching taste and troubleshooting without gating completion.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

fm-timbre

note("c3").s("sine").fm(4).fmh(2).fmi(3)

strudel-0204 · CC0

osc (midicps 24 * (1 ~~ 4 $ osc 110)) >> audio

punctual-0006 · CC0-1.0

live-hot-swap

live_loop :x do; play 60; sleep 1; end

sonicpi-0048 · CC0

Ndef(\a, { SinOsc.ar(220) * 0.1 }).play

supercollider-0037 · CC0

stereo-panning

d1 $ pan (slow 2 sine) # sound "hh*8"

tidal-0037 · CC0

SinOsc s => Pan2 p => dac; -0.7 => p.pan;

chuck-0042 · MIT

additive-synthesis

{ Klang.ar(`[[100, 200, 300, 400], [0.4, 0.3, 0.2, 0.1]]) * 0.1 }.play

supercollider-0022 · CC0

{ Klank.ar(`[[200, 400, 733], [0.4, 0.3, 0.2], [1, 0.6, 0.4]], Impulse.ar(2) * 0.1) }.play

supercollider-0021 · CC0

pattern-sequencing

Pbind(\degree, Pseq([0, 2, 4, 7], inf), \dur, 0.25).play

supercollider-0023 · CC0

synthdef-abstraction

SynthDef(\beep, { Out.ar(0, SinOsc.ar(\freq.kr(440), 0, 0.1)) }).add; Synth(\beep)

supercollider-0043 · CC0

Atoms in this module

Required — these gate the capstone

SuperCollider exists as two separate networked programs: sclang and scsynth
Concept L1 Foundations BF
SuperCollider UGens run at audio rate (ar), control rate (kr), or initialization rate (ir)
Concept L1 Foundations BF
A Unit Generator (UGen) is an object that generates or processes signals entirely in the server
Concept L1 Foundations FB
A SynthDef is a reusable recipe for sound; a Synth is one execution of that recipe
Concept L2 First instrument BF
SuperCollider distinguishes local variables (var), single-letter globals (a-z), and environment variables (~name)
Concept L1 Foundations BF
SuperCollider IDE workflow requires Shift-Cmd-B to select a code block and Shift-Enter to evaluate it
Procedure L2 First instrument BF
UGen .range and .exprange map a -1 to 1 signal to a custom output range (linear or exponential)
Procedure L1 Foundations BF
SuperCollider's Out UGen writes a signal to a numbered audio bus, not directly to hardware
Concept L2 First instrument BF
Use Bus.audio to allocate private buses safely, avoiding conflicts with hardware I/O buses
Concept L2 First instrument BF
In SuperCollider's audio server, Synths are processed head-to-tail, so effects must appear after sources
Concept L2 First instrument BF
Pan2 places a mono signal in the stereo field: -1 hard left, 0 center, +1 hard right
Concept L2 First instrument BF
Mix collapses an array of signals to mono; Splay spreads them across stereo
Concept L2 First instrument BF
ADSR envelopes require a gate argument; trigger arguments cause immediate release on ADSR
Concept L2 First instrument BF
Env.new specifies an envelope as arrays of levels, times, and per-segment curvatures
Procedure L2 First instrument BF
EnvGen's doneAction argument controls what happens when a finite envelope finishes
Concept L2 First instrument BF
t_gate arguments in SuperCollider automatically reset to zero after one control cycle, enabling clean re-triggering
Concept L2 First instrument BF
Integer.do inside a SynthDef creates that many UGen instances and accumulates them into a sum
Concept L2 First instrument BF
Additive synthesis in SuperCollider stacks SinOsc UGens with harmonic ratios and independent amplitude envelopes
Concept L2 First instrument BF
PlayBuf plays a Buffer at a controllable rate, with optional looping and a trigger to jump to startPos
Concept L2 First instrument BF
BufRd reads a Buffer at any frame index, enabling sinusoidal, noise-driven, and custom playback paths
Concept L3 Craft BF
DelayL creates a one-shot delay; CombL adds feedback to produce echoes with controllable decay time
Concept L2 First instrument B
XFade2 enables smooth blend between a dry signal and a bandpass-filtered wet signal in a SynthDef
Concept L3 Craft B
Pbind maps symbol-value pairs to a SynthDef's arguments, creating a timed stream of Synths
Concept L2 First instrument BF
Pbind has a built-in pitch hierarchy: midinote, note, degree all resolve to freq if the SynthDef uses 'freq'
Concept L2 First instrument BF
SuperCollider's SynthDef and Pbind together create a patterned synthesizer: SynthDef defines the voice, Pbind sequences it
Procedure L3 Craft BF
Wrapping a Pbind in Pdef allows live re-evaluation of patterns without stopping the stream
Concept L3 Craft BF
GrainBuf granulates a Buffer with independently controllable trigger rate, grain duration, pitch, and position
Concept L3 Craft B
SuperCollider's GrainSin, GrainFM, and GrainBuf UGens generate individual grains at a specified density
Concept L3 Craft BF
Live granulation requires recording to a looping buffer first, then running GrainBuf on the buffer with a trailing pointer
Procedure L4 Performance BF
Granular time-pitch changing in SuperCollider decouples playback speed from pitch by varying grain rate and position
Concept L3 Craft BF
OSCdef registers a named function to respond to incoming OSC messages by address
Concept L2 First instrument BF
An OSC message has two parts: an address pattern (the parameter name) and one or more typed arguments (the values)
Concept L1 Foundations JN

Supporting — enrichment, not gating

The recommended path into SuperCollider + synthesis is: SC environment tutorial → synthesis cookbook → custom projects
Procedure L2 First instrument BF
Using .plot() before .play() lets you see a waveform before committing to audio output
Procedure L2 First instrument BF
In SuperCollider, always plot an unfamiliar UGen before playing it to avoid dangerous amplitude spikes
Principle L2 First instrument BF
Language-side random functions in a SynthDef choose values at compile time, not at Synth creation
Concept L2 First instrument BF
Sending set to a Group broadcasts the message to all contained Synths simultaneously
Concept L2 First instrument BF
Delay and comb UGens allocate memory dynamically; increase s.options.memSize to avoid allocation failures
Procedure L2 First instrument BF
SoundIn reads from hardware audio input buses; use headphones to prevent feedback
Concept L2 First instrument BF
Open Sound Control is a transport-independent network protocol carrying typed, address-patterned messages between devices
Concept L1 Foundations JEN
Polyphonic MIDI in SuperCollider uses an array of 128 Synths indexed by note number
Concept L3 Craft BF
SuperCollider's PMOsc implements phase modulation synthesis, producing FM-like timbres with modulator-as-ratio control
Concept L2 First instrument BF
Klank implements a bank of resonant filters excited by an impulse to model acoustic resonators in SuperCollider
Concept L2 First instrument BF
SuperCollider's Osc UGen requires a buffer in wavetable format, not a plain Signal
Concept L3 Craft B
VOsc morphs between two or more wavetables in adjacent buffers using a floating-point buffer index
Concept L3 Craft B
Signal.sineFill creates additive synthesis wavetables by specifying partials as an amplitude array
Procedure L3 Craft B
Shaper applies a waveshaping transfer function stored in a wavetable buffer to an audio signal
Concept L3 Craft B
Multichannel reverb mix modulated by source-to-speaker distance models sound spatialization in SuperCollider
Concept L3 Craft BF
First-order Ambisonics encodes a 3D soundfield as four channels (W, X, Y, Z) decoded for any speaker layout
Concept L4 Performance BF
Grains shorter than about 50 ms transition from perceived pitch to timbre or click as duration decreases
Concept L3 Craft BF
Waveset manipulation treats individual waveform cycles as grains for extreme time-stretching and morphing in SuperCollider
Concept L4 Performance BF
Pulsar synthesis generates pitched textures by combining a waveform table with a duty-cycle envelope repeated at audio rate
Concept L4 Performance BF
Computer music programs route audio by connecting unit generators in a signal processing graph
Concept L1 Foundations BF
Unit generators are the building blocks of digital synthesis: generators and modifiers wired into a patch
Concept L2 First instrument BF
MUSIC V's unit generator model chains composable processing blocks to build synthesis instruments
Concept L3 Craft B
Csound is a text-based software sound synthesis system, created by Barry Vercoe in 1985
Fact L1 Foundations BN
Realtime DSP processes audio as it is produced; offline DSP calculates ahead of playback
Concept L1 Foundations B