Complete patterns, each runnable as written. Take them apart, change one thing, and listen to what it did — the fastest way to learn the vocabulary.
1. The built-in examples
Coypu ships runnable examples in the image. Each opens a Playground already filled in, so you can evaluate it line by line:
SuperDirtExamples new dirtNotes101.
SuperDirtExamples new randomotes101.
SuperDirtExamples new techno101.
All three assume SuperCollider with SuperDirt running — see Setup §4.2. They are also browsable as class-side scripts in Pharo.
Everything below uses SuperDirt sample names, and all of it starts from this preamble:
p := Performance uniqueInstance.
p performer: PerformerSuperDirt new.
p freq: 126 bpm.
p play.
2. Grooves
2.1 Four-to-the-floor
16 downbeats to: #bd.
16 upbeats to: #hh.
#( 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 ) asSeq to: #cp.
(16 quavers gain: 0.8; pan: #( 0.3 0.7 )) to: #hh27.
The kick on every fourth step, the hat on the offbeats between them, a clap on two and four. The second hat alternates left and right because its pan list is shorter than its trigger count.
2.2 Clave-driven
16 tumbao to: #bd.
16 claveSon to: #cp.
16 bembe to: #hh.
(16 tresillo notes: #( 36 36 43 ); room: 0.2) to: #bass.
Four Afro-Atlantic timelines at once, each a different length of the same tradition. Swap
claveSon for rumba and the whole thing leans differently.
2.3 Jungle
p freq: 170 bpm.
32 jungleKick to: #bd.
32 jungleSnare to: #sn.
32 jungleRim to: #rim.
(32 semiquavers gain: 0.6; speed: #( 1 1 2 1 )) to: #hh.
"a half-time bass underneath"
(32 downbeats notes: #( 28 28 31 26 ); pitch: #( 0 )) to: #bass.
2.4 Polymetre
16 downbeats to: #bd. "16 steps"
13 trueAksak to: #perc. "13"
10 aksak to: #cp. "10"
8 tresillo to: #hh. "8"
Four lengths with no common factor beyond 2 — the whole arrangement realigns only after hundreds of steps, so it never quite repeats. This is the cheapest way to get music that evolves without any generative machinery.
3. Melodic patterns
"a bass line with a harmonic cycle"
(16 tumbao notes: #( 36 36 43 41 ))
progression: #( 0 0 5 7 ); to: #bass.
"a pentatonic line that is different every time you evaluate it"
(16 quavers notes: (8 randomWalksOn: Scale pentaMinor octaves: 2 root: 60))
to: #arpy.
"an arpeggio over two chords"
(16 semiquavers arpeggiate: '0-min7 5-maj7'; gain: 0.7) to: #psg.
"a sparse, wide melody from a Japanese scale"
((16 randomTrigsWithProbability: 35)
notes: (6 randomWalksOn: Scale sakura octaves: 3 root: 48);
room: 0.5) to: #arpy.
4. Mondo patterns
These need the cyclic transport — p playCyclicFor: 64 rather than p play.
"a kit that varies its second beat each cycle"
'bd <sd cp> bd [sd sd]' asMondoSounds to: #drums.
"a melody with nested subdivision"
'c4 e4 [g4 b4] <c5 a4>' asMondoNotes to: #arpy.
"a fill that arrives once every four cycles"
'bd sd bd [sd sd sd]/4' asMondoSounds to: #drums.
"three-against-four inside one cycle"
'[bd bd bd] [hh hh hh hh]' asMondoSounds to: #drums.
p playCyclicFor: 64.
The last one is worth dwelling on: two groups sharing one cycle, one subdivided into three and the other into four, with no tuplet notation and no tempo change.
5. Textures
"a slowly opening filter over a dense hat"
(16 semiquavers
djf: #( 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 );
gain: 0.5) to: #hh.
"tempo-locked delay on a sparse percussion line"
((16 randomTrigsWithProbability: 20)
delay: 0.6; delayTime: 0.125; delayFb: 0.7; lock: 1) to: #perc.
"pitched-down samples as a drone"
(16 wholes speed: 0.25; room: 0.9; size: 0.9; gain: 0.7) to: #pad.
"the whole kit onto one rhythm — a section marker"
p rhythm: 16 tresillo.
6. Finding sounds
The examples above use common SuperDirt folders, but your installation decides what exists. Coypu can list them:
| Message | Answers |
|---|---|
| SuperDirt listOfSamples | Every sample folder available |
| SuperDirt listOfDrums | Just the drum folders |
| SuperDirt listOfSynths | SuperDirt's built-in synths |
| SuperDirt listOfDrumSynth | Its drum synths |
| SuperDirt openListOfSynths | The synth list in a window |
| SuperDirt samplesFolder | Where it is looking |
Synth names work as instrument keys just as sample folders do, so
16 downbeats to: #superpiano plays a synth rather than a sample.
16 randomSamplesFromFolder: 'cp' builds a pattern of random samples from one
folder — a quick way to hear what is in it.
8. Troubleshooting
An instrument name produces nothing
That folder does not exist in your SuperDirt installation. Check
SuperDirt listOfSamples — §6.
The Mondo examples do not vary
They need playCyclicFor:, not play — §4.
The jungle example sounds like a mess
Something alongside it is not a multiple of 32 steps — §2.3.
The polymetre example never repeats
That is the point — §2.4. Use p loop: 64 if you want a fixed phrase.
The built-in examples raise an error
All three need SuperDirt running in SuperCollider before you evaluate them — §1 and Setup §4.2.
Everything is too loud together
Gains add up. Pull individual parts down with gain: rather than turning the
system volume down — you keep the balance that way.