draft project

Music as Code

the score is source code

Learn to make music by programming it โ€” live-coding environments like Strudel and the wider family of music-programming languages โ€” where composing means writing code that sings.

A copy carries over only the public parts you see here โ€” the owners' private files never leave their own vaults.

๐Ÿšง Draft โ€” not final. This page was auto-generated as day-one scaffolding for the project and still needs a human pass before it reads as finished. The blanks and placeholders below are intentional โ€” someone who runs this project should fill them in and delete this notice.

Patches log

One entry per experiment. Paste the exact code, say what it makes, and leave a "next" so tomorrow starts with a question, not a blank page. Everything here runs in Strudel โ€” paste and press play.

Patch 001 โ€” hello beat ยท 2026-07-21

sound("bd hh sd hh")

A four-on-the-floor skeleton: kick, hat, snare, hat. The first proof that code makes sound. bd = bass drum, sd = snare, hh = hi-hat; each name is one step in the bar.

Heard: steady, a little stiff โ€” no swing yet. Next: make the hats faster with hh*2, and try .swingBy(1/3, 4) to loosen it.

Patch 002 โ€” a note to hang it on ยท 2026-07-21

stack(
  sound("bd hh sd hh"),
  note("c4 e4 g4 e4").sound("piano")
)

stack(...) plays layers together. Now there's a drum bed and a little arpeggio over it. First time it sounded like music and not a metronome.

Next: move the arpeggio into a minor shape (c4 eb4 g4 eb4) and hear the mood flip.