SuperCollider Live Coding with ClaudeCollider
This skill enables live music synthesis using SuperCollider via the ClaudeCollider MCP server.
Quick Reference
Key Rules
- Drums need
\freq, 48 - IMPORTANT Without it, drums sound wrong
- Use Pdef for rhythms - Patterns that repeat
- Use Ndef for continuous - Pads, drones, textures
- Symbols not strings -
\kick not "kick"
- Semicolons between statements - No trailing semicolon
- NEVER Synth() inside Ndef - Causes infinite spawning
CC API Reference
The main entry point stored in ~cc. Access subsystems via ~cc.synths, ~cc.fx, ~cc.midi, ~cc.samples, ~cc.recorder, ~cc.state.
CC - Main Class
| Method |
Description |
tempo(bpm) |
Get/set tempo in BPM |
stop |
Stop all Pdefs and Ndefs |
clear |
Full reset: free all synths, patterns, effects, samples |
status |
Get formatted status string |
reboot(device, numOutputs, onComplete) |
Restart the server |
~cc.synths - Synth Definitions
27+ pre-built synths with cc_ prefix.
| Method |
Description |
list |
Comma-separated list of synth names |
describe |
Detailed descriptions with params |
play(name, ...args) |
One-shot synth playback |
Usage
~cc.synths.play(\cc_kick, \freq, 48, \amp, 0.8);
~cc.fx - Effects System
18 built-in effects with routing, chaining, and sidechaining.
| Method |
Description |
load(name, slot) |
Load effect (slot defaults to fx_<name>) |
set(slot, ...args) |
Set effect parameters |
bypass(slot, bool) |
Bypass/re-enable effect |
remove(slot) |
Remove effect |
route(source, target) |
Route Pdef/Ndef to effect |
connect(from, to) |
Chain effect output to another effect |
sidechain(name, threshold, ratio, attack, release) |
Create sidechain compressor |
routeTrigger(source, sidechainName, passthrough) |
Route trigger to sidechain |
routeToOutput(source, channels) |
Route to hardware outputs |
list |
Available effect names |
describe |
Effect descriptions with params |
status |
Current effects and routing |
Usage
~cc.fx.load(\reverb);
~cc.fx.route(\bass, \fx_reverb);
~cc.fx.set(\fx_reverb, \mix, 0.5, \room, 0.9);
~cc.midi - MIDI Control
| Method |
Description |
listDevices |
List available MIDI devices |
connect(device, direction) |
Connect device (\in or \out) |
connectAll |
Connect all MIDI inputs |
disconnect(direction) |
Disconnect (\in, \out, or \all) |
play(synthName, channel, mono, velToAmp, ccMappings) |
Play synth via MIDI |
stop |
Stop current MIDI synth |
status |
Get MIDI status |
Usage
~cc.midi.connectAll;
~cc.midi.play(\lead, nil, false, true, (
1: \cutoff, // CC1 -> cutoff
74: (param: \res, range: [0.1, 0.9]) // CC74 -> res with range
));
~cc.samples - Sample Management
Samples from ~/.claudecollider/samples.
| Method |
Description |
load(name) |
Load sample buffer into memory |
at(name) |
Get buffer (nil if not loaded) |
play(name, rate, amp) |
One-shot playback |
free(name) |
Free buffer |
reload |
Rescan directory for new files |
names |
Array of sample names |
list |
Comma-separated list |
Usage
~cc.samples.load(\kick);
~cc.samples.play(\kick, 1, 0.8);
Pdef(\samp, Pbind(\instrument, \cc_sampler, \buf, ~cc.samples.at(\kick), \dur, 1)).play
~cc.recorder - Audio Recording
Records to ~/.claudecollider/recordings.
| Method |
Description |
start(filename) |
Start recording (auto-names if nil) |
stop |
Stop recording, returns path |
status |
Recording status |
isRecording |
Boolean |
~cc.state - Bus Management
Named control/audio buses stored in current environment.
| Method |
Description |
bus(name, numChannels, rate) |
Get or create bus (also sets ~name) |
setBus(name, value) |
Set bus value |
getBus(name) |
Get bus by name |
freeBus(name) |
Free bus |
clear |
Free all buses |
Usage
~cc.state.bus(\cutoff, 1, \control);
~cc.state.setBus(\cutoff, 2000);
Synth(\cc_acid, [\cutoff, ~cutoff.asMap]); // Map bus to param
1---2name: claude-collider3description: Use when live coding music with SuperCollider via ClaudeCollider MCP server.4---5
6# SuperCollider Live Coding with ClaudeCollider
7
8This skill enables live music synthesis using SuperCollider via the ClaudeCollider MCP server.
9
10## Quick Reference
11
12### Key Rules
13
141. **Drums need `\freq, 48`** - IMPORTANT Without it, drums sound wrong
152. **Use Pdef for rhythms** - Patterns that repeat
163. **Use Ndef for continuous** - Pads, drones, textures
174. **Symbols not strings** - `\kick` not `"kick"`
185. **Semicolons between statements** - No trailing semicolon
196. **NEVER Synth() inside Ndef** - Causes infinite spawning
20
21---
22
23# CC API Reference
24
25The main entry point stored in `~cc`. Access subsystems via `~cc.synths`, `~cc.fx`, `~cc.midi`, `~cc.samples`, `~cc.recorder`, `~cc.state`.
26
27## CC - Main Class
28
29| Method | Description |
30| ---------------------------------------- | ------------------------------------------------------- |
31| `tempo(bpm)` | Get/set tempo in BPM |
32| `stop` | Stop all Pdefs and Ndefs |
33| `clear` | Full reset: free all synths, patterns, effects, samples |
34| `status` | Get formatted status string |
35| `reboot(device, numOutputs, onComplete)` | Restart the server |
36
37---
38
39## ~cc.synths - Synth Definitions
40
4127+ pre-built synths with `cc_` prefix.
42
43| Method | Description |
44| --------------------- | ----------------------------------- |
45| `list` | Comma-separated list of synth names |
46| `describe` | Detailed descriptions with params |
47| `play(name, ...args)` | One-shot synth playback |
48
49### Usage
50
51```supercollider
52~cc.synths.play(\cc_kick, \freq, 48, \amp, 0.8);
53```
54
55---
56
57## ~cc.fx - Effects System
58
5918 built-in effects with routing, chaining, and sidechaining.
60
61| Method | Description |
62| ---------------------------------------------------- | ------------------------------------------ |
63| `load(name, slot)` | Load effect (slot defaults to `fx_<name>`) |
64| `set(slot, ...args)` | Set effect parameters |
65| `bypass(slot, bool)` | Bypass/re-enable effect |
66| `remove(slot)` | Remove effect |
67| `route(source, target)` | Route Pdef/Ndef to effect |
68| `connect(from, to)` | Chain effect output to another effect |
69| `sidechain(name, threshold, ratio, attack, release)` | Create sidechain compressor |
70| `routeTrigger(source, sidechainName, passthrough)` | Route trigger to sidechain |
71| `routeToOutput(source, channels)` | Route to hardware outputs |
72| `list` | Available effect names |
73| `describe` | Effect descriptions with params |
74| `status` | Current effects and routing |
75
76### Usage
77
78```supercollider
79~cc.fx.load(\reverb);
80~cc.fx.route(\bass, \fx_reverb);
81~cc.fx.set(\fx_reverb, \mix, 0.5, \room, 0.9);
82```
83
84---
85
86## ~cc.midi - MIDI Control
87
88| Method | Description |
89| ------------------------------------------------------ | ------------------------------------- |
90| `listDevices` | List available MIDI devices |
91| `connect(device, direction)` | Connect device (`\in` or `\out`) |
92| `connectAll` | Connect all MIDI inputs |
93| `disconnect(direction)` | Disconnect (`\in`, `\out`, or `\all`) |
94| `play(synthName, channel, mono, velToAmp, ccMappings)` | Play synth via MIDI |
95| `stop` | Stop current MIDI synth |
96| `status` | Get MIDI status |
97
98### Usage
99
100```supercollider
101~cc.midi.connectAll;
102~cc.midi.play(\lead, nil, false, true, (
103 1: \cutoff, // CC1 -> cutoff
104 74: (param: \res, range: [0.1, 0.9]) // CC74 -> res with range
105));
106```
107
108---
109
110## ~cc.samples - Sample Management
111
112Samples from `~/.claudecollider/samples`.
113
114| Method | Description |
115| ----------------------- | ------------------------------ |
116| `load(name)` | Load sample buffer into memory |
117| `at(name)` | Get buffer (nil if not loaded) |
118| `play(name, rate, amp)` | One-shot playback |
119| `free(name)` | Free buffer |
120| `reload` | Rescan directory for new files |
121| `names` | Array of sample names |
122| `list` | Comma-separated list |
123
124### Usage
125
126```supercollider
127~cc.samples.load(\kick);
128~cc.samples.play(\kick, 1, 0.8);
129Pdef(\samp, Pbind(\instrument, \cc_sampler, \buf, ~cc.samples.at(\kick), \dur, 1)).play
130```
131
132---
133
134## ~cc.recorder - Audio Recording
135
136Records to `~/.claudecollider/recordings`.
137
138| Method | Description |
139| ----------------- | ----------------------------------- |
140| `start(filename)` | Start recording (auto-names if nil) |
141| `stop` | Stop recording, returns path |
142| `status` | Recording status |
143| `isRecording` | Boolean |
144
145---
146
147## ~cc.state - Bus Management
148
149Named control/audio buses stored in current environment.
150
151| Method | Description |
152| ------------------------------ | ------------------------------------- |
153| `bus(name, numChannels, rate)` | Get or create bus (also sets `~name`) |
154| `setBus(name, value)` | Set bus value |
155| `getBus(name)` | Get bus by name |
156| `freeBus(name)` | Free bus |
157| `clear` | Free all buses |
158
159### Usage
160
161```supercollider
162~cc.state.bus(\cutoff, 1, \control);
163~cc.state.setBus(\cutoff, 2000);
164Synth(\cc_acid, [\cutoff, ~cutoff.asMap]); // Map bus to param
165```