Every code block below is a live editor. Change anything, hit the play button, hear what breaks. That’s the whole method.
Play the code first. Listen. Then read the text around it. The sound comes before the name. Always.
Chest Opening Jingle — Koji Kondo (The Legend of Zelda, 1986). 4 notes ascending. Every human alive recognizes it. The smallest meaningful musical gesture. This is what sequencing sounds like.
Coin Sound — Koji Kondo (Super Mario Bros., 1985). Two notes. A reward signal burned into collective memory. Pitch, duration, and why sound design is composition.
Before you can write a symphony you need to write 4 notes that mean something. Kondo did it in 1986 and 40 years later you still hear it in your sleep.
Press play. Don't read anything else yet.
Four notes. Ascending. A C major arpeggio. (Listen to the actual Zelda chest jingle — we'll get the real transcription in soon. For now, this teaches the concept: a short pattern that carries meaning.)
Now this one:
Two notes. The Mario coin. You've heard this ten thousand times. It means you got something. Two notes, and they carry meaning.
That's composition. Sounds placed in time that make a human feel something.
note("c4 e4 g4 c5") is a pattern. It tells Strudel which notes to play and in what order. The notes cycle through one per beat. That's all a pattern is: a sequence of events in time.
Strudel's mini-notation is how you write patterns. Let's take the Zelda jingle apart.
One note. Repeating. That's a pattern with one event. Now add the second:
Two notes. They split the cycle evenly. Each gets half the time. Add the third and fourth:
Spaces separate events. More events = each one gets less time. "c4 e4 g4 c5" means four notes, evenly spaced across one cycle. This is mini-notation. Strudel's way of writing rhythmic sequences in a single string.
Change c5 to e5. What happens to the feeling? Now try g3 instead. The pattern is the same (four notes, evenly spaced) but the pitch changes everything.
Now let's get percussive:
s() instead of note(). This plays samples instead of synth notes. bd is a kick drum. hh is a hi-hat. sd is a snare. Same pattern logic: four events, evenly spaced.
Swap sd for cp (clap). Try "bd bd sd bd". Try "bd hh sd hh bd hh sd oh". Eight events now. Double-time. The pattern language is the same. Only the density changes.
(3,8) distributes three kicks as evenly as possible across eight slots. The math picks the spacing. Even distribution tends to sound good.
Try (5,8), (3,4), (7,16), (2,5). Different numbers, different feel. Some of these are West African and Afro-Cuban rhythms, centuries old.
Hear that pattern you just played? That’s the tresillo. Three hits, eight slots, spaced as evenly as possible.
What you’re looking at is a rhythm necklace: a circular pattern where rotation doesn’t change the shape, only where beat 1 falls. Every row in the table above is a different necklace. The tresillo and the son clave are the same necklace, worn differently.
Distribute 3 hits across 8 slots as evenly as possible. The gaps between hits can only ever be two sizes (here, 3 and 2). That’s maximal evenness.
[x . . x . . x .]
| pattern | name | tradition | vibe |
|---|---|---|---|
| (3,8) | Tresillo | Cuban / West African | The backbone of Afro-Cuban music. Claves, cowbell, bass. |
| (5,8) | Cinquillo | Cuban contradanza | Tresillo’s denser cousin. Timbales, guiro. |
| (3,4) | Cumbia | Colombian / Persian | Nearly full: three hits, one gap. |
| (7,12) | West African bell | Ashanti / Yoruba / Ewe | The standard bell pattern. Everything else plays around it. |
| (5,16) | Bossa nova | Brazilian | Two bars of floating syncopation. |
| (7,16) | Samba | Brazilian | Dense, driving agogo bell pattern. |
(3,8,2) is the same three hits, started from a different position. Same necklace, different downbeat. The tresillo and the son clave are rotations of each other. Same math, different groove.
< > rotates through its options, one per cycle. Snare, clap, snare, clap.
[ ] subdivide • *N multiply • ~ rest • (k,n) euclidean • < > alternate
Five tools. Every rhythm in this course uses some combination of these.
One pattern is a melody. Two patterns playing at the same time is a texture. Strudel uses stack() to play multiple patterns simultaneously.
The Zelda jingle over a basic beat. Two layers. This is how all music works. Independent voices happening at the same time. A melody doesn't exist alone. It exists against something.
Koji Kondo composed on the NES. 5 audio channels: 2 pulse waves, 1 triangle, 1 noise, 1 sample. Every sound in every Nintendo game came from those 5 voices. You're working with the same idea. stack() lets you layer voices, but each one has to earn its place.
Add a third layer: note("c3").s("sawtooth").lpf(400). A low filtered bass note. Feel how it changes the weight of everything above it.
s() plays a recording. Someone hit a drum, we play it back. note() generates a wave from scratch. No recording, just math. Samples sound “real.” Synths sound “electronic.” Both are patterns.
| wave | sound | code |
|---|---|---|
| sine | pure, clean, sub-bass | .s("sine") |
| sawtooth | bright, buzzy, leads + bass | .s("sawtooth") |
| square | hollow, woody, chiptune | .s("square") |
| triangle | soft, muted, gentler saw | .s("triangle") |
A filter removes frequencies. .lpf(500) = low-pass filter at 500hz. Everything above 500hz gets cut. The number is the cutoff. Lower number = darker sound. Higher = brighter.
| filter | does | code |
|---|---|---|
| lpf | cuts highs (low-pass) | .lpf(500) |
| hpf | cuts lows (high-pass) | .hpf(200) |
An envelope shapes a sound over time. Four stages:
| stage | controls | code |
|---|---|---|
| attack | how fast the sound starts | .attack(0.01) |
| decay | how fast it drops from peak | .decay(0.1) |
| sustain | level it holds at (0–1) | .sustain(0.5) |
| release | how fast it fades after stopping | .release(0.3) |
.sustain(0) with a short .decay() = a pluck. No sustain, instant drop.
Every lesson in this course builds a piece of ambient music alongside the main exercises. By Lesson 7 you'll have a finished 60-90 second track.
Your instrument: a koto, a 13-string Japanese instrument plucked with fingerpicks. It sounds like a harp with edges. .sound("gm_koto") loads it from Strudel's General MIDI bank. Three or four notes placed in silence. The beginning of something.
Sparse. Mostly silence. The ~ is a rest, a deliberate gap. The delay and room let each note ring out and decay into the space around it.
This is the seed. Over the next 7 lessons, you'll add a pulse, a drone, a second voice, and effects. By Lesson 7, you'll have a finished piece.
Change the notes. Keep the silences. The ~ rests are doing as much work as the notes. Try "a3 ~ ~ ~ d4 ~ ~ e4". Try your own. Find 3-4 notes that feel like grey water and distance.
Put it all together. A beat, a melody, and your ambient sketch layered on top. This is yours. Change anything. Break it. Fix it. Share it.
note("b5 e6")). How does 2 notes vs 4 change the feel?| tool | does | looks like |
|---|---|---|
| s() | plays a sample by name | s("bd sd hh") |
| note() | plays a pitched note through a synth | note("c2 eb2") |
| stack() | layers patterns on top of each other | stack(s("bd"), s("hh*8")) |
| [ ] | subdivides a slot (crams sounds in) | s("bd [sd sd]") |
| *N | repeats a sound N times in one slot | s("hh*8") |
| ~ | rest: holds the slot silent | s("bd ~ sd ~") |
| (k,n) | euclidean: distributes k hits across n slots | s("bd(3,8)") |
| < > | alternates options, one per cycle | s("bd <sd cp>") |
| .method() | chains effects onto a pattern | .lpf(500).gain(.5) |
| .s() | sets the sound source (sample or synth type) | .s("sawtooth") |
| .gain() | sets volume (0 to 1+) | .gain(.5) |
| .lpf() | low-pass filter: cuts frequencies above cutoff | .lpf(500) |
| .decay() | how fast the sound drops from peak | .decay(.15) |
| .sustain() | level the sound holds at after decay | .sustain(0) |
| sawtooth | a bright, buzzy synthesizer wave | .s("sawtooth") |
Next: The Break. 170bpm, half-time snare, an actual DnB beat.
| syntax | name | does | example |
|---|---|---|---|
| [ ] | brackets | subdivides a slot | s("bd [sd sd]") |
| *N | multiply | repeats N times in one slot | s("hh*8") |
| ~ | rest | silence, holds the slot | s("bd ~ sd ~") |
| (k,n) | euclidean | distributes k hits across n slots | s("bd(3,8)") |
| (k,n,r) | euclidean + rotation | same but rotated r steps | s("bd(3,8,2)") |
| < > | alternate | one option per cycle, rotating | s("bd <sd cp>") |
| /N | slow | stretches pattern across N cycles | s("[bd sd hh oh]/2") |
| !N | replicate | repeats without changing speed | s("bd!3 sd") |
| ? | degrade | 50% chance of silence | s("hh*8?") |
Tracks that demonstrate this lesson’s concepts.
| artist | track | why |
|---|---|---|
| Koji Kondo | Super Mario Bros.: Coin Jingle (1985) | (VGM) inspired by the two-note motif, instant dopamine, the shortest motif in gaming |
| Koji Kondo | Super Mario Bros.: Overworld (1985) | (VGM) inspired by the C major groove, the most recognized game melody, 5-channel NES |
| Kraftwerk | Numbers (1981) | (electronic) minimal pattern construction from drum machine loops |
| Derrick May | Strings of Life (1987) | (electro) a piano loop becomes a complete dance track |
| New Order | Blue Monday (1983) | (synth-pop) programmed loop as the whole song |
| Afrika Bambaataa | Planet Rock (1982) | (electro) Kraftwerk samples fused with the South Bronx, bridging Düsseldorf to hip-hop |
The idea of repeating patterns as music predates electronics by centuries — player pianos, music boxes, barrel organs. But the electronic loop changed everything.
In 1952–53 at the WDR studio in Cologne, Stockhausen created Studie I and Studie II — the first purely electronic compositions, built from sine wave generators and tape splicing. He demonstrated that sound could be constructed, not just recorded. His student Holger Czukay went on to found Can. His ideas directly influenced Kraftwerk.
Ralf Hütter and Florian Schneider built custom instruments — the Synthanorma sequencer could store 32 steps and repeat them. Trans-Europe Express (1977) and Computer World (1981) proved that machine repetition wasn’t cold — it was hypnotic. Afrika Bambaataa sampled “Numbers” and “Trans-Europe Express” for “Planet Rock” (1982), connecting Düsseldorf to the South Bronx.
Juan Atkins, Derrick May, and Kevin Saunderson — the Belleville Three — heard Kraftwerk on late-night radio in Detroit and fused it with Parliament-Funkadelic. Atkins: “I just thought it was some cool shit from outer space.” May’s “Strings of Life” (1987) demonstrated that a programmed loop could carry the emotional weight of a live performance.
Sources: Stockhausen, Studie II (1954); Bussy, Kraftwerk: Man, Machine and Music (2004); Sicko, Techno Rebels (2010); Reynolds, S. Energy Flash (1998).