Until now, one scale served the whole track. Pick notes from C minor, play them over any chord, call it done. It works. But the best melodies respond to each chord. When the harmony changes, the strong notes change with it. The melody tracks the chords.
s(), note(), stack(), setcpm(35),
mini-notation, .gain(), .pan(),
.lpf(), .lpq(), .attack(), .decay(),
.sustain(), .release(),
.room(), .size(),
.delay(), .delaytime(), .delayfeedback(),
.distort(), chord notation [c3,eb3,g3],
progressions with <>,
.every(), .sometimes(), .jux(), .off(),
the Cm→Ab→Bb→G progression from EDM.4,
and arrangement from EDM.6.
The Cm chord is C, Eb, G. When Cm is playing, those three notes are the strongest places to land. A melody built from them can’t clash with the harmony. Pad + melody, chord tones only:
Every note in the melody is a note from the chord. C, Eb, G — nothing else. No tension, no surprises. The melody reinforces the harmony completely.
Now the full progression: Cm→Ab→Bb→G. Each bar’s melody uses notes from that bar’s chord:
Cm bar: C, Eb, G. Ab bar: Ab, C, Eb. Bb bar: Bb, D, F. G bar: G, B, D. The melody changes its note pool every bar to match the chord underneath. Each note belongs.
The notes that make up the current chord. Cm = C, Eb, G. Ab = Ab, C, Eb. Landing on a chord tone on a strong beat (beats 1 and 3) creates consonance. The melody agrees with the harmony. No friction.
Rearrange the chord tones — play them in different orders. Try "g4 eb4 c4 eb4" for the Cm bar. The notes are the same. The melody changes. Order is melody.
Pure chord tones sound correct but static. The melody jumps between chord members and skips the space between them. Passing tones fill those gaps — scale notes between chord tones that create smooth motion.
Cm chord tones with passing tones woven in. The D and F connect C to Eb and Eb to G:
D and F aren’t chord tones — Cm is C, Eb, G. But they connect the chord tones smoothly. The melody walks instead of jumping. Beats 1 and 5 land on chord tones (C and G). The notes in between pass through.
Scale notes between chord tones. They create smooth melodic motion. Strong beats (1 and 3) get chord tones — stable, consonant. Weak beats (2 and 4) get passing tones — moving, connecting. The chord tones are the destinations. The passing tones are the path.
Full progression with passing tones. Each bar starts on the root, steps through a passing tone, hits the next chord tone, then passes through again:
Beats 1 and 3 in each bar are chord tones. Beats 2 and 4 are passing tones. Cm bar: C (chord tone), D (passing), Eb (chord tone), G (chord tone). Ab bar: Ab (chord tone), Bb (passing), C (chord tone), Eb (chord tone). The strong beats lock to the harmony. The weak beats create flow.
Move a passing tone to a strong beat. Try "d4 c4 eb4 g4" for the Cm bar — D lands on beat 1 instead of C. Hear the tension? That’s not wrong. It’s a choice. Tension on purpose is expressiveness.
A melody doesn’t have to play every beat. .struct() imposes a rhythm on notes — a boolean mask that decides which positions sound and which stay silent.
A scale run through a rhythmic gate. Eight notes, but only some play:
.struct("1 0 1 0 0 1 0 1") — play positions 1, 3, 6, 8. Rest everywhere else. The scale provides the pitches. The struct provides the rhythm. Same notes, completely different feel depending on which ones sound.
.struct("1 0 1 0") imposes a boolean rhythm on a pattern. 1 = play. 0 = rest. The pattern provides the notes. The struct provides the rhythm. Pitch and time become independent — change either one without touching the other.
Gate the melody with a euclidean rhythm. Five hits out of eight slots, distributed evenly:
The euclidean algorithm picks 5 of 8 positions. The melody has 8 notes per bar but only 5 sound. Change (5,8) to (3,8) for sparser. (7,8) for denser. The notes stay the same. The rhythm reshapes the melody.
Try "1(3,8)" for a minimal melody — three notes per bar. Or write a custom pattern: "1 1 0 0 1 0 0 1". Different struct, same notes, completely different feel. The struct is the personality.
The pad plays chords. The melody plays single notes. Two independent lines moving simultaneously. That’s counterpoint — the foundation of Western harmony since the 1400s. Bach built entire careers on it. Every time you stack() a pad and a melody, you’re writing counterpoint.
A canon is one melody chasing itself. The same line, offset in time. .off() from EDM.5 does exactly this — it takes a pattern, delays a copy, and layers them. That’s a canon.
.off(1/8, add(note(12))) delays a copy by 1/8 of a cycle and transposes it up 12 semitones (one octave). The melody plays, then an octave-higher echo follows one step behind. Two voices from one line. Bach’s two-part inventions work the same way — a subject and its imitation, staggered in time.
| type | description | in strudel |
|---|---|---|
| canon | same melody, offset in time | .off(1/8, x => x) |
| imitation | similar melody, transposed | .off(1/4, add(note(7))) |
| contrary motion | voices move in opposite directions | .superimpose(x => x.add(note(-7))) |
| free counterpoint | independent melodies stacked | two note() lines in stack() |
A phonk track where the melody follows the harmony. Chord tones on strong beats, passing tones connecting them, euclidean gating for groove. The melody doesn’t just play over the chords — it responds to them. Every bar, different strong notes. Every bar, the melody belongs.
.struct("1(5,8)") to "1(3,8)" for a sparser melody. Fewer notes, more space. Notice how the rests let the delay fill in..off(1/8, add(note(12))) to the melody line for an octave echo. The canon from the rabbit hole, applied to the capstone.| tool | does | looks like |
|---|---|---|
| chord tones | notes from the current chord — strongest melodic targets | Cm = c4 eb4 g4 |
| passing tones | scale notes between chord tones — smooth melodic motion | c4 d4 eb4 (D is passing) |
| strong/weak beats | chord tones on 1 and 3, passing tones on 2 and 4 | beat targeting |
| .struct() | boolean rhythm mask — 1 plays, 0 rests | .struct("1 0 1 0 0 1 0 1") |
| boolean patterns | manual rhythm control with 1s and 0s | "1 0 1 0" |
| euclidean struct | evenly distributed hits in N slots | .struct("1(5,8)") |
Identify the chord tones for each bar. Put them on strong beats. Fill weak beats with passing tones from the scale. Use .struct() to gate the rhythm. The melody tracks the harmony — every bar, different strong notes. Every bar, the melody belongs.
Next: Diatonic Harmony. Build every chord in a key from scratch.
Tracks that demonstrate this lesson’s concepts.
| artist | track | why |
|---|---|---|
| Shoji Meguro | Persona 5: Beneath the Mask (2016) | (VGM) extended harmony, lo-fi before lo-fi was a genre |
| Nujabes | Luv(sic) Part 3 (2005) | (hip-hop) jazz samples + modal harmony in beat music |
| Charlie Parker | Donna Lee (1947) | (hip-hop) bebop chord-tone soloing, melody threading through rapid changes |
The relationship between melody and harmony — a single voice moving against a chordal backdrop — is the central tension of Western music.
Before homophony (melody + chords), music was polyphonic — multiple independent voices. The rules of counterpoint, codified by theorists like Fux (Gradus ad Parnassum, 1725), governed how voices could move relative to each other. Contrary motion (voices moving in opposite directions) was preferred. Parallel fifths were forbidden. These rules still shape how we hear chord tones vs. non-chord tones — a melody note that clashes with the chord is heard as “wanting to resolve” because of centuries of contrapuntal conditioning.
Parker’s bebop revolution was built on targeting chord tones. Over fast-moving changes, he would land on the 3rd or 7th of each chord on strong beats, connecting them with chromatic passing tones and enclosures. “Donna Lee” (1947) demonstrates this — the melody outlines the chord progression with precision while moving so fast it sounds free. Chord tone soloing is still the foundation of jazz improvisation pedagogy.
Sources: Fux, Gradus ad Parnassum (1725/1943); DeVeaux, The Birth of Bebop (1997).