Step 11 of 11
Example tracks
Complete tracks in different styles, each with a step-by-step "how it was made".
- 11.1 All tracks
- 11.2 Hardcore
- 11.3 Rise & Fall
- 11.4 Classical
- 11.5 Bach: Prelude in C
- 11.6 Pachelbel: Canon in D
- 11.7 Chord Colours
- 11.8 Extensions Étude
- 11.9 Open Road
11.1All the example tracks
Complete tracks in different styles, each built with the techniques from the course: layers, blocks and arrange. Play them, take them apart, and use them as starting points for your own music.
| Track | Style | Tempo | Key | Length | Where |
|---|---|---|---|---|---|
| Night Bus | Deep house | 124 BPM | A minor | 48 bars · 1:33 | 1.3 (loop), 5.2 (song) |
| Hardcore | Hardcore / gabber | 175 BPM | F minor | 64 bars · 1:28 | Below |
| Rise & Fall | Progressive house · transition demo | 128 BPM | D minor | 72 bars · 2:15 | Below |
| Prelude in C (J. S. Bach) | Classical / Baroque · harmony as notes | 66 BPM | C major | 8 bars · 0:29 | Below |
| Canon in D (J. Pachelbel) | Classical / Baroque · harmony as chords | 66 BPM | D major | 16 bars · 0:58 | Below |
| Chord Colours | Lo-fi house · chord types + effects | 96 BPM | C major | 36 bars · 1:30 | Below |
| Extensions Étude | Guitar exercise · tab → notes | 84 BPM | C major | 17 bars · 0:49 | Below |
| Open Road | Folk pop · sus chords | 92 BPM | D major | 36 bars · 1:34 | Below |
11.2Hardcore
The style: fast (160–200 BPM), loud and energetic. It's built on a heavily distorted kick drum that plays every beat and doubles as the bass, with short supersaw stabs, snare-roll build-ups, and emotional breakdowns between the drops. It started in the Netherlands in the early 1990s, where the hardest form is called gabber.
| Layer | How it's made |
|---|---|
kick | A TR-909 kick stacked with a synth kick (sbd) tuned to F, both through distort. Two layers give it both a punchy click and a tuned, booming body. |
lead | 16th-note supersaw stabs. They're short because of .decay(.13).sustain(0), written as scale steps that follow the chords with .add("<0 -2 2 -1>") (lesson 3.5), with a little distortion, reverb and delay. |
stabs | Chord stabs from the same progression, quieter, underneath the riff |
bass | Off-beat sawtooth on each chord's root: chord(prog).rootNotes(2) |
roll | A snare roll that doubles its speed (ply) and grows louder (saw.range) over the 4-bar build |
choir, piano, pad | The breakdown: gm_choir_aahs, a piano arpeggio (n("[0 1 2 3]*2").chord(…)) and a warm pad |
// HARDCORE · F minor · 175 BPM · 64 bars (about 1:28)
setcpm(175/4)
const prog = "<Fm Db Ab Eb>" // chord progression, one chord per bar
// ---------- drums ----------
// the hardcore kick: a 909 kick + a tuned synth kick, both distorted
const kick = stack(
s("bd*4").bank("RolandTR909").distort("5:.35"),
note("f1*4").s("sbd").decay(.3).distort("8:.3").lpf(2500)
).gain(.85)
const clap = s("~ cp ~ cp").bank("RolandTR909").room(.3).gain(.7)
const ohat = s("[~ oh]*4").bank("RolandTR909").gain(.45)
const hats = s("hh*16").bank("RolandTR909").gain("[.15 .35]*8")
const crash = s("<cr ~ ~ ~ ~ ~ ~ ~>").bank("RolandTR909").gain(.55) // every 8 bars
const roll = s("sd*16").bank("RolandTR909")
.ply("<1 1 2 2>").gain(saw.range(.15, .8).slow(4)) // build-up snare roll
// ---------- bass & lead ----------
// rolling off-beat bass on the chord roots
const bass = chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(450).decay(.12).sustain(0).gain(.7)
// the riff: 16th-note stabs in F minor, shifted to follow the chords
const lead = n("[0 0 4 0] [7 0 4 0] [0 0 4 0] [6 5 4 2]".add("<0 -2 2 -1>"))
.scale("F4:minor")
.s("supersaw").decay(.13).sustain(0)
.distort("2:.5").lpf(3500).room(.3)
.delay(.25).delaytime(.26).delayfeedback(.35)
.gain(.5)
// chord stabs underneath the riff
const stabs = chord(prog).struct("x ~ ~ x ~ ~ x ~").voicing()
.s("supersaw").decay(.2).sustain(0).distort("2:.5").lpf(2500)
.room(.4).gain(.3)
// ---------- breakdown ----------
const choir = chord(prog).voicing().s("gm_choir_aahs").room(.8).gain(.6)
const piano = n("[0 1 2 3]*2").chord(prog).voicing().s("piano").room(.5).gain(.5)
const pad = chord(prog).anchor("c4").voicing().s("gm_pad_warm").gain(.35)
// ---------- blocks ----------
const intro = stack(kick, hats, lead.lpf(saw.range(300, 3000).slow(8)))
const build = stack(roll, hats, lead.lpf(saw.range(500, 5000).slow(4)))
const drop = stack(kick, clap, ohat, hats, crash, bass, lead, stabs)
const breakdown = stack(choir, piano, pad)
const outro = stack(kick, ohat, hats)
// ---------- the track ----------
$: arrange(
[8, intro],
[4, build],
[16, drop],
[8, breakdown],
[4, build],
[16, drop],
[8, outro]
)
How it was made, step by step
GUIDED · 10 STEPS · IN THE EDITORBuild Hardcore step by step →One step at a time, with the explanation next to the code. Change anything and press Ctrl+Enter.This is the order the track was built in, with the musical reason behind each decision. Each code box is a playable stage, and the highlighted lines are new in that step. Steps 2–6 build the main loop (the drop). Steps 7–9 add the other blocks and put the song together.
| Step | Musical goal | Result |
|---|---|---|
| 1 | Choose tempo, key and chords | 175 BPM, F minor, Fm–Db–Ab–Eb |
| 2 | Design the kick, the heart of hardcore | Two kicks, distorted and tuned to F |
| 3 | Build the groove around it | Clap, open hats, accented 16th hats |
| 4 | Add bass without fighting the kick | Off-beat bass on the chord roots |
| 5 | Write the hook | 16th-note supersaw riff that follows the chords |
| 6 | Fill out the harmony | Syncopated chord stabs |
| 7 | Create contrast | Breakdown: choir, piano, pad, no drums |
| 8 | Create tension before the drop | Build: snare roll, opening filter, no kick |
| 9 | Tell a story over time | Blocks plus arrange: an energy curve |
| 10 | Balance and polish | Volumes, filters, reverb and delay |
Step 1 · Tempo, key and chords
- Tempo 175 BPM. Hardcore lives between 160 and 200 BPM. 175 is fast and energetic, but still leaves room for a riff of 16th notes to be heard clearly (each 16th is 0.086 s).
- Key F minor. Minor keys give the dark, dramatic mood typical of hardcore. F is a good key for the kick: the kick's pitch F1 is about 44 Hz, deep enough to boom but still audible on most speakers.
- Chords Fm – D♭ – A♭ – E♭. In F minor these are chords i – VI – III – VII, an "epic" progression heard all over trance and hardcore. It has no dominant chord (C) pulling strongly back home, so the four-bar loop feels like it keeps climbing instead of ending.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>" // one chord per bar, 4-bar loop
$: chord(prog).voicing().s("gm_pad_warm")
| Command | What it does |
|---|---|
setcpm(175/4) | Tempo: 175 beats per minute ÷ 4 beats per bar = bars (cycles) per minute. |
const prog = "<Fm Db Ab Eb>" | Stores the four chords under the name prog. < > plays one chord per bar. |
chord(prog) | Reads the chord symbols from prog. |
.voicing() | Turns each chord symbol into actual notes, placed close together. |
.s("gm_pad_warm") | Plays those notes on a warm synth pad, just to hear the chords. |
Making chords a const means every later layer (bass, riff, stabs, choir) uses the same progression, so they always fit together.
Step 2 · The kick
In hardcore the kick is the lead instrument. A single drum-machine kick sounds too thin at this speed, so two are layered:
- The TR-909 kick gives the sharp attack, the "click" you feel on every beat.
- The synth kick
sbdtuned to F1 gives the long, booming body. Because it's tuned to the key, the kick plays in harmony with the bass instead of clashing with it. - Distortion on both gives the hardcore character. It turns a round thump into a hard, buzzing hit. The number after the colon lowers the volume to compensate, because distortion makes things louder.
.lpf(2500)trims the harshest top end of the synth kick.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>"
$: s("bd*4").bank("RolandTR909").distort("5:.35")
$: note("f1*4").s("sbd").decay(.3).distort("8:.3").lpf(2500)
| Command | What it does |
|---|---|
s("bd*4") | Kick drum (bd) 4 times per bar, once on every beat. |
.bank("RolandTR909") | Uses the Roland TR-909 drum machine: the sharp attack layer. |
.distort("5:.35") | Distortion: amount 5, output volume 0.35 (turned down to compensate). |
note("f1*4") | The note F1 (~44 Hz), 4 times per bar: the pitch of the second kick. |
.s("sbd") | Plays it on the synth kick: the booming, tuned body layer. |
.decay(.3) | The boom fades out over 0.3 seconds. |
.distort("8:.3") | Heavier distortion (8) on the synth kick, volume 0.3. |
.lpf(2500) | Low-pass filter: removes everything above 2500 Hz, the harshest buzz. |
Step 3 · The groove
- Clap on beats 2 and 4 (
"~ cp ~ cp"): the backbeat. A little reverb (.room(.3)) makes it wider. - Open hat on every off-beat (
"[~ oh]*4"): the "and" between kicks. Kick, hat, kick, hat is the push-and-pull that makes dance music move. - Closed hats in 16ths, accented (
gain("[.15 .35]*8")): every second 16th is louder. The accents fall between the beats, which makes the groove gallop forward instead of ticking evenly.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>"
$: s("bd*4").bank("RolandTR909").distort("5:.35")
$: note("f1*4").s("sbd").decay(.3).distort("8:.3").lpf(2500)
$: s("~ cp ~ cp").bank("RolandTR909").room(.3).gain(.7)
$: s("[~ oh]*4").bank("RolandTR909").gain(.45)
$: s("hh*16").bank("RolandTR909").gain("[.15 .35]*8")
| Command | What it does |
|---|---|
s("~ cp ~ cp") | Clap on beats 2 and 4 (~ = rest on beats 1 and 3). |
.room(.3) | A little reverb on the clap. |
.gain(.7) | Clap volume 0.7. |
s("[~ oh]*4") | "Rest, open hat" four times: an open hat on every off-beat. |
s("hh*16") | Closed hi-hat 16 times per bar (16th notes). |
.gain("[.15 .35]*8") | Alternates quiet (0.15) and loud (0.35). Every second 16th is accented, which drives the groove. |
Step 4 · The bass
The kick already owns the low end on every beat. A bass on the same beats would clash and turn to mud. So the bass plays between the kicks, on the off-beat 8ths ("[~ x]*4"): kick, bass, kick, bass. This "rolling" bass is a trick from trance and hardcore.
chord(prog).rootNotes(2)plays the root of each chord in octave 2: F, D♭, A♭, E♭. The bass follows the chords automatically.- Short notes (
.decay(.12).sustain(0)) end before the next kick, so the two never overlap. - Low-pass at 450 Hz keeps the bass dark, so it doesn't compete with the riff.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>"
$: s("bd*4").bank("RolandTR909").distort("5:.35")
$: note("f1*4").s("sbd").decay(.3).distort("8:.3").lpf(2500)
$: s("~ cp ~ cp").bank("RolandTR909").room(.3).gain(.7)
$: s("[~ oh]*4").bank("RolandTR909").gain(.45)
$: s("hh*16").bank("RolandTR909").gain("[.15 .35]*8")
$: chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(450).decay(.12).sustain(0).gain(.7)
| Command | What it does |
|---|---|
chord(prog).rootNotes(2) | The root note of each chord in octave 2: F, D♭, A♭, E♭. |
.struct("[~ x]*4") | Rhythm: "rest, hit" four times, so the bass plays only on the off-beats, between the kicks. |
.s("sawtooth") | Sawtooth synth sound. |
.lpf(450) | Low-pass at 450 Hz keeps the bass dark and out of the riff's range. |
.decay(.12).sustain(0) | Each note fades to silence in 0.12 s, so it ends before the next kick. |
.gain(.7) | Bass volume 0.7. |
Step 5 · The riff (the hook)
The riff is the part people remember. It's written in scale steps of F minor (.scale("F4:minor")), so every note is in key. It's four groups of four 16th notes, one bar:
| Group | Scale steps | Notes over Fm | Idea |
|---|---|---|---|
| 1 | 0 0 4 0 | F F C F | Hammer the root, jump to the fifth and back: the basic stab |
| 2 | 7 0 4 0 | F(high) F C F | The same, but it starts an octave up: a "jump" for excitement |
| 3 | 0 0 4 0 | F F C F | Back to the basic stab, so the ear recognises it |
| 4 | 6 5 4 2 | E♭ D♭ C A♭ | A falling run that leads into the next bar (a "pickup") |
Following the chords. .add("<0 -2 2 -1>") moves the whole riff each bar to the root of the current chord, counted in scale steps from F: D♭ is 2 steps down, A♭ 2 up, E♭ 1 down. Because the riff is root + fifth, every chord gets its own root and fifth (D♭–A♭, A♭–E♭, E♭–B♭), and they all stay in F minor.
The sound. A supersaw (several detuned sawtooth waves stacked, five by default; the classic hardcore/trance lead). It's cut short (.decay(.13).sustain(0)) so each 16th is a separate stab, with mild distortion for bite. Reverb gives space, and a delay of 0.26 s, a dotted eighth at 175 BPM (60 ÷ 175 × 0.75), makes the echoes land on the off-grid 16ths and fill the gaps.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>"
$: s("bd*4").bank("RolandTR909").distort("5:.35")
$: note("f1*4").s("sbd").decay(.3).distort("8:.3").lpf(2500)
$: s("~ cp ~ cp").bank("RolandTR909").room(.3).gain(.7)
$: s("[~ oh]*4").bank("RolandTR909").gain(.45)
$: s("hh*16").bank("RolandTR909").gain("[.15 .35]*8")
$: chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(450).decay(.12).sustain(0).gain(.7)
$: n("[0 0 4 0] [7 0 4 0] [0 0 4 0] [6 5 4 2]".add("<0 -2 2 -1>"))
.scale("F4:minor")
.s("supersaw").decay(.13).sustain(0)
.distort("2:.5").lpf(3500).room(.3)
.delay(.25).delaytime(.26).delayfeedback(.35)
.gain(.5)
| Command | What it does |
|---|---|
n("[0 0 4 0] [7 0 4 0] [0 0 4 0] [6 5 4 2]" | n(…) takes scale-step numbers. The string is the riff: 4 groups (one per beat) of 4 notes (16ths). 0 = root, 4 = fifth, 7 = octave. |
.add("<0 -2 2 -1>") | Each bar, shifts all steps by 0, −2, +2, −1, moving the riff to the root of the current chord (F, D♭, A♭, E♭). |
.scale("F4:minor") | Turns the step numbers into notes of F minor, starting from F4. |
.s("supersaw") | Supersaw synth: several detuned saws, the classic hardcore lead. |
.decay(.13).sustain(0) | Very short notes, so every 16th is a separate stab. |
.distort("2:.5") | Light distortion for bite, volume 0.5. |
.lpf(3500) | Takes off the very top so the lead isn't piercing. |
.room(.3) | A little reverb for space. |
.delay(.25) | Echo volume 0.25. |
.delaytime(.26) | Echo every 0.26 s, a dotted 8th at 175 BPM. |
.delayfeedback(.35) | How long the echoes keep repeating (higher = more repeats). |
.gain(.5) | Riff volume 0.5. |
Step 6 · Chord stabs
The riff plays single notes, so full chords underneath make the drop sound bigger. Their rhythm is "x ~ ~ x ~ ~ x ~": 3 + 3 + 2 eighths, a syncopated pattern (the "tresillo") that crosses the steady 4/4 kick and adds bounce. They're quieter than the riff (gain(.3)) because they're background. This full loop is now the drop.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>"
$: s("bd*4").bank("RolandTR909").distort("5:.35")
$: note("f1*4").s("sbd").decay(.3).distort("8:.3").lpf(2500)
$: s("~ cp ~ cp").bank("RolandTR909").room(.3).gain(.7)
$: s("[~ oh]*4").bank("RolandTR909").gain(.45)
$: s("hh*16").bank("RolandTR909").gain("[.15 .35]*8")
$: chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(450).decay(.12).sustain(0).gain(.7)
$: n("[0 0 4 0] [7 0 4 0] [0 0 4 0] [6 5 4 2]".add("<0 -2 2 -1>"))
.scale("F4:minor")
.s("supersaw").decay(.13).sustain(0)
.distort("2:.5").lpf(3500).room(.3)
.delay(.25).delaytime(.26).delayfeedback(.35)
.gain(.5)
$: chord(prog).struct("x ~ ~ x ~ ~ x ~").voicing()
.s("supersaw").decay(.2).sustain(0).distort("2:.5").lpf(2500)
.room(.4).gain(.3)
| Command | What it does |
|---|---|
chord(prog).struct("x ~ ~ x ~ ~ x ~") | Chords on 8th-note positions 1, 4 and 7 (3 + 3 + 2): a syncopated rhythm against the kick. |
.voicing() | Turns the chord symbols into notes. |
.s("supersaw").decay(.2).sustain(0) | Short supersaw chords (0.2 s). |
.distort("2:.5").lpf(2500) | A little grit, and darker than the riff so they stay in the background. |
.room(.4).gain(.3) | Some reverb, low volume (0.3). |
Step 7 · The breakdown: contrast
After a long drop, the ear needs a rest, or the next drop won't feel big. The breakdown removes all drums and turns hard into soft. It keeps the same chords, though, so it still feels like the same song.
- Choir (
gm_choir_aahs) holds the chords: human, emotional, a big contrast to the distorted synths. - Piano arpeggio (
n("[0 1 2 3]*2").chord(prog)): chord notes one by one in 8th notes. It keeps some movement without drums. - Warm pad, set lower with
.anchor("c4"), fills the space underneath. - Lots of reverb (
.room(.8)on the choir) makes it sound like a large hall.
setcpm(175/4)
const prog = "<Fm Db Ab Eb>"
$: chord(prog).voicing().s("gm_choir_aahs").room(.8).gain(.6)
$: n("[0 1 2 3]*2").chord(prog).voicing().s("piano").room(.5).gain(.5)
$: chord(prog).anchor("c4").voicing().s("gm_pad_warm").gain(.35)
| Command | What it does |
|---|---|
chord(prog).voicing().s("gm_choir_aahs") | The chords sung by a choir. |
.room(.8) | A lot of reverb: the sound of a large hall. |
n("[0 1 2 3]*2").chord(prog).voicing() | Arpeggio: chord notes 0, 1, 2, 3 (bottom to top), twice per bar, in 8th notes. |
.s("piano").room(.5) | Played on piano, with medium reverb. |
chord(prog).anchor("c4").voicing() | Chords placed lower: anchor("c4") keeps the top note at or below C4 (it must come before .voicing()). |
.s("gm_pad_warm").gain(.35) | Warm pad underneath, quiet. |
(no drum lines) | The drums are left out on purpose: that silence is the contrast. |
Step 8 · The build-up: tension
The four bars before each drop raise the tension, so the drop feels like a release. Three tricks work together:
- No kick. Taking away the most important sound creates a gap. When the kick comes back at the drop, it hits twice as hard.
- A snare roll that speeds up and gets louder: 16ths for 2 bars, then
.ply("<1 1 2 2>")doubles them to 32nds.saw.range(.15, .8).slow(4)raises the volume across the 4 bars. - The riff gets brighter: its filter opens from 500 Hz to 5000 Hz over the 4 bars, so it sounds like it's coming closer.
setcpm(175/4)
$: s("sd*16").bank("RolandTR909")
.ply("<1 1 2 2>").gain(saw.range(.15, .8).slow(4))
$: s("hh*16").bank("RolandTR909").gain("[.15 .35]*8")
$: n("[0 0 4 0] [7 0 4 0] [0 0 4 0] [6 5 4 2]".add("<0 -2 2 -1>"))
.scale("F4:minor")
.s("supersaw").decay(.13).sustain(0)
.distort("2:.5").room(.3).gain(.5)
.lpf(saw.range(500, 5000).slow(4))
| Command | What it does |
|---|---|
s("sd*16") | Snare drum in 16th notes. |
.ply("<1 1 2 2>") | Per bar: hits stay single in bars 1–2 and are doubled in bars 3–4 (32nd notes). The roll speeds up. |
.gain(saw.range(.15, .8).slow(4)) | Volume rises from 0.15 to 0.8 over 4 bars (saw = rising ramp). |
s("hh*16")… | The hats keep the time going. |
.lpf(saw.range(500, 5000).slow(4)) | The riff's filter opens from 500 to 5000 Hz over 4 bars, so it sounds like it's coming closer. |
(no kick lines) | The kick is left out on purpose, so it hits harder when the drop starts. |
Step 9 · Arrangement: the energy curve
Each layer becomes a const, layers are grouped into blocks with stack(), and arrange() puts the blocks in order (lesson 5.2). The order is planned as an energy curve, rising and falling so the listener stays interested:
| Block | Bars | Energy (1–5) | Why it's there |
|---|---|---|---|
| Intro | 8 | 2 | Kick and hats set the tempo. The riff fades in through a slowly opening filter (300 → 3000 Hz over 8 bars), which makes the listener curious. |
| Build | 4 | 3, rising | Tension: no kick, snare roll, the filter opens |
| Drop | 16 | 5 | Release: everything at once. The crash every 8 bars marks the phrases. |
| Breakdown | 8 | 1 | Contrast: no drums, choir and piano |
| Build | 4 | 3, rising | Tension again |
| Drop | 16 | 5 | The peak. It hits harder after the quiet breakdown. |
| Outro | 8 | 2 | Only kick and hats, so a DJ can mix the next track in |
All blocks are multiples of 4 bars, the length of the chord loop. DJs count hardcore in 8- and 16-bar phrases, so the big changes happen at bars 9, 13, 29, 37, 41 and 57. The full code with all blocks is the track above.
Step 10 · Mix and polish
| Decision | Why |
|---|---|
Kick loudest (gain(.85)), riff .5, bass .7, stabs .3, hats .15–.35 | In hardcore the kick leads. Everything else is balanced around it. Background parts (stabs, hats) stay quieter so they don't cover the hook. |
| Each part in its own frequency range: kick ~44 Hz, bass D♭2–A♭2 with lpf 450, riff around F4–F5, hats on top | When parts don't overlap in pitch, each one stays clear, even at high volume. |
Short notes on bass, riff and stabs (decay + sustain(0)) | At 175 BPM long notes blur together. Short ones keep the groove tight and punchy. |
Distortion volume compensated ("8:.3", "2:.5") | Distortion makes sounds louder. Lowering the output keeps the mix from clipping. |
| Little reverb in the drop, a lot in the breakdown | Reverb blurs fast rhythms, but it makes slow chords feel huge. |
| Delay timed to the tempo (0.26 s = dotted 8th) | Echoes land in time with the music instead of smearing it. |
To make your own track in a style, follow the same ten steps: tempo, key and chords → the main drum sound → groove → bass → hook → harmony → contrast → tension → arrangement → mix.
Make it your own
- Faster, gabber-style:
setcpm(190/4) - Harder kick: raise the synth kick's distortion from
"8:.3"to"12:.25". Turn the volume (the number after the colon) down as you go up. - Happy hardcore: a major key. Change
progto"<F C Dm Bb>", the scale to"F4:major", and the riff's offsets to.add("<0 -3 -2 -4>"). Those are the chord roots counted in scale steps from F (C = −3, D = −2, B♭ = −4), so the riff follows the new chords. - A different riff: rewrite the four groups in
lead. Keep 4 numbers per group so it stays in 16th notes. - Longer or shorter: edit the
[bars, block]list at the bottom. Keep blocks a multiple of 4 bars.
11.3Rise & Fall: transitions between blocks
What it shows: how producers move from one block to the next. A plain cut sounds abrupt. Instead, rising sounds (↑) build tension before a new block, and falling sounds (↓) mark its arrival or release the energy. This progressive-house track (D minor, 128 BPM) uses a different technique at every block change, so you can hear each one.
The key tool: ramps. saw is a value that rises from 0 to 1, and isaw falls from 1 to 0. saw.slow(8) takes 8 bars to rise. With .range(a, b) you can make a filter, a volume or a pitch climb or fall over a whole block. Inside arrange, each block starts its ramps from the beginning.
| Where | Technique | What you hear | Code idea | |
|---|---|---|---|---|
| Intro | ↑ | Filter opening | The arpeggio starts muffled and gets brighter over 8 bars | arp.lpf(saw.slow(8).range(200, 2500)) |
| Build | ↑ | Noise riser | A "whoosh" of noise that gets brighter and louder | s("white*16") + rising lpf and gain |
| Build | ↑ | Pitch riser | A scale run climbing two octaves (D3 → D5) | n(saw.slow(8).range(0, 14).round().segment(8)) |
| Build | ↑ | Snare roll | 8ths → 16ths → 32nds, louder and louder | .ply("<1 1 1 1 2 2 4 4>") |
| Build | ↑ | Reverse cymbal | A cymbal played backwards swells into the drop | note("<~!7 c4>").s("gm_reverse_cymbal") |
| Build | ↑ | High-pass sweep | The music gets thinner as its bass is removed, so the full drop feels huge | .hpf(saw.slow(8).range(20, 1500)) |
| Drop, bar 1 | ↓ | Impact | Crash plus a deep boom whose pitch falls | note("d1").s("sbd").penv(36).pdecay(1) |
| Drop, last 2 bars | ↓ | Downlifter | Noise that closes and fades: the energy "falls away" | .lpf(isaw.slow(2).range(300, 10000)) |
| Breakdown, bar 1 | ↓ | Sub drop | A long, very deep boom sliding down 4 octaves | s("sbd").penv(48).pdecay(3) |
| Outro | ↓ | Filter closing | The whole mix gets darker and fades away | stack(…).lpf(isaw.slow(8).range(200, 8000)) |
| Outro, last 2 bars | ↓ | Falling run | A scale run sliding down two octaves (D5 → E3) | n(isaw.slow(2).range(0, 14).round().segment(8)) |
// RISE & FALL · transition demo · D minor · 128 BPM · 72 bars (about 2:15)
setcpm(128/4)
const prog = "<Dm Bb F C>" // one chord per bar
// ---------- music layers ----------
const kick = s("bd*4").bank("RolandTR909")
const clap = s("~ cp ~ cp").bank("RolandTR909").gain(.7)
const hats = s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
const bass = chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(500).decay(.15).sustain(0).gain(.7)
const arp = n("[0 1 2 3]*4").chord(prog).voicing()
.s("sawtooth").lpf(2500).clip(.5).delay(.3).delaytime(.35).gain(.4)
const pad = chord(prog).voicing().s("gm_pad_warm").gain(.4)
const strings = chord(prog).voicing().s("gm_string_ensemble_1").room(.6).gain(.5)
// ---------- ↑ ascending: tension before a new block ----------
// noise sweep: the filter opens and the volume grows over 8 bars
const noiseUp = s("white*16").decay(.06).sustain(0)
.lpf(saw.slow(8).range(300, 12000)).gain(saw.slow(8).range(0, .4))
// pitch riser: a scale run climbing two octaves over 8 bars
const pitchUp = n(saw.slow(8).range(0, 14).round().segment(8)).scale("D3:minor")
.s("supersaw").decay(.12).sustain(0).lpf(4000).gain(saw.slow(8).range(.1, .4))
// snare roll: 8ths, then 16ths, then 32nds, getting louder
const roll = s("sd*8").bank("RolandTR909")
.ply("<1 1 1 1 2 2 4 4>").gain(saw.slow(8).range(.1, .7))
// reverse cymbal: swells up into the drop (last bar of the build)
const revCym = note("<~!7 c4>").s("gm_reverse_cymbal").gain(.8)
// ---------- ↓ descending: arrival and release ----------
// impact: crash + a deep boom whose pitch falls, on the first beat of the drop
const impact = stack(
s("<cr ~!15>").bank("RolandTR909"),
note("<d1 ~!15>").s("sbd").penv(36).pdecay(1).decay(1.5).room(.4)
)
// downlifter: noise that closes and fades over the last 2 bars of the drop
const noiseDown = s("white*16").decay(.06).sustain(0)
.lpf(isaw.slow(2).range(300, 10000)).gain(isaw.slow(2).range(0, .35))
.mask("<0!14 1!2>")
// sub drop: a long falling boom that opens the breakdown
const subDrop = note("<d1 ~!7>").s("sbd").penv(48).pdecay(3).decay(3.5).room(.6)
// falling run: a scale run sliding down two octaves in the last 2 bars of the outro
const pitchDown = n(isaw.slow(2).range(0, 14).round().segment(8)).scale("D3:minor")
.s("supersaw").decay(.12).sustain(0).lpf(3000).gain(.3)
.mask("<0!6 1!2>")
// ---------- blocks ----------
// intro: the arp fades in as its filter opens (↑)
const intro = stack(kick, hats, pad, arp.lpf(saw.slow(8).range(200, 2500)))
// build: all risers (↑) while a high-pass filter thins out the music (↑)
const build = stack(noiseUp, pitchUp, roll, revCym,
stack(hats, pad).hpf(saw.slow(8).range(20, 1500)))
// drop: impact on beat 1 (↓), downlifter at the end (↓)
const drop = stack(impact, kick, clap, hats, bass, arp, pad, noiseDown)
// breakdown: opens with the sub drop (↓), no drums
const breakdown = stack(subDrop, pad, strings, arp.lpf(900).gain(.25))
// outro: the whole mix closes down (↓) and ends with a falling run (↓)
const outro = stack(stack(kick, hats, pad, arp).lpf(isaw.slow(8).range(200, 8000)), pitchDown)
// ---------- the track ----------
$: arrange(
[8, intro],
[8, build],
[16, drop],
[8, breakdown],
[8, build],
[16, drop],
[8, outro]
)
How it was made, step by step
GUIDED · 10 STEPS · IN THE EDITORBuild Rise & Fall step by step →One step at a time, with the explanation next to the code. Change anything and press Ctrl+Enter.Steps 1–4 build the music (the drop loop). Step 5 explains ramps, the tool behind every transition. Steps 6–9 add the transitions one at a time, and some of those code boxes play two blocks back to back so you hear the change itself. Highlighted lines are new or are the transition being explained.
| Step | Goal | Result |
|---|---|---|
| 1 | Tempo, key, chords | 128 BPM, D minor, Dm–B♭–F–C |
| 2 | The house groove | Four-on-the-floor kick, clap, hats |
| 3 | Bass and arpeggio | Off-beat bass, 16th-note arp with echo |
| 4 | A harmony bed | Warm pad: the drop is complete |
| 5 | Understand ramps | saw, isaw, tri drive a filter |
| 6 | ↑ Tension: the build | Noise riser, pitch riser, snare roll, reverse cymbal, high-pass sweep |
| 7 | ↓ Arrival: build → drop | Impact (crash + falling boom) |
| 8 | ↓ Release: drop → breakdown | Downlifter, then sub drop |
| 9 | ↓ Ending: the outro | Filter closing, falling run |
| 10 | Arrangement and listening guide | Where each transition sits, with timestamps |
Step 1 · Tempo, key and chords
- 128 BPM is the classic tempo of house and progressive house: driving, but relaxed enough for long builds.
- D minor, chords Dm – B♭ – F – C (i – VI – III – VII), the same "epic" shape as the hardcore track, in another key. These are calm, wide chords that suit long transitions.
setcpm(128/4)
const prog = "<Dm Bb F C>" // i – VI – III – VII in D minor
$: chord(prog).voicing().s("gm_pad_warm")
| Command | What it does |
|---|---|
setcpm(128/4) | Tempo: 128 BPM ÷ 4 beats per bar = bars per minute. |
const prog = "<Dm Bb F C>" | Stores the chord progression under the name prog, one chord per bar. |
chord(prog).voicing() | Turns the chord symbols into notes. |
.s("gm_pad_warm") | Plays them on a warm pad. |
Step 2 · The groove
House rhythm: a kick on every beat ("four on the floor"), a clap on 2 and 4, open hats on the off-beats, and soft 16th hats on top. Both hat patterns share one line, with a comma between them.
setcpm(128/4)
const prog = "<Dm Bb F C>"
$: s("bd*4").bank("RolandTR909")
$: s("~ cp ~ cp").bank("RolandTR909").gain(.7)
$: s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
| Command | What it does |
|---|---|
s("bd*4").bank("RolandTR909") | TR-909 kick on every beat: "four on the floor". |
s("~ cp ~ cp")…gain(.7) | Clap on beats 2 and 4, volume 0.7. |
s("[~ oh]*4, hh*16") | Two hat patterns at once (the comma): open hats on the off-beats, plus 16 closed hats per bar. |
.gain(.4) | Hats quieter than the drums. |
Step 3 · Bass and arpeggio
- Bass on the off-beats, between the kicks, so the two never clash. It plays the root of each chord (
chord(prog).rootNotes(2)). - Arpeggio: the chord notes one at a time in 16ths (
n("[0 1 2 3]*4").chord(prog).voicing()). It's short (.clip(.5)), with an echo of 0.35 s. That's a dotted eighth at 128 BPM (60 ÷ 128 × 0.75 ≈ 0.35), so the echoes fall between the notes and make the pattern sparkle.
setcpm(128/4)
const prog = "<Dm Bb F C>"
$: s("bd*4").bank("RolandTR909")
$: s("~ cp ~ cp").bank("RolandTR909").gain(.7)
$: s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
$: chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(500).decay(.15).sustain(0).gain(.7)
$: n("[0 1 2 3]*4").chord(prog).voicing()
.s("sawtooth").lpf(2500).clip(.5).delay(.3).delaytime(.35).gain(.4)
| Command | What it does |
|---|---|
chord(prog).rootNotes(2).struct("[~ x]*4") | Each chord's root note (octave 2), only on the off-beats. |
.s("sawtooth").lpf(500) | Sawtooth bass, darkened by a low-pass at 500 Hz. |
.decay(.15).sustain(0) | Short notes, gone before the next kick. |
n("[0 1 2 3]*4").chord(prog).voicing() | Arpeggio: chord notes 0–3, four times per bar, in 16th notes. |
.s("sawtooth").lpf(2500) | Brighter sawtooth for the arp. |
.clip(.5) | Each note sounds for half its step: short and plucky. |
.delay(.3).delaytime(.35) | Echo at volume 0.3, every 0.35 s (a dotted 8th at 128 BPM). |
.gain(.4) | Arp volume 0.4. |
Step 4 · The harmony bed
A soft pad holds each chord for the whole bar and fills the space between the short arp and bass notes. With it, the loop is complete. This is the drop, the music that all the transitions lead to and away from.
setcpm(128/4)
const prog = "<Dm Bb F C>"
$: s("bd*4").bank("RolandTR909")
$: s("~ cp ~ cp").bank("RolandTR909").gain(.7)
$: s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
$: chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(500).decay(.15).sustain(0).gain(.7)
$: n("[0 1 2 3]*4").chord(prog).voicing()
.s("sawtooth").lpf(2500).clip(.5).delay(.3).delaytime(.35).gain(.4)
$: chord(prog).voicing().s("gm_pad_warm").gain(.4)
| Command | What it does |
|---|---|
chord(prog).voicing().s("gm_pad_warm") | Each chord held for the whole bar on a warm pad. |
.gain(.4) | Kept soft, as a background. |
Step 5 · Ramps: the tool behind every transition
A transition is a change over time: brighter, louder, higher, or the opposite. In Strudel that change comes from a ramp, a value that moves smoothly. Put it where a number would go, and that setting slides instead of staying fixed:
| Write | What it does |
|---|---|
saw | Rises from 0 to 1 every bar ↗ |
isaw | Falls from 1 to 0 every bar ↘ |
tri | Rises, then falls ↗↘ |
.slow(8) | Stretches the ramp over 8 bars, the length of a block |
.range(300, 12000) | Sets where it starts and ends, like a filter from 300 Hz to 12000 Hz |
.segment(8) | Takes 8 snapshots per bar, so each note gets one fixed value |
.round() | Whole numbers only, needed for scale steps |
setcpm(128/4)
// the filter opens for 4 bars, then closes for 4 bars (tri = saw then isaw)
$: note("[d2,a2,d3]*8").s("sawtooth").decay(.2).sustain(0)
.lpf(tri.slow(8).range(200, 5000))
| Command | What it does |
|---|---|
note("[d2,a2,d3]*8") | A D power chord (D2, A2, D3 together, because of the commas), 8 times per bar. |
.s("sawtooth").decay(.2).sustain(0) | Short sawtooth chords, a sound where filter changes are easy to hear. |
.lpf(tri.slow(8).range(200, 5000)) | The filter frequency follows a ramp: tri rises then falls, .slow(8) spreads that over 8 bars, and .range(200, 5000) sets it from 200 Hz to 5000 Hz. |
Step 6 · ↑ Tension: the build
Before a drop, the listener should feel that something big is coming. Five rising layers work together, each ramped over the 8 bars of the build:
- High-pass sweep on the music: the hats and pad lose their low end bit by bit and sound thinner and thinner. When the drop brings the full sound back, the contrast makes it hit hard.
- Noise riser: white noise in 16ths. Its filter opens (300 → 12000 Hz) while it gets louder: the classic "whoosh".
- Pitch riser: a D-minor scale run climbing two octaves, from D3 at the start to D5 in bar 8. A rising pitch is the strongest "something is coming" signal there is.
- Snare roll: 8th notes, then 16ths, then 32nds (
.ply("<1 1 1 1 2 2 4 4>")), getting louder. It speeds up like a heartbeat. - Reverse cymbal in bar 8: a cymbal played backwards swells up and stops right at the drop.
setcpm(128/4)
const prog = "<Dm Bb F C>"
// the music during the build: hats and pad, getting thinner
$: stack(
s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4),
chord(prog).voicing().s("gm_pad_warm").gain(.4)
).hpf(saw.slow(8).range(20, 1500))
// noise riser
$: s("white*16").decay(.06).sustain(0)
.lpf(saw.slow(8).range(300, 12000)).gain(saw.slow(8).range(0, .4))
// pitch riser
$: n(saw.slow(8).range(0, 14).round().segment(8)).scale("D3:minor")
.s("supersaw").decay(.12).sustain(0).lpf(4000).gain(saw.slow(8).range(.1, .4))
// snare roll
$: s("sd*8").bank("RolandTR909")
.ply("<1 1 1 1 2 2 4 4>").gain(saw.slow(8).range(.1, .7))
// reverse cymbal in bar 8
$: note("<~!7 c4>").s("gm_reverse_cymbal").gain(.8)
| Command | What it does |
|---|---|
stack( …hats…, …pad… ) | Groups the hats and pad, so one effect can be applied to both. |
.hpf(saw.slow(8).range(20, 1500)) | ↑ High-pass sweep: removes the lows, from 20 Hz up to 1500 Hz over 8 bars, so the music gets thinner. |
s("white*16").decay(.06).sustain(0) | White noise in 16 short bursts per bar. |
.lpf(saw.slow(8).range(300, 12000)) | ↑ Noise riser: the noise filter opens from 300 to 12000 Hz over 8 bars (brighter). |
.gain(saw.slow(8).range(0, .4)) | …and its volume rises from 0 to 0.4 over the same 8 bars. |
n(saw.slow(8).range(0, 14).round().segment(8)) | ↑ Pitch riser: scale steps climbing from 0 to 14 over 8 bars. .round() gives whole steps, and .segment(8) makes 8 notes per bar. |
.scale("D3:minor") | Steps into D minor notes: 0 = D3, 14 = D5 (two octaves up). |
.s("supersaw").decay(.12).sustain(0).lpf(4000) | Short supersaw notes for the run. |
.gain(saw.slow(8).range(.1, .4)) | The run also gets louder as it climbs. |
s("sd*8").bank("RolandTR909") | Snare in 8th notes. |
.ply("<1 1 1 1 2 2 4 4>") | ↑ Snare roll: per bar ×1 (bars 1–4), ×2 = 16ths (bars 5–6), ×4 = 32nds (bars 7–8). |
.gain(saw.slow(8).range(.1, .7)) | The roll gets louder over 8 bars. |
note("<~!7 c4>") | Silent for 7 bars (~!7), one note in bar 8. |
.s("gm_reverse_cymbal") | ↑ Reverse cymbal: that note is a backwards cymbal swelling into the next bar. |
Step 7 · ↓ Arrival: from build to drop
The build ends at its highest point. The drop needs a clear "we've arrived" moment on its first beat: the impact. It's a crash cymbal plus a deep boom from the synth kick sbd. That boom starts 36 semitones (3 octaves) high and falls down to D1 over one second (.penv(36).pdecay(1)). It's a short falling sound right where the long rising ones stop.
From here on, everything is named with const and played with arrange. This code plays 8 bars of build, then the drop. Listen to the change at bar 9, about 15 seconds in.
setcpm(128/4)
const prog = "<Dm Bb F C>"
const kick = s("bd*4").bank("RolandTR909")
const clap = s("~ cp ~ cp").bank("RolandTR909").gain(.7)
const hats = s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
const bass = chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(500).decay(.15).sustain(0).gain(.7)
const arp = n("[0 1 2 3]*4").chord(prog).voicing()
.s("sawtooth").lpf(2500).clip(.5).delay(.3).delaytime(.35).gain(.4)
const pad = chord(prog).voicing().s("gm_pad_warm").gain(.4)
const noiseUp = s("white*16").decay(.06).sustain(0)
.lpf(saw.slow(8).range(300, 12000)).gain(saw.slow(8).range(0, .4))
const pitchUp = n(saw.slow(8).range(0, 14).round().segment(8)).scale("D3:minor")
.s("supersaw").decay(.12).sustain(0).lpf(4000).gain(saw.slow(8).range(.1, .4))
const roll = s("sd*8").bank("RolandTR909")
.ply("<1 1 1 1 2 2 4 4>").gain(saw.slow(8).range(.1, .7))
const revCym = note("<~!7 c4>").s("gm_reverse_cymbal").gain(.8)
// impact: crash + falling boom, on bar 1 of the drop only
const impact = stack(
s("<cr ~!15>").bank("RolandTR909"),
note("<d1 ~!15>").s("sbd").penv(36).pdecay(1).decay(1.5).room(.4)
)
const build = stack(noiseUp, pitchUp, roll, revCym,
stack(hats, pad).hpf(saw.slow(8).range(20, 1500)))
const drop = stack(impact, kick, clap, hats, bass, arp, pad)
// 8 bars of build, then 8 bars of drop: listen to bar 9
$: arrange([8, build], [8, drop])
| Command | What it does |
|---|---|
const kick = … | Each part gets a name (const), so blocks can reuse it. |
s("<cr ~!15>").bank("RolandTR909") | ↓ Crash cymbal in bar 1, then 15 bars of rest: it plays only at the start of the drop. |
note("<d1 ~!15>").s("sbd") | ↓ A synth-kick boom on D1, also only in bar 1. |
.penv(36).pdecay(1) | Pitch envelope: the boom starts 36 semitones (3 octaves) higher and falls to D1 over 1 second. This makes it an impact. |
.decay(1.5).room(.4) | The boom lasts 1.5 s, with some reverb. |
stack(noiseUp, pitchUp, roll, revCym, …) | The build block: all risers plus the thinned-out music. |
stack(impact, kick, clap, hats, bass, arp, pad) | The drop block: the impact plus the full music. |
arrange([8, build], [8, drop]) | Plays 8 bars of build, then 8 bars of drop. The transition is at bar 9. |
Step 8 · ↓ Release: from drop to breakdown
Going from the loudest block to the quietest needs the opposite of a build, a fall:
- Downlifter in the last 2 bars of the drop: noise whose filter closes (10000 → 300 Hz) while it fades out, made with
isaw, the falling ramp..mask("<0!14 1!2>")keeps it silent for the first 14 of the 16 bars. - Sub drop on bar 1 of the breakdown: a very deep boom falling 48 semitones (4 octaves) over 3 seconds. The drums are gone, and this low rumble fills the sudden empty space, so the quiet part doesn't feel like a hole.
- The breakdown adds strings and keeps the arp quiet and muffled (
.lpf(900)), so the music stays connected to the drop.
This code plays the 16-bar drop and then the breakdown. The downlifter starts at bar 15 (about 26 seconds in), and the sub drop comes at bar 17 (about 30 seconds).
setcpm(128/4)
const prog = "<Dm Bb F C>"
const kick = s("bd*4").bank("RolandTR909")
const clap = s("~ cp ~ cp").bank("RolandTR909").gain(.7)
const hats = s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
const bass = chord(prog).rootNotes(2).struct("[~ x]*4")
.s("sawtooth").lpf(500).decay(.15).sustain(0).gain(.7)
const arp = n("[0 1 2 3]*4").chord(prog).voicing()
.s("sawtooth").lpf(2500).clip(.5).delay(.3).delaytime(.35).gain(.4)
const pad = chord(prog).voicing().s("gm_pad_warm").gain(.4)
const strings = chord(prog).voicing().s("gm_string_ensemble_1").room(.6).gain(.5)
// downlifter: closes and fades, only in the last 2 of 16 bars
const noiseDown = s("white*16").decay(.06).sustain(0)
.lpf(isaw.slow(2).range(300, 10000)).gain(isaw.slow(2).range(0, .35))
.mask("<0!14 1!2>")
// sub drop: a long falling boom, bar 1 of the breakdown
const subDrop = note("<d1 ~!7>").s("sbd").penv(48).pdecay(3).decay(3.5).room(.6)
const drop = stack(kick, clap, hats, bass, arp, pad, noiseDown)
const breakdown = stack(subDrop, pad, strings, arp.lpf(900).gain(.25))
$: arrange([16, drop], [8, breakdown])
| Command | What it does |
|---|---|
s("gm_string_ensemble_1")…room(.6) | Strings for the breakdown, with reverb. |
s("white*16").decay(.06).sustain(0) | White noise bursts, as in the riser. |
.lpf(isaw.slow(2).range(300, 10000)) | ↓ Downlifter: the filter falls from 10000 to 300 Hz over 2 bars (isaw = falling ramp). |
.gain(isaw.slow(2).range(0, .35)) | …while the volume fades from 0.35 to 0. |
.mask("<0!14 1!2>") | Silent for 14 bars, on for the last 2. The downlifter plays only at the end of the 16-bar drop. |
note("<d1 ~!7>").s("sbd") | ↓ A boom on D1, only in bar 1 of the 8-bar breakdown. |
.penv(48).pdecay(3).decay(3.5) | Sub drop: starts 48 semitones (4 octaves) up, falls over 3 seconds, and lasts 3.5 s. |
arp.lpf(900).gain(.25) | The arp stays, but muffled (900 Hz) and quiet. |
arrange([16, drop], [8, breakdown]) | 16 bars of drop, then 8 bars of breakdown. The change is at bar 17. |
Step 9 · ↓ Ending: the outro
- Filter closing on the whole mix: the music is stacked, and one low-pass falls over 8 bars (8000 → 200 Hz). Everything gets darker together, like the music walking away.
- Falling run in the last 2 bars: the pitch riser turned upside down. It's the same scale, but driven by
isaw, so it slides from D5 down to E3. It mirrors the rising run of the build, which gives the track a clear ending.
setcpm(128/4)
const prog = "<Dm Bb F C>"
const kick = s("bd*4").bank("RolandTR909")
const hats = s("[~ oh]*4, hh*16").bank("RolandTR909").gain(.4)
const arp = n("[0 1 2 3]*4").chord(prog).voicing()
.s("sawtooth").lpf(2500).clip(.5).delay(.3).delaytime(.35).gain(.4)
const pad = chord(prog).voicing().s("gm_pad_warm").gain(.4)
// falling run: the pitch riser upside down, in the last 2 bars
const pitchDown = n(isaw.slow(2).range(0, 14).round().segment(8)).scale("D3:minor")
.s("supersaw").decay(.12).sustain(0).lpf(3000).gain(.3)
.mask("<0!6 1!2>")
// the whole mix through one closing filter, plus the falling run
$: stack(
stack(kick, hats, pad, arp).lpf(isaw.slow(8).range(200, 8000)),
pitchDown
)
| Command | What it does |
|---|---|
n(isaw.slow(2).range(0, 14).round().segment(8)) | ↓ Falling run: scale steps from 14 down to 0 over 2 bars (the pitch riser with isaw instead of saw). |
.scale("D3:minor") | 14 = D5 down to 0 = D3. |
.mask("<0!6 1!2>") | Only in the last 2 of the 8 bars. |
stack(kick, hats, pad, arp) | Groups the whole mix… |
.lpf(isaw.slow(8).range(200, 8000)) | ↓ …and sends it through one filter closing from 8000 to 200 Hz over 8 bars: filter closing. |
Step 10 · Arrangement and listening guide
The blocks are put in order with arrange, the full code above. The build is used twice, before each drop, because that's where the biggest change happens and the most tension is needed. Gentler changes (into the intro, out of the outro) get gentle techniques: a single filter. As a rule: the bigger the change in energy, the more transition layers it gets.
| Time | Bar | Block | Listen for |
|---|---|---|---|
| 0:00 | 1 | Intro | ↑ The arp grows brighter as its filter opens |
| 0:15 | 9 | Build | ↑ Noise, rising run, snare roll, music getting thinner |
| 0:28 | 16 | Build, last bar | ↑ Reverse cymbal swell, 32nd-note snare |
| 0:30 | 17 | Drop | ↓ Impact: crash and falling boom, full music |
| 0:56 | 31 | Drop, last 2 bars | ↓ Downlifter closing and fading |
| 1:00 | 33 | Breakdown | ↓ Sub drop under strings and pad, no drums |
| 1:15 | 41 | Build | ↑ Second build |
| 1:30 | 49 | Drop | ↓ Second impact |
| 1:56 | 63 | Drop, last 2 bars | ↓ Downlifter into the outro |
| 2:00 | 65 | Outro | ↓ The whole mix gets darker |
| 2:11 | 71 | Outro, last 2 bars | ↓ Falling run to the end |
At 128 BPM one bar lasts 1.875 seconds (4 × 60 ÷ 128), so bar n starts at (n − 1) × 1.875 s.
Use these in your own tracks
- Copy the FX layers.
noiseUp,pitchUp,roll,revCym,impact,noiseDown,subDropandpitchDownwork in any track. Change the scale and root note ("D3:minor",d1) to your key. - Match the ramp to the block length:
saw.slow(8)for an 8-bar build,saw.slow(4)for 4 bars. - To put an effect only at the end of a block, use
.mask():.mask("<0!14 1!2>")is "only the last 2 of 16 bars". Pair it with a short ramp, likeisaw.slow(2). - Single-hit FX on a block's first or last bar:
"<d1 ~!15>"plays on bar 1 of 16, and"<~!7 c4>"on bar 8 of 8. - Layer two or three risers (noise + pitch + roll) for a big build. One alone is fine for a subtle change.
11.4Classical: two ways to write harmony
Two famous Baroque pieces (both centuries old and free to use), each written in a different way:
| Bach: Prelude in C | Pachelbel: Canon in D | |
|---|---|---|
| Harmony written as | Exact notes: every chord spelled out note by note, "[c4,e4,g4,c5,e5]" | Chord symbols: chord("D A Bm F#m"), and voicing() chooses the notes |
| Melody written as | The arpeggio is the melody: chord notes played one by one | Exact notes: note("f#5 e5 d5 c#5") |
| Good when… | you want control over every voice (inversions, a smooth bass line) | you think in chords and want to write quickly |
11.5J. S. Bach: Prelude in C major, BWV 846 (bars 1–8)
The idea: the whole prelude is one pattern. Every bar is a single chord of five notes, played as the same broken-chord figure: notes 1-2-3-4-5, then 3-4-5, twice per bar. Bach changes only the chord from bar to bar. In Strudel that means you write the chords as notes once, and .arp() plays the figure for every bar.
| Bar | Notes (low → high) | Chord | Role in C major |
|---|---|---|---|
| 1 | C4 E4 G4 C5 E5 | C | I, home |
| 2 | C4 D4 A4 D5 F5 | Dm7 over C | ii7, moving away |
| 3 | B3 D4 G4 D5 F5 | G7 over B | V7, tension wanting to go home |
| 4 | C4 E4 G4 C5 E5 | C | I, home again |
| 5 | C4 E4 A4 E5 A5 | Am over C | vi, the minor relative |
| 6 | C4 D4 F♯4 A4 D5 | D7 over C | V7 of V: an F♯ from outside the key leads to G |
| 7 | B3 D4 G4 D5 G5 | G over B | V |
| 8 | B3 C4 E4 G4 C5 | Cmaj7 over B | I with a soft clash |
Look at the lowest notes: C C B C C C B B. Bach uses inversions ("over C", "over B") so the bass barely moves while the chords change above it. This is the same voice-leading idea as in lesson 3.3.
How cat and .arp() work together, on a keyboard
The code has two parts that work like a list of chords and a finger pattern. cat(…) holds the 8 chords and plays the next one every bar. .arp(…) is the finger pattern: it doesn't name notes, only positions in the current chord (0 = lowest key, 4 = highest). Because the pattern uses positions, the same 16 numbers fit every chord.
1cat( … ) picks one chord string per bar. Click a bar:
2That chord's 5 notes on the keyboard, numbered 0 → 4 from the lowest key to the highest:
3.arp("0 1 2 3 4 2 3 4 0 1 2 3 4 2 3 4"): 16 steps per bar, and each number says which key to press:
cat moves to the next string every bar, so the same numbers press different keys. Press Play all 8 bars and watch the lit keys move while the numbers stay the same.// J. S. Bach · Prelude in C major, BWV 846 · bars 1–8 · harpsichord
setcpm(66/4)
// each bar is one chord, written as its 5 notes from low to high
const harmony = cat(
"[c4,e4,g4,c5,e5]", // bar 1 C
"[c4,d4,a4,d5,f5]", // bar 2 Dm7 over C
"[b3,d4,g4,d5,f5]", // bar 3 G7 over B
"[c4,e4,g4,c5,e5]", // bar 4 C
"[c4,e4,a4,e5,a5]", // bar 5 Am over C
"[c4,d4,f#4,a4,d5]", // bar 6 D7 over C
"[b3,d4,g4,d5,g5]", // bar 7 G over B
"[b3,c4,e4,g4,c5]", // bar 8 Cmaj7 over B
)
// Bach's figure: notes 1-2-3-4-5, then 3-4-5, played twice per bar (16 notes)
$: note(harmony)
.arp("0 1 2 3 4 2 3 4 0 1 2 3 4 2 3 4")
.s("gm_harpsichord").room(.3)
| Command | What it does |
|---|---|
setcpm(66/4) | Tempo: 66 quarter notes per minute, 4 per bar. |
cat( | Plays the items inside one after another, one per bar. Each line is one bar, so you can comment each chord. |
"[c4,e4,g4,c5,e5]" | Bar 1: the C chord as five exact notes. The commas mean "at the same time". |
"[c4,d4,a4,d5,f5]" | Bar 2: Dm7, with C kept in the bass (an inversion). |
note(harmony) | Turns the eight chord strings into notes. |
.arp("0 1 2 3 4 2 3 4 0 1 2 3 4 2 3 4") | Plays the chord as a broken chord: each number picks a note by position (0 = lowest, 4 = highest). 16 numbers = 16 sixteenth notes per bar, which is Bach's figure. |
.s("gm_harpsichord").room(.3) | Harpsichord, the keyboard of Bach's time, with a little room reverb. |
- Other instruments:
.s("piano")or.s("gm_acoustic_guitar_nylon") - Your own progression: replace the chord strings, keeping 5 notes per chord. The figure still works.
- Other figures:
.arp("0 2 4 2 1 3 4 3"), or.arp("[0,4] 1 2 3")to play the lowest and highest notes together.
11.6J. Pachelbel: Canon in D (opening, simplified)
The idea: two old techniques work together.
- A ground bass: the same 8 bass notes (D A B F♯ G D G A) repeat through the whole piece, each with its own chord: D, A, Bm, F♯m, G, D, G, A.
- A canon: three violins play the same melody, each starting 2 bars after the previous one, like singing a round ("Row, row, row your boat"). Every melody line fits the repeating bass, so the overlapping copies always harmonise.
| Bars | Cello | Harpsichord | Violin 1 | Violin 2 | Violin 3 |
|---|---|---|---|---|---|
| 1–2 | ground | ||||
| 3–4 | ground | chords | |||
| 5–6 | ground | chords | line 1 | ||
| 7–8 | ground | chords | line 2 | line 1 | |
| 9–10 | ground | chords | line 3 | line 2 | line 1 |
| 11–16 | ground | chords | the three lines keep chasing each other | ||
// J. Pachelbel · Canon in D · opening, simplified · strings & harpsichord
setcpm(66/4)
// the "ground": 8 bass notes that repeat through the whole piece (2 bars)
const ground = note("<[d3 a2 b2 f#2] [g2 d2 g2 a2]>")
// the chord above each bass note
const chords = chord("<[D A Bm F#m] [G D G A]>")
// the violin melody: three 2-bar lines
const melody = note(cat(
"[f#5 e5 d5 c#5]", "[b4 a4 b4 c#5]", // line 1: falling quarter notes
"[d5 c#5 b4 a4]", "[g4 f#4 g4 e4]", // line 2: the same shape, lower
"[d4 f#4 a4 g4 f#4 d4 f#4 e4]", "[d4 b3 d4 a4 g4 b4 a4 g4]", // line 3: eighth notes
))
const piece = stack(
ground.s("gm_cello").gain(.8), // bars 1-16
chords.voicing().s("gm_harpsichord").gain(.5).mask("<0!2 1!14>"), // from bar 3
// the canon: three violins play the SAME melody, each entering 2 bars after the last
melody.late(4).s("gm_violin").room(.4).mask("<0!4 1!12>"), // violin 1 from bar 5
melody.late(6).s("gm_violin").room(.4).pan(.3).mask("<0!6 1!10>"), // violin 2 from bar 7
melody.late(8).s("gm_violin").room(.4).pan(.7).mask("<0!8 1!8>"), // violin 3 from bar 9
)
// 16 bars, then it starts again from the beginning
$: arrange([16, piece])
| Command | What it does |
|---|---|
const ground = note("<[d3 a2 b2 f#2] [g2 d2 g2 a2]>") | The ground bass: 4 quarter notes per bar. < > alternates the two bars, so it repeats every 2 bars. |
chord("<[D A Bm F#m] [G D G A]>") | A chord on each bass note, in the same rhythm. |
"[f#5 e5 d5 c#5]", "[b4 a4 b4 c#5]" | Inside cat(…): the melody, one bar per string. Line 1 falls F♯ E D C♯ B A B C♯. Lines 2 and 3 follow. 6 bars in total. |
ground.s("gm_cello").gain(.8) | The cello plays the ground for all 16 bars. |
chords.voicing().s("gm_harpsichord") | The chord symbols become notes, played on harpsichord. |
.mask("<0!2 1!14>") | Silent for 2 bars, then plays for 14: the harpsichord enters at bar 3. |
melody.late(4) | The melody moved 4 bars later, so violin 1 starts line 1 at bar 5. |
.mask("<0!4 1!12>") | Keeps violin 1 silent until bar 5. Without it, the shifted melody would already sound in bars 1–4. |
melody.late(6) | Violin 2: the same melody, 2 bars after violin 1. This is the canon. |
melody.late(8) | Violin 3: another 2 bars later. |
.pan(.3) | Violin 2 slightly left (and violin 3 with .pan(.7) slightly right), so you can tell the three violins apart. |
stack( | Puts all five parts together as one block called piece. |
arrange([16, piece]) | Plays the 16 bars, then starts again from bar 1, so the entries happen again every time. |
- A fourth violin: add
melody.late(10).s("gm_violin").pan(.5).mask("<0!10 1!6>")inside thestack. - A string orchestra sound: replace
"gm_violin"with"gm_string_ensemble_1". - See the canon: add
.color("cyan"),.color("magenta")… to the violins andall(x => x.pianoroll())at the end (lesson 6.3). You'll see the same shape appear three times, shifted.
11.7Chord Colours: chord types and effects
What it shows: two lessons in one lo-fi house track (C major, 96 BPM).
- Chord types. Every chord is written as notes (lesson 3.4 Chords from notes), and every section uses different chord types, so you can hear their colours: soft maj7 and m7 in the verse, a floating sus4 in the lift, then sus2, diminished and augmented to build tension in the bridge, and finally a plain major chord to end. Try each one in the keyboard explorer.
- Effects per instrument. Each layer gets the effects the effects-per-instrument table recommends: the kick stays dry, the pad sits in a big hall, the pluck echoes on the beat, and in the bridge the distortion grows bar by bar.
| Section | Chords (one per bar) | Chord types | What you hear |
|---|---|---|---|
| Intro, verse | Cmaj7 – Am7 – Dm7 – G7 | maj7 · m7 · m7 · dominant 7 | Soft and jazzy. G7 "wants" to go back to C, so the loop keeps rolling. |
| Lift | Fmaj7 – Em7 – Dm7 – Gsus4 | maj7 · m7 · m7 · sus4 | Brighter. Gsus4 hangs in the air (neither major nor minor) until the next section. |
| Bridge | Fsus2 – F♯dim – Gsus4 – Gaug | sus2 · diminished · sus4 · augmented | Tension grows every bar: open, then unstable, then floating and strange. |
| Outro | Fmaj7 – G7 – Gaug – C | maj7 · dominant 7 · augmented · major | The tension resolves: the augmented chord leads into a plain C major, the "home" chord. |
| Layer | Instrument type | Effects | Why |
|---|---|---|---|
| keys | e-piano | .tremolo(4).tremolodepth(.3).room(.3) .lpf(2500) | A gentle electric-piano wobble, a small room, and a darker top for the lo-fi feel. |
| pad | pad | .attack(.4) .lpf(1800).room(.8).roomsize(6) .orbit(3) | Fades in slowly, stays dark and sits in a big hall on its own orbit. |
| bass | synth bass | .lpf(350) .shape(.4) | Dry and centred: no reverb, no pan. Saturation makes it audible on small speakers. |
| pluck | pluck / arpeggio | .delay(.4).delaytime(.47).delayfeedback(.4) .pan(sine.slow(2)) | Echoes on the dotted eighth fill the gaps; the notes drift left and right. |
| grit (bridge) | distorted, guitar-like chords | .distort("<1:.6 2:.5 3:.4 4:.35>").lpf(saw.slow(4).range(800, 3000)) | Distortion and brightness rise with the tension, one step per bar. |
| kick | kick | .shape(.3) | Punch, no reverb. |
| clap | clap | .room(.3).roomsize(2) .orbit(2) | A short tail in a small room of its own. |
| hats | hi-hats | .hpf(400) .pan(sine.range(.3, .7)).crush(6) (intro only) | No low rumble, a little stereo movement; crushed for a lo-fi intro. |
| riser (bridge) | FX / noise | .hpf(saw.slow(4).range(200, 8000)) | A whoosh that gets thinner and louder over 4 bars. |
// CHORD COLOURS · lo-fi house · C major · 96 BPM · 36 bars (about 1:30)
// every chord is written as notes; every instrument gets the effects that suit it
setcpm(96/4)
// ---------- chords, one per bar, written as notes ----------
// verse: Cmaj7 – Am7 – Dm7 – G7 (maj7 · m7 · m7 · dominant 7)
const verse = "<[c4,e4,g4,b4] [c4,e4,g4,a4] [c4,d4,f4,a4] [b3,d4,f4,g4]>"
const verseBass = "<c2 a1 d2 g1>"
// lift: Fmaj7 – Em7 – Dm7 – Gsus4 (maj7 · m7 · m7 · sus4)
const lift = "<[c4,e4,f4,a4] [b3,d4,e4,g4] [c4,d4,f4,a4] [c4,d4,g4]>"
const liftBass = "<f1 e1 d2 g1>"
// bridge: Fsus2 – F#dim – Gsus4 – Gaug (sus2 · diminished · sus4 · augmented)
const bridge = "<[c4,f4,g4] [c4,f#4,a4] [c4,d4,g4] [b3,d#4,g4]>"
const bridgeBass = "<f1 f#1 g1 g1>"
// ending: Fmaj7 – G7 – Gaug – C (maj7 · dominant 7 · augmented · major)
const ending = "<[c4,e4,f4,a4] [b3,d4,f4,g4] [b3,d#4,g4] [c4,e4,g4,c5]>"
const endingBass = "<f1 g1 g1 c2>"
// ---------- instruments: each with the effects that suit it ----------
// e-piano: gentle tremolo wobble, a small room, lo-fi low-pass
const keys = p => note(p).struct("x ~ ~ x ~ ~ x ~").s("gm_epiano1").clip(.9)
.tremolo(4).tremolodepth(.3).room(.3).lpf(2500).gain(.7)
// pad: an octave lower, slow attack, dark, a big hall on its own orbit
const pad = p => note(p).add(note(-12)).s("gm_pad_warm").attack(.4).release(1)
.lpf(1800).room(.8).roomsize(6).orbit(3).gain(.35)
// bass: dry and centred; low-pass + saturation so small speakers can play it
const bass = r => note(r).struct("x ~ ~ x ~ x ~ ~").s("sawtooth")
.lpf(350).shape(.4).decay(.25).sustain(.3).gain(.8)
// pluck: the chord notes one by one, an octave up; tempo delay + panning
const pluck = p => note(p).arp("0 1 2 3 2 1 2 3").add(note(12)).s("triangle")
.decay(.2).sustain(0).delay(.4).delaytime(.47).delayfeedback(.4)
.pan(sine.slow(2)).orbit(4).gain(.45)
// grit: sawtooth chords whose distortion grows every bar (1 → 4)
const grit = p => note(p).struct("x x ~ x x ~ x ~").s("sawtooth")
.distort("<1:.6 2:.5 3:.4 4:.35>").lpf(saw.slow(4).range(800, 3000)).gain(.45)
// drums: kick saturated, clap in a small room, hats high-passed and panned
const kick = s("bd*4").bank("RolandTR909").shape(.3)
const clap = s("~ cp ~ cp").bank("RolandTR909").room(.3).roomsize(2).orbit(2).gain(.7)
const hats = s("[~ hh]*4").bank("RolandTR909").hpf(400).pan(sine.range(.3, .7)).gain(.5)
// riser: noise whose high-pass opens over 4 bars
const riser = s("white*16").decay(.06).sustain(0)
.hpf(saw.slow(4).range(200, 8000)).gain(saw.slow(4).range(0, .3))
// ---------- blocks ----------
const intro = stack(pad(verse), keys(verse).lpf(800), hats.crush(6).gain(.3))
const verseA = stack(kick, clap, hats, bass(verseBass), keys(verse), pad(verse))
const liftB = stack(kick, clap, hats, bass(liftBass), keys(lift), pad(lift), pluck(lift))
const bridgeC = stack(hats, bass(bridgeBass), pad(bridge), grit(bridge), riser)
const verseAll = stack(kick, clap, hats, bass(verseBass), keys(verse), pad(verse), pluck(verse))
const outro = stack(pad(ending), keys(ending).room(.7).roomsize(6), bass(endingBass),
pluck(ending).gain(.25))
// ---------- the track ----------
$: arrange(
[4, intro],
[8, verseA],
[8, liftB],
[4, bridgeC],
[8, verseAll],
[4, outro]
)
How it was made, step by step
GUIDED · 10 STEPS · IN THE EDITORBuild Chord Colours step by step →One step at a time, with the explanation next to the code. Change anything and press Ctrl+Enter.Each step adds one part and can be played on its own. Step 7 puts the parts together into the track.
| Step | Goal | Result |
|---|---|---|
| 1 | Tempo, key and four chord sections | 96 BPM, C major, chords written as notes |
| 2 | Keys: an instrument as a function | E-piano with tremolo, room and low-pass |
| 3 | Drums, each with its own effects | Saturated kick, clap in a small room, filtered, panned hats |
| 4 | Bass and pad | A dry bass, a pad in a big hall |
| 5 | Pluck with a tempo delay | Chord notes one by one, echoing on the dotted eighth |
| 6 | The bridge: tension | sus2 / dim / sus4 / aug chords, growing distortion, a noise riser |
| 7 | Blocks and arrangement | 36 bars, with a listening guide |
Step 1 · Tempo, key and the chord sections
- 96 BPM is slow for house: relaxed, "lo-fi". One bar lasts 60 ÷ 96 × 4 = 2.5 seconds.
- C major. All chords are close to C4, written voice-led: from one chord to the next, as few notes as possible move. From Cmaj7
[c4,e4,g4,b4]to Am7[c4,e4,g4,a4], only B moves down to A. The bass plays the roots, so the chords themselves can stay in this small range. - Each section is a string stored under a name, like
verse, so it can be reused by several instruments.
setcpm(96/4)
const verse = "<[c4,e4,g4,b4] [c4,e4,g4,a4] [c4,d4,f4,a4] [b3,d4,f4,g4]>" // Cmaj7 Am7 Dm7 G7
const bridge = "<[c4,f4,g4] [c4,f#4,a4] [c4,d4,g4] [b3,d#4,g4]>" // Fsus2 F#dim Gsus4 Gaug
// 4 bars of verse, then 4 bars of bridge: hear the change of colour
$: arrange([4, note(verse)], [4, note(bridge)]).s("piano")
| Command | What it does |
|---|---|
setcpm(96/4) | Tempo: 96 BPM, 4 beats per bar. |
const verse = "<[c4,e4,g4,b4] [c4,e4,g4,a4] …>" | Four chords, one per bar (< >). Inside each [ ] the commas make the notes sound together. [c4,e4,g4,b4] = C + 4 + 7 + 11 semitones = Cmaj7. |
[b3,d4,f4,g4] | G7 (G B D F) with G on top: the notes are rearranged so they stay close to the chord before. |
const bridge = "<[c4,f4,g4] [c4,f#4,a4] [c4,d4,g4] [b3,d#4,g4]>" | Fsus2 (F G C), F♯dim (F♯ A C), Gsus4 (G C D), Gaug (G B D♯): the tension chords. |
arrange([4, note(verse)], [4, note(bridge)]) | Plays the verse for 4 bars, then the bridge for 4 bars, then repeats. |
.s("piano") | A plain piano, so you hear just the chords. |
Step 2 · Keys: an instrument as a function
The same e-piano plays the verse, the lift and the outro, each with different chords. Instead of writing it three times, write it once as a function: p => … means "give me some chords p and I'll return the e-piano playing them". Then keys(verse) plays the verse chords and keys(lift) the lift chords.
setcpm(96/4)
const verse = "<[c4,e4,g4,b4] [c4,e4,g4,a4] [c4,d4,f4,a4] [b3,d4,f4,g4]>"
const keys = p => note(p).struct("x ~ ~ x ~ ~ x ~").s("gm_epiano1").clip(.9)
.tremolo(4).tremolodepth(.3).room(.3).lpf(2500).gain(.7)
$: keys(verse)
| Command | What it does |
|---|---|
const keys = p => note(p) | A function: p is a placeholder for a chord string. keys(verse) puts the verse chords where p is. |
.struct("x ~ ~ x ~ ~ x ~") | The chord rhythm: 8 steps per bar, chords on steps 1, 4 and 7, a typical house "stab" pattern. |
.s("gm_epiano1").clip(.9) | An electric piano. .clip(.9) keeps each chord for 90 % of its step, so the stabs stay separate. |
.tremolo(4).tremolodepth(.3) | The volume pulses 4 times per second, but only 30 % deep: a gentle electric-piano wobble. .tremolodepth(1) would chop the sound completely. |
.room(.3) | 30 % reverb: a small room. |
.lpf(2500) | Removes everything above 2500 Hz: softer and darker, the lo-fi colour. |
.gain(.7) | A bit quieter than normal, to leave room for the other layers. |
Step 3 · Drums, each with its own effects
setcpm(96/4)
const kick = s("bd*4").bank("RolandTR909").shape(.3)
const clap = s("~ cp ~ cp").bank("RolandTR909").room(.3).roomsize(2).orbit(2).gain(.7)
const hats = s("[~ hh]*4").bank("RolandTR909").hpf(400).pan(sine.range(.3, .7)).gain(.5)
$: stack(kick, clap, hats)
| Command | What it does |
|---|---|
s("bd*4")…shape(.3) | Four kicks per bar with 30 % saturation for punch. No reverb: a kick should stay dry and tight. |
s("~ cp ~ cp")…room(.3).roomsize(2) | A clap on beats 2 and 4, with 30 % reverb and a 2-second tail. |
.orbit(2) | The clap gets its own reverb, so its small room doesn't mix with the pad's big hall (step 4). |
s("[~ hh]*4") | Off-beat hats: "and" between every beat. |
.hpf(400) | Removes everything below 400 Hz, so the hats don't add low rumble. |
.pan(sine.range(.3, .7)) | The hats drift slowly between a little left (.3) and a little right (.7). |
stack(kick, clap, hats) | Plays the three together. |
Step 4 · Bass and pad
setcpm(96/4)
const verse = "<[c4,e4,g4,b4] [c4,e4,g4,a4] [c4,d4,f4,a4] [b3,d4,f4,g4]>"
const verseBass = "<c2 a1 d2 g1>"
const bass = r => note(r).struct("x ~ ~ x ~ x ~ ~").s("sawtooth")
.lpf(350).shape(.4).decay(.25).sustain(.3).gain(.8)
const pad = p => note(p).add(note(-12)).s("gm_pad_warm").attack(.4).release(1)
.lpf(1800).room(.8).roomsize(6).orbit(3).gain(.35)
$: stack(bass(verseBass), pad(verse))
| Command | What it does |
|---|---|
const verseBass = "<c2 a1 d2 g1>" | The root of each verse chord, low down: C, A, D, G. |
.struct("x ~ ~ x ~ x ~ ~") | A syncopated bass rhythm: steps 1, 4 and 6 of 8. |
.lpf(350).shape(.4) | Only the deep part of the sawtooth (below 350 Hz), plus 40 % saturation so you can still hear it on laptop speakers. |
.decay(.25).sustain(.3) | Each note starts strong and drops to 30 % volume after 0.25 s: a short, bouncy bass. |
note(p).add(note(-12)) | The pad plays the same chords as the keys, but 12 semitones (one octave) lower, so the two don't get in each other's way. |
.attack(.4).release(1) | Each chord fades in over 0.4 s and fades out over 1 s: soft, no click. |
.lpf(1800).room(.8).roomsize(6) | Darker (above 1800 Hz removed), 80 % reverb with a 6-second tail: a big hall. |
.orbit(3) | Its own reverb, separate from the clap's small room. |
Step 5 · Pluck with a tempo delay
The pluck plays the chord's notes one at a time. The delay is timed to the tempo: one beat at 96 BPM is 60 ÷ 96 = 0.625 s, and a dotted eighth (¾ of a beat) is 0.625 × ¾ ≈ 0.47 s.
setcpm(96/4)
const lift = "<[c4,e4,f4,a4] [b3,d4,e4,g4] [c4,d4,f4,a4] [c4,d4,g4]>" // Fmaj7 Em7 Dm7 Gsus4
const pluck = p => note(p).arp("0 1 2 3 2 1 2 3").add(note(12)).s("triangle")
.decay(.2).sustain(0).delay(.4).delaytime(.47).delayfeedback(.4)
.pan(sine.slow(2)).orbit(4).gain(.45)
$: pluck(lift)
| Command | What it does |
|---|---|
.arp("0 1 2 3 2 1 2 3") | Plays the chord notes one by one: 0 = lowest, 3 = highest of a 4-note chord. Gsus4 has only 3 notes, so 3 wraps round to the lowest note again. |
.add(note(12)) | One octave higher than the chords, so the pluck sits above the keys. |
.s("triangle").decay(.2).sustain(0) | A soft wave with a short decay that fades to silence: a pluck. |
.delay(.4) | Echoes at 40 % volume. |
.delaytime(.47) | An echo every 0.47 s: a dotted eighth at 96 BPM. |
.delayfeedback(.4) | Each echo is 40 % as loud as the one before, so you hear about 2–3 echoes. |
.pan(sine.slow(2)) | Moves fully from left to right and back over 2 bars. |
.orbit(4) | Its own delay, separate from everything else. |
Step 6 · The bridge: tension
Three things make the bridge tense at once: the chord types (sus2 → diminished → sus4 → augmented), distortion that grows every bar, and a noise riser.
setcpm(96/4)
const bridge = "<[c4,f4,g4] [c4,f#4,a4] [c4,d4,g4] [b3,d#4,g4]>"
const grit = p => note(p).struct("x x ~ x x ~ x ~").s("sawtooth")
.distort("<1:.6 2:.5 3:.4 4:.35>").lpf(saw.slow(4).range(800, 3000)).gain(.45)
const riser = s("white*16").decay(.06).sustain(0)
.hpf(saw.slow(4).range(200, 8000)).gain(saw.slow(4).range(0, .3))
$: stack(grit(bridge), riser)
| Command | What it does |
|---|---|
.struct("x x ~ x x ~ x ~") | A busier, pushing rhythm than the keys. |
.distort("<1:.6 2:.5 3:.4 4:.35>") | One amount:volume pair per bar. The amount grows 1 → 2 → 3 → 4 (warm → crunchy → heavy) while the volume drops .6 → .35 to keep the loudness even. |
.lpf(saw.slow(4).range(800, 3000)) | saw rises from 0 to 1; .slow(4) makes it take 4 bars, and .range(800, 3000) turns it into 800 → 3000 Hz. The filter opens, so the chords get brighter. |
s("white*16").decay(.06).sustain(0) | Sixteen short bursts of white noise per bar. |
.hpf(saw.slow(4).range(200, 8000)) | A high-pass rising from 200 to 8000 Hz: the noise gets thinner and thinner, the classic "whoosh up". |
.gain(saw.slow(4).range(0, .3)) | The noise fades in from silence to 30 % volume. |
Step 7 · Blocks and arrangement
Each block is a stack of the instruments it needs, each playing that section's chords. arrange plays the blocks one after another, and each block starts its chord list and its ramps from the beginning.
// ---------- blocks ----------
const intro = stack(pad(verse), keys(verse).lpf(800), hats.crush(6).gain(.3))
const verseA = stack(kick, clap, hats, bass(verseBass), keys(verse), pad(verse))
const liftB = stack(kick, clap, hats, bass(liftBass), keys(lift), pad(lift), pluck(lift))
const bridgeC = stack(hats, bass(bridgeBass), pad(bridge), grit(bridge), riser)
const verseAll = stack(kick, clap, hats, bass(verseBass), keys(verse), pad(verse), pluck(verse))
const outro = stack(pad(ending), keys(ending).room(.7).roomsize(6), bass(endingBass),
pluck(ending).gain(.25))
// ---------- the track ----------
$: arrange(
[4, intro],
[8, verseA],
[8, liftB],
[4, bridgeC],
[8, verseAll],
[4, outro]
)
| Command | What it does |
|---|---|
keys(verse).lpf(800) | Intro: the same keys, but with a lower filter (800 instead of 2500). A later effect value replaces the earlier one, so the intro sounds muffled and far away. |
hats.crush(6).gain(.3) | Intro: quiet, crushed (6 bits) hats: a lo-fi texture. |
pluck(lift) | The lift adds the pluck, playing the lift chords. |
stack(hats, bass(bridgeBass), pad(bridge), grit(bridge), riser) | Bridge: no kick or clap, and no keys. The distorted grit and the riser take over. |
keys(ending).room(.7).roomsize(6) | Outro: the keys move into a big hall (70 % reverb, 6-second tail) as the track ends. |
pluck(ending).gain(.25) | The pluck stays in the outro, but quieter. |
arrange([4, intro], [8, verseA], …, [4, outro]) | The order and length of the blocks in bars: 4 + 8 + 8 + 4 + 8 + 4 = 36 bars. |
| Time | Bars | Block | Listen for |
|---|---|---|---|
| 0:00 | 1–4 | intro | Muffled keys, the pad fading in, crushed hats |
| 0:10 | 5–12 | verse | The beat starts; the maj7 and m7 chords and the G7 pull at the end of each 4 bars |
| 0:30 | 13–20 | lift | New chords, the echoing pluck, and Gsus4 hanging in bars 16 and 20 |
| 0:50 | 21–24 | bridge | Drums drop out; the chords get stranger and the distortion heavier every bar; the noise rises |
| 1:00 | 25–32 | verse + pluck | Back home: everything together |
| 1:20 | 33–36 | outro | G7 → Gaug → C: the tension resolves into a plain major chord in a big hall |
- Change a colour: make the verse's Am7 a plain A minor by deleting
g4from[c4,e4,g4,a4], or turn Dm7 into Dm9 by addinge4. - Change an effect: in
grit, try"<2:.5 4:.35 6:.3 8:.25>"for a much heavier bridge, or set the pad's.roomsize(10). - See the chords: add
all(x => x.pianoroll({labels: 1}))at the end (lesson 6.3).
11.8Extensions Étude: a guitar exercise from tab
Where it comes from: you asked how to make a track like a guitar-exercise short ("Guitar Exercise Extensions 29", by a YouTube guitar teacher). I can't listen to a video, so this is not a transcription of it. It's an original exercise in the same spirit, arpeggios through extended chords, and it shows the method that works for any guitar video that shows tab: turn the tab into notes, then play the notes in Strudel.
Step 1 · Reading guitar tab as notes
A tab line like x-3-2-4-3-0 lists the six strings from the lowest (thick E) to the highest (thin e). Each number is a fret; 0 is the open string and x means the string isn't played. Each fret raises the string's note by one semitone:
note = open string + fret (in semitones)
| String | Open note | In Strudel | MIDI | Example |
|---|---|---|---|---|
| 6 (lowest, thick) | E | e2 | 40 | fret 3 → 40 + 3 = 43 = g2 |
| 5 | A | a2 | 45 | fret 3 → 48 = c3 |
| 4 | D | d3 | 50 | fret 2 → 52 = e3 |
| 3 | G | g3 | 55 | fret 4 → 59 = b3 |
| 2 | B | b3 | 59 | fret 3 → 62 = d4 |
| 1 (highest, thin) | E | e4 | 64 | fret 0 → 64 = e4 |
Guitar music sounds an octave lower than it's written, so the guitar's lowest note is E2, below middle C (C4). If counting semitones is slow, write MIDI numbers directly: note("48 52 59 62 64") plays the same as note("c3 e3 b3 d4 e4").
Step 2 · What "extensions" are
Extensions are chord notes above the 7th. Using the semitone recipes from 3.4 Chords from notes: the 9th is 14 semitones up (the 2nd, an octave higher), the 11th is 17 (the 4th, higher), and the 13th is 21 (the 6th, higher). They give the soft, "expensive" jazz sound.
| Chord | Recipe | Tab (low → high) | String by string | Notes in Strudel |
|---|---|---|---|---|
| Cmaj9 | maj7 + 9: C E G B D | x-3-2-4-3-0 | A3 = C · D2 = E · G4 = B · B3 = D · e0 = E | [c3,e3,b3,d4,e4] |
| Am9 | m7 + 9: A C E G B | 5-x-5-5-5-7 | E5 = A · D5 = G · G5 = C · B5 = E · e7 = B | [a2,g3,c4,e4,b4] |
| Dm9 | m7 + 9: D F A C E | x-5-3-5-5-5 | A5 = D · D3 = F · G5 = C · B5 = E · e5 = A | [d3,f3,c4,e4,a4] |
| G13 | 7 + 9 + 13: G B F A E | 3-x-3-4-5-5 | E3 = G · D3 = F · G4 = B · B5 = E · e5 = A | [g2,f3,b3,e4,a4] |
Guitar voicings often leave out a note (Cmaj9 here has no G, and G13 no D): with five strings you keep the notes that matter most for the colour, the 3rd, the 7th and the extensions.
Step 3 · The exercise in Strudel
| Bars | Part | What the guitar does |
|---|---|---|
| 1–4 | alone | Each shape picked string by string, up and down, in eighth notes |
| 5–8 | + bass and drums | The same, with an upright bass and soft hats and rimshots |
| 9–12 | double speed | Sixteenth notes: the up-and-down pattern twice per bar |
| 13–16 | from the top | Sixteenths, starting on the highest string |
| 17 | ending | The Cmaj9 shape strummed once and left to ring |
// EXTENSIONS ÉTUDE · guitar exercise · C major · 84 BPM · 17 bars (about 0:49)
// arpeggios through extended chords (9ths and a 13th), written from guitar tab
setcpm(84/4)
// guitar chord shapes, lowest string first (tab: E A D G B e, x = not played)
// Cmaj9 x-3-2-4-3-0 Am9 5-x-5-5-5-7 Dm9 x-5-3-5-5-5 G13 3-x-3-4-5-5
const shapes = "<[c3,e3,b3,d4,e4] [a2,g3,c4,e4,b4] [d3,f3,c4,e4,a4] [g2,f3,b3,e4,a4]>"
const roots = "<c2 a1 d2 g1>"
// the guitar: picks the shape's strings in the order given by `order`
// clean jazz guitar, notes ring on a little, a small room, a short slap-back echo
const guitar = order => note(shapes).arp(order).s("gm_electric_guitar_jazz")
.clip(1.5).room(.25).roomsize(1.5)
.delay(.15).delaytime(.12).delayfeedback(.2).gain(.9)
const up8 = guitar("0 1 2 3 4 3 2 1") // eighths: up and down
const up16 = guitar("[0 1 2 3 4 3 2 1]*2") // sixteenths: twice as fast
const down16 = guitar("[4 3 2 1 0 1 2 3]*2") // sixteenths, from the top string down
// backing: upright bass on beats 1 and 3, soft hats and rimshots
const bass = note(roots).struct("x ~ x ~").s("gm_acoustic_bass").gain(.8)
const brush = s("[~ hh]*4, ~ rim ~ rim").bank("RolandTR808").hpf(300).gain(.35)
// the last bar: the Cmaj9 shape strummed once and left to ring
const ending = note("[c3,e3,b3,d4,e4]").s("gm_electric_guitar_jazz")
.clip(4).room(.5).roomsize(3).gain(.9)
// ---------- the exercise ----------
$: arrange(
[4, up8], // 1. the shapes, slowly, guitar alone
[4, stack(up8, bass, brush)], // 2. the same with bass and drums
[4, stack(up16, bass, brush)], // 3. double speed
[4, stack(down16, bass, brush)], // 4. double speed, top string first
[1, ending] // 5. final chord
)
| Command | What it does |
|---|---|
const shapes = "<[c3,e3,b3,d4,e4] …>" | The four chord shapes from the tab, one per bar, written lowest string first. Inside [ ] the commas stack the notes into one chord. |
const guitar = order => note(shapes).arp(order) | A function: give it a picking order and it plays the shapes in that order. .arp numbers the notes of each shape from the lowest string: 0 = lowest, 4 = highest. |
.s("gm_electric_guitar_jazz") | A clean jazz guitar. Other guitars: gm_electric_guitar_clean, gm_acoustic_guitar_nylon, gm_acoustic_guitar_steel, gm_overdriven_guitar, gm_distortion_guitar. |
.clip(1.5) | Each note lasts 1.5 times its step, so notes overlap and ring on, as they do on a real guitar when you hold the chord shape. |
.room(.25).roomsize(1.5) | A small room (25 % reverb, 1.5-second tail): the clean-guitar setting from the effects-per-instrument table. |
.delay(.15).delaytime(.12).delayfeedback(.2) | A quiet, very short "slap-back" echo (0.12 s, about one repeat) that thickens the sound like a guitar amp. |
guitar("0 1 2 3 4 3 2 1") | Eighth notes: up through the five strings, then back down. |
guitar("[0 1 2 3 4 3 2 1]*2") | Sixteenth notes: *2 plays the same up-and-down twice in one bar. |
guitar("[4 3 2 1 0 1 2 3]*2") | Sixteenths starting from the top string: a typical way exercises are extended. |
note(roots).struct("x ~ x ~").s("gm_acoustic_bass") | An upright bass playing each chord's root on beats 1 and 3. |
s("[~ hh]*4, ~ rim ~ rim").bank("RolandTR808").hpf(300) | Soft drums: off-beat hats and a rimshot on beats 2 and 4, with the low end removed so they stay light. |
note("[c3,e3,b3,d4,e4]")…clip(4) | The ending: the Cmaj9 shape, all strings at once, held for 4 steps so it rings out in a bigger room. |
arrange([4, up8], [4, stack(up8, bass, brush)], …, [1, ending]) | The exercise in five parts: 4 + 4 + 4 + 4 + 1 = 17 bars. |
To rebuild a specific guitar video
- Get the tab. Many exercise videos show it on screen or link to it in the description. Pause on each bar and write it down.
- Turn each fret into a note with the string table above (open string + fret).
- Find the rhythm. Count the notes per beat: 2 per beat = eighths (8 per bar), 4 per beat = sixteenths (16 per bar), 3 per beat = triplets (12 per bar). Write a single line as
note("c3 e3 b3 d4 …"), or, when it's arpeggios over chord shapes, use shapes +.arpas above. - Match the tempo with
setcpm(BPM/4). Tap along to the video and count beats for 15 seconds × 4. - Pick the guitar sound and effects: clean = small room + short echo; rock =
.distort("3:.4").lpf(3000)(see effects per instrument).
If you paste the tab (or write the notes down), the exact exercise from a video can be written the same way.
11.9Open Road: sus chords in a song
What it shows: how sus chords are used in real songs (folk pop, D major, 92 BPM). It puts the sus chords lesson into practice:
- The sus move. The guitar holds one shape and changes only its top note: D → Dsus4 → D → Dsus2. That moving note is the whole difference between major, sus4 and sus2, and it makes a little melody by itself.
- Tension and release. A sus chord sounds unfinished, so it's usually followed by the plain chord: Asus4 → A, and the strongest pull of all, A7sus4 → A7 → D.
- Same keys, two names. In the bridge the keys play only two shapes, while the bass changes under them. That turns D E A into Dsus2 and then Asus4, and D G A into Gsus2 and then Dsus4.
- Chords written as notes, so you can see exactly which note moves. A glockenspiel plays only that note.
| Section | Chords (one per bar) | The note that moves | What you hear |
|---|---|---|---|
| Intro (guitar alone) | D – Dsus4 – D – Dsus2 | F♯ → G → F♯ → E | The sus move, plain and simple: the chord "leans" up, comes back, then opens downward. |
| Verse | D – Dsus4 – D – Dsus2 – G – Gsus4 – Asus4 – A | F♯ G F♯ E · B C D C♯ | The same move on G, then Asus4 → A: tension that resolves at the end of the phrase. |
| Chorus | Bm7 – Gsus2 – D – Asus4 – Bm7 – Gsus2 – A7sus4 – A7 | A A F♯ D · A A D C♯ | Bigger and more open: Gsus2 has no B, so it shimmers. A7sus4 → A7 pulls hard back to D. |
| Bridge | Dsus2 – Asus4 – Gsus2 – Dsus4 | only the bass: D A G D | Just two shapes of keys: D E A, then D G A. Each one gets two names from the bass under it. |
| Outro | Dsus4 – D – Dsus2 – D | G → F♯ → E → F♯ | The sus move again, ending on plain D: home. |
| Guitar shape | Tab (E A D G B e) | Notes | In Strudel |
|---|---|---|---|
| D | x-x-0-2-3-2 | D A D F♯ | [d3,a3,d4,f#4] |
| Dsus4 | x-x-0-2-3-3 | D A D G | [d3,a3,d4,g4] |
| Dsus2 | x-x-0-2-3-0 | D A D E | [d3,a3,d4,e4] |
These are the three most famous sus shapes on guitar: only the thin top string changes (fret 2, 3 or open). The guitar plays the root twice and puts the moving note on top, where you hear it best. The sus2 note (E) sits an octave higher than in the recipe 0 2 7, but it's still a sus2 chord because there's no 3rd (F♯). To read tab, see 11.8, Step 1.
// OPEN ROAD · sus chords · folk pop · D major · 92 BPM · 36 bars (about 1:34)
// every chord is written as notes, so you can see the one note that moves
setcpm(92/4)
// ---------- chords, one per bar ----------
// guitar shapes: root, 5th, root again, and the "moving" note on top
// D = xx0232 (top note F#) Dsus4 = xx0233 (G) Dsus2 = xx0230 (E)
// verse: D – Dsus4 – D – Dsus2 | G – Gsus4 – Asus4 – A
const verse = "<[d3,a3,d4,f#4] [d3,a3,d4,g4] [d3,a3,d4,f#4] [d3,a3,d4,e4] [g2,d3,g3,b3] [g2,d3,g3,c4] [a2,e3,a3,d4] [a2,e3,a3,c#4]>"
const verseBell = "<f#5 g5 f#5 e5 b4 c5 d5 c#5>"
const verseBass = "<d2 d2 d2 d2 g1 g1 a1 a1>"
// chorus: Bm7 – Gsus2 – D – Asus4 | Bm7 – Gsus2 – A7sus4 – A7
const chorus = "<[b2,f#3,a3,d4] [g2,d3,g3,a3] [d3,a3,d4,f#4] [a2,e3,a3,d4] [b2,f#3,a3,d4] [g2,d3,g3,a3] [a2,e3,g3,d4] [a2,e3,g3,c#4]>"
const chorusBell = "<a4 a4 f#5 d5 a4 a4 d5 c#5>"
const chorusBass = "<b1 g1 d2 a1 b1 g1 a1 a1>"
// bridge: two shapes, the bass gives each one its name
// D E A over D = Dsus2 · over A = Asus4 D G A over G = Gsus2 · over D = Dsus4
const bridgeKeys = "<[d4,e4,a4] [d4,e4,a4] [d4,g4,a4] [d4,g4,a4]>"
const bridgeBass = "<d2 a1 g1 d2>"
// outro: Dsus4 – D – Dsus2 – D
const outro = "<[d3,a3,d4,g4] [d3,a3,d4,f#4] [d3,a3,d4,e4] [d3,a3,d4,f#4]>"
const outroBell = "<g5 f#5 e5 f#5>"
// ---------- instruments ----------
// steel-string guitar, folk strum: down · down-up · up-down (8 eighths per bar)
const guitar = chords => note(chords).struct("x ~ x x ~ x x ~")
.s("gm_acoustic_guitar_steel").clip(1.5).room(.25).roomsize(1.5).gain(.8)
// a glockenspiel plays only the note that moves, with an echo on the dotted eighth
const bell = notes => note(notes).s("gm_glockenspiel")
.delay(.3).delaytime(.49).delayfeedback(.35).room(.4).gain(.45)
// upright bass on beats 1 and 3, plus a pickup into the next bar
const bass = roots => note(roots).struct("x ~ ~ ~ x ~ ~ x").s("gm_acoustic_bass").gain(.85)
// warm pad: fades in, big hall, its own reverb (orbit 2)
const pad = chords => note(chords).s("gm_pad_warm")
.attack(.5).release(1).lpf(2000).room(.7).roomsize(5).orbit(2).gain(.35)
// electric piano for the bridge, so the two shapes are easy to hear
const keys = chords => note(chords).struct("x ~ ~ x ~ ~ x ~").s("gm_epiano1").room(.3).gain(.7)
// ---------- drums ----------
const drumsSoft = s("bd ~ ~ ~ bd ~ ~ ~, ~ ~ rim ~ ~ ~ rim ~, [~ hh]*4").bank("RolandTR808").gain(.5)
const drumsFull = s("bd ~ ~ bd bd ~ ~ ~, ~ ~ sd ~ ~ ~ sd ~, hh*8").bank("RolandTR808").room(.15).gain(.6)
// ---------- blocks ----------
const intro = guitar(verse) // bars 1–4 of the verse: D Dsus4 D Dsus2
const verseA = stack(guitar(verse), bell(verseBell), bass(verseBass), drumsSoft)
const chorusA = stack(guitar(chorus), bell(chorusBell), bass(chorusBass), pad(chorus), drumsFull)
const bridgeA = stack(keys(bridgeKeys), pad(bridgeKeys), bass(bridgeBass))
const outroA = stack(guitar(outro), bell(outroBell))
// ---------- the song ----------
$: arrange(
[4, intro], // guitar alone: hear the top note move F# → G → F# → E
[8, verseA], // + bell, bass and soft drums
[8, chorusA], // + pad, full drums
[4, bridgeA], // same keys, different bass = different chord names
[8, chorusA],
[4, outroA] // the sus4 → major → sus2 → major move to finish
)
| Command | What it does |
|---|---|
const verse = "<[d3,a3,d4,f#4] [d3,a3,d4,g4] …>" | The verse chords, one per bar, as guitar shapes. Compare neighbours: from f#4 to g4 is the only change from D to Dsus4. |
const verseBell = "<f#5 g5 f#5 e5 b4 c5 d5 c#5>" | The moving note of each verse chord, an octave higher, for the glockenspiel. |
const bridgeKeys = "<[d4,e4,a4] [d4,e4,a4] [d4,g4,a4] [d4,g4,a4]>" | The bridge: only two shapes, each played for two bars. |
const bridgeBass = "<d2 a1 g1 d2>" | The bass under the bridge. It gives the shapes their names: D E A over D = Dsus2, over A = Asus4; D G A over G = Gsus2, over D = Dsus4. |
const guitar = chords => note(chords).struct("x ~ x x ~ x x ~") | An instrument as a function (as in 11.7): give it chords and it strums them. The 8-step pattern is the classic folk strum: hits on steps 1, 3, 4, 6, 7 ("down · down-up · up-down"). |
.s("gm_acoustic_guitar_steel").clip(1.5).room(.25).roomsize(1.5) | Steel-string acoustic guitar. clip(1.5) lets each strum ring into the next; a small room, as the effects table suggests for acoustic guitar. |
.s("gm_glockenspiel").delay(.3).delaytime(.49).delayfeedback(.35) | The bell, with an echo every 0.49 s: a dotted eighth at 92 BPM (one beat = 60 ÷ 92 = 0.65 s; × ¾ = 0.49 s), so the echoes fall between the beats. |
note(roots).struct("x ~ ~ ~ x ~ ~ x").s("gm_acoustic_bass") | Upright bass: the root on beats 1 and 3, plus a short pickup note on the last eighth. |
.attack(.5).release(1).lpf(2000).room(.7).roomsize(5).orbit(2) | The pad fades in over half a second, stays soft (low-pass at 2000 Hz) and sits in a big hall on its own orbit, so its long reverb doesn't blur the drums. |
const keys = chords => note(chords).struct("x ~ ~ x ~ ~ x ~").s("gm_epiano1") | Electric piano for the bridge, playing the shapes on steps 1, 4 and 7 (a 3 + 3 + 2 rhythm), so you clearly hear when only the bass changes. |
drumsSoft · drumsFull | Two drum kits from the TR-808: soft (kick on 1 and 3, rimshots, off-beat hats) for the verse; full (snare, a kick pickup, eighth hats) for the chorus. |
arrange([4, intro], [8, verseA], [8, chorusA], [4, bridgeA], [8, chorusA], [4, outroA]) | The song: 4 + 8 + 8 + 4 + 8 + 4 = 36 bars, about 1:34. intro is the guitar alone, so it plays the first 4 verse chords. |
How it was made, step by step
GUIDED · 4 STEPS · IN THE EDITORBuild Open Road step by step →One step at a time, with the explanation next to the code. Change anything and press Ctrl+Enter.Each step is a small piece you can play on its own. The full track above puts them together.
Step 1 · The sus move on one chord
Hold one chord and move only its top note. That's how guitarists use sus chords most of the time: the hand keeps the shape and one finger goes on and off the string.
setcpm(92/4)
// D – Dsus4 – D – Dsus2: only the top note moves (F# → G → F# → E)
note("<[d3,a3,d4,f#4] [d3,a3,d4,g4] [d3,a3,d4,f#4] [d3,a3,d4,e4]>")
.struct("x ~ x x ~ x x ~")
.s("gm_acoustic_guitar_steel").clip(1.5).room(.25)
| Command | What it does |
|---|---|
[d3,a3,d4,f#4] → [d3,a3,d4,g4] | D to Dsus4: f#4 (the 3rd, +4) goes up to g4 (+5). The other three notes stay. |
[d3,a3,d4,e4] | Dsus2: the top note goes down to e4 instead. No F♯, so the chord is neither major nor minor. |
.struct("x ~ x x ~ x x ~") | The strum rhythm: 8 steps per bar, 5 of them played. |
Step 2 · Turn the moving note into a melody
Because only one note changes, those notes form a tune of their own. The glockenspiel plays just that note, an octave higher, so the ear follows it.
setcpm(92/4)
const verse = "<[d3,a3,d4,f#4] [d3,a3,d4,g4] [d3,a3,d4,f#4] [d3,a3,d4,e4] [g2,d3,g3,b3] [g2,d3,g3,c4] [a2,e3,a3,d4] [a2,e3,a3,c#4]>"
$: note(verse).struct("x ~ x x ~ x x ~").s("gm_acoustic_guitar_steel").clip(1.5).room(.25).gain(.8)
// the top note of each chord, an octave higher
$: note("<f#5 g5 f#5 e5 b4 c5 d5 c#5>").s("gm_glockenspiel")
.delay(.3).delaytime(.49).delayfeedback(.35).gain(.45)
| Command | What it does |
|---|---|
[g2,d3,g3,b3] [g2,d3,g3,c4] | Bars 5–6: the same move on G. B (the 3rd) goes up to C: G → Gsus4. |
[a2,e3,a3,d4] [a2,e3,a3,c#4] | Bars 7–8: Asus4 → A. D falls back to C♯ and the tension is released at the end of the phrase. |
note("<f#5 g5 f#5 e5 b4 c5 d5 c#5>") | The bell: one note per bar, the top note of each guitar chord. Read the chord line and the bell line together to see the link. |
Step 3 · Same keys, two names
The name of a sus chord depends on the bass. Keep the keys still and move only the bass, and the chord name changes even though your hands on the keys don't move.
setcpm(92/4)
// the same keys over a different bass note = a different chord name
$: note("<[d4,e4,a4] [d4,e4,a4] [d4,g4,a4] [d4,g4,a4]>").s("gm_epiano1")
$: note("<d2 a1 g1 d2>").s("gm_acoustic_bass")
// Dsus2 Asus4 Gsus2 Dsus4
| Command | What it does |
|---|---|
[d4,e4,a4] over d2 | D E A counted from D: 0, +2, +7 = Dsus2. |
[d4,e4,a4] over a1 | The same keys counted from A: A D E = 0, +5, +7 = Asus4. |
[d4,g4,a4] over g1 | G A D = 0, +2, +7 = Gsus2. |
[d4,g4,a4] over d2 | D G A = 0, +5, +7 = Dsus4. It wants to go to D, which is where the chorus starts. |
Step 4 · The strongest pull: 7sus4 → 7 → home
At the end of the chorus, A7sus4 → A7 → D does the "lean and resolve" twice in a row. The sus note D falls to C♯ (A7), and C♯ then pulls up to D, the home note of the key.
setcpm(92/4)
$: note("<[a2,e3,g3,d4] [a2,e3,g3,c#4] [d3,a3,d4,f#4] [d3,a3,d4,f#4]>").s("piano")
$: note("<d5 c#5 d5 ~>").s("gm_glockenspiel").gain(.5)
| Command | What it does |
|---|---|
[a2,e3,g3,d4] | A7sus4 = A7 with D in place of C♯: recipe 0 5 7 10. In Strudel's chord() it's A7sus. |
[a2,e3,g3,c#4] | A7: D falls to C♯. The G in it also wants to fall, to F♯. |
[d3,a3,d4,f#4] | D: both wishes come true. C♯ goes up to D and G goes down to F♯. Home. |
note("<d5 c#5 d5 ~>") | The bell plays the line D → C♯ → D, then rests (~) for the last bar. |
Make it your own
- Use chord names instead of notes:
chord("<D Dsus D D2>").voicing().s("piano"). Remember: in Strudel sus4 issusand sus2 is2. - Change the key: the same move works on any major chord. On A:
[a2,e3,a3,c#4]→[a2,e3,a3,d4]→[a2,e3,a3,b3](A, Asus4, Asus2). Check the notes in the table of all 12 sus chords. - Hear it without sus: replace every sus chord in
versewith the plain chord (g4→f#4,e4→f#4). The song still works, but it sits still.
Tested with Strudel 1.3. Course text: CC BY-SA 4.0, code: CC0 1.0 (licences).