A live-coded beat created using Strudel, a JavaScript-based music live-coding environment. This project demonstrates layering drums, bass, guitar, piano, and strings, with multi-bar sequencing using stack() and seq().
- 2-bar drum groove with hi-hats, kick, snare, and reverb effects.
- Bass and guitar loops with natural timing.
- Piano and string layers for harmonic depth.
- Section sequencing using
seq()to create an intro and full section.
setcpm(83/4)
const DRUMS = stack(
sound("hh*8"),
sound("bd*2 sd bd sd").room(0.4).roomsize(2)
).slow(2)
const BASS = note("[36 34 41 39]/4")
.sound("gm_acoustic_bass")
const GUITAR = note("48 67 63 [62, 58]")
.sound("gm_electric_guitar_muted")
const PIANO = note("48 67 63 [62, 58]")
.sound("piano")
const strings = n(`<
[~ 0] 2 [0 2] [~ 2]
[~ 0] 1 [0 1] [~ 1]
[~ 0] 3 [0 3] [~ 3]
[~ 0] 1 [0 1] [~ 1]
>*4`).scale("C4:minor")
.sound("gm_synth_strings_1")
seq(
stack(DRUMS, BASS), // intro
stack(DRUMS, BASS, GUITAR, PIANO, strings) // section
)- DRUMS: Hi-hat and kick/snare loop with
.room()and.roomsize()to add space/reverb..slow(2)stretches the loop over 2 bars. - BASS: One-bar repeating bass notes.
- GUITAR: Electric muted guitar pattern.
- PIANO: Simple harmonic layer matching guitar.
- STRINGS: Synth string chords, using
n()andscale()for minor chord sequences. - seq(): Plays an intro first (drums + bass), then adds all instruments in the full section.
- Strudel (Browser REPL recommended)
- Node.js >= 18 (optional for local builds)
- npm (optional)
- Open the Strudel REPL in your browser.
- Copy the code from this repository.
- Press Ctrl + A to select the code, and Ctrl + Enter to play (Or just click the
Playbutton).
- Change drum, bass, guitar, piano, or string patterns.
- Experiment with
.room(),.roomsize(),.slow(), and.scale(). - Add more sections using
seq().
MIT License