We work with code every day, but music is also built on patterns and logical structures. In this live demo I'll show how we can generate music directly in the browser using only code, and how musical ideas like rhythm, harmony, and progression can be expressed through simple logic and repetition.
- A PC with a modern browser (Chrome or Firefox recommended)
- Speakers or headphones
- strudel.cc — no installation required, runs entirely in the browser
- Strudel Workshop Documentation — full local copy of the strudel.cc workshop and reference pages
Start with the basics — play a melody using note names and numbers on a piano sound. Introduce sequences, rhythm, and how notes map to pitches.
Turn the notes into an arpeggio — a rapid succession of individual notes from a chord. Show how speed, repetition, and pattern structure create movement.
Introduce a second layer using a strings sound playing chords. Show how multiple notes played together create harmony.
Combine both layers and play them simultaneously. Show how to transpose the pattern — shifting all notes up or down — to create chord progressions.
Shape the sound with effects: low-pass filter to add warmth or brightness, reverb for space, delay for echo. Show how effects bring the music to life.
Make effects move over time using signals like sine and saw. Automate filter cutoffs, gain, and other parameters to create evolving, breathing textures.
Add the rhythm section — build a drum pattern from scratch, swap drum machine sounds, and use gain to add dynamics and punch.