Layers

EDM.3: polyrhythm, ghost notes, stereo, and three voices breathing together

Your EDM.2 capstone has six layers. Sounds like a track. But it’s flat: no ghosts, no width, no cross-rhythm. This lesson adds what turns a pattern into a groove.

about this lesson

Repertoire: Wind Scene (Yasunori Mitsuda, Chrono Trigger, 1995) and Spring (ConcernedApe, Stardew Valley, 2016). Both are three voices breathing together: melody, accompaniment, bass. Same architecture, different aesthetics.

Parallel composition: Adding a second melodic voice to your ambient piece. The shakuhachi ghost. Four layers now.

What you already know: s(), note(), stack(), setcpm(), mini-notation, .gain(), .lpf(), ADSR, .add(note()), sine.range(), and the drums + filtered reese from EDM.1–2.

00Three Against Four

Four kicks, evenly spaced. One per beat:

four in a cycle

Now three claps in the same amount of time:

three in a cycle

Stack them:

3 against 4

The kick divides the cycle into four. The clap divides it into three. They line up on beat 1 and pull apart everywhere else. That tension is the groove.

polyrhythm

Two or more patterns with different subdivisions running over the same time span. Three against four. Five against eight. They share a downbeat but disagree on everything between.

tweak it

Replace the clap with s("cp cp cp cp cp"). Five against four. Try s("cp cp cp cp cp cp cp") for seven against four. More hits, more tension.

Euclidean layers

Euclidean patterns generate polyrhythm. Stack two with different hit counts over the same grid:

3 kicks + 5 claps in 8 slots

Three kicks. Five claps. Eight slots. Two grids interlocking. Change the numbers and the whole groove shifts.

tweak it

Try s("bd(5,16)") against s("cp(7,16)").gain(0.6). Sixteen slots, more room. Add a third layer: s("hh(11,16)").gain(0.3).

rabbit hole: cross-rhythm and West African drumming

Cross-rhythm

A cross-rhythm is a polyrhythm where the two subdivisions are coprime (no common factor except 1). Three against four is a cross-rhythm because 3 and 4 share no factors. Six against four is not, because both are divisible by 2.

The most common cross-rhythm is 3:2. Two beats in one hand, three in the other. It shows up everywhere: West African bell patterns, Afro-Cuban clave, jazz ride cymbal.

Where beats align

4 3 align cycle

The 4-beat grid (orange) and 3-beat grid (blue) only coincide at the start of each cycle. Every other hit lands in a gap. That’s where the rhythmic interest lives.

West African drumming

West African music is built on polyrhythm. The master drummer plays a timeline pattern while other drums play interlocking parts with different subdivisions. Each player hears a different “beat 1.”

The bell pattern in Ewe music (Ghana) is a 12-pulse timeline where different drums divide those 12 pulses into groups of 2, 3, and 4 simultaneously. Three against four against six. That’s what you built with stack() and euclidean patterns.

Three layers

4:3:5 polyrhythm

For more on West African polyrhythm: Novotney, “The 3:2 Relationship as the Foundation of Timelines in West African Musics” (1998).

Repertoire: three voices, one piece

Polyrhythm is one kind of layering. Another kind: independent melodic voices playing simultaneously. Listen to how Yasunori Mitsuda layers three voices in the Chrono Trigger Wind Scene:

three-voice exercise (inspired by Wind Scene — real transcription TBD)

Three layers. Each one has a different rhythm. The melody moves in steps. The accompaniment arpeggiates chords. The bass holds the foundation. They breathe together because each has space the others don’t fill.

Now the same architecture, simpler. Stardew Valley — Spring (ConcernedApe, 2016):

three-voice exercise (inspired by Stardew Spring — verify notes)

Same three-voice structure. Melody on top, chords in the middle, bass on the bottom. Mitsuda makes it shimmer. ConcernedApe makes it cozy. The architecture is identical.

the principle

Three voices is enough. Melody, accompaniment, bass. If each voice has its own register (high, mid, low) and its own rhythm, they won’t collide. That’s what stack() is for. Not just playing things at the same time. Giving each voice room.

01Ghost Notes

The breakbeat from EDM.1. Kick, snare, hats. Clean and functional:

the basic break

Now add a quiet euclidean snare underneath:

+ ghost snares

The main snare still cracks on beat 3. The ghosts fill in around it, quiet enough to stay behind but loud enough to add motion. The beat stopped being a grid. Started being a groove.

ghost notes

Quiet hits between the main beats. Drummers play them naturally. Programmed beats usually miss them. Notice the difference: a pattern that ticks vs. one that breathes.

Ghost kicks

Same idea, different drum. A euclidean kick layer at low volume:

+ ghost kicks

The ghost kick shuffles underneath the main pattern. It fills spaces without fighting the downbeat.

tweak it

Change (5,16) to (3,16) for sparser ghosts. Try (7,16) for busier. Adjust .gain() between 0.15 and 0.3. Too loud and they compete. Too quiet and they vanish.

Hat dynamics

Hi-hats at one volume sound robotic. Pattern the velocity and mix in an open hat at the end of the bar:

dynamic hats + open hat tail

The gain pattern creates accents. Quiet, medium, quiet, loud. Your ear locks onto the accents, not the individual ticks.

tweak it

Try .gain("0.2 0.6 0.3 1") for harder accents. Or s("[hh hh hh oh]*4") to put an open hat every fourth hit. Different rhythmic feel, same number of sounds.

02Width

Everything so far plays dead center. A single point between your ears.

.pan() places a sound in the stereo field. 0 is full left. 1 is full right. 0.5 is center. Listen to the hats in this version:

mono hats (centered)

Now the same beat with two hat lines panned apart:

stereo hats (panned L + R)

Wider. Each hat has its own space. The kick and snare stay centered. Use headphones for the clearest difference.

stereo field

.pan(0) = left ear. .pan(1) = right ear. .pan(0.5) = center. Heavy sounds (kick, snare, bass) stay centered. Light textures (hats, percussion) spread to the sides.

Moving pan

Static pan is placement. Moving pan is motion:

hats sweeping L to R

.pan(sine.slow(2)): the hats sweep left to right over 2 cycles. Notice the movement is spatial now, not just rhythmic.

tweak it

Try .pan(sine.slow(8)) for a slower sweep. Or .pan(perlin.range(0.2, 0.8)) for random wandering that avoids the extremes. perlin is a smooth noise signal.

rabbit hole: why bass stays centered

Physics

Low frequencies have long wavelengths. A 50Hz wave is about 7 meters long. Your head is about 0.2 meters wide. Your ears can’t tell which direction a 50Hz sound comes from because the wave wraps around your skull before the ears register a difference. Low-frequency panning is wasted information.

Club systems

Most club sound systems run the sub in mono. Everything below ~120Hz gets summed to a single channel. If your bass is panned hard left, half its energy disappears on summing. Center bass = full power on every system.

The rule

Kick, snare, and bass: center. Always. Hats, rides, percussion: spread them. Effects (delay tails, reverb, pads): go wide. The low end anchors. The top end decorates.

That’s why none of the bass patterns in EDM.2 use .pan(). The reese stays at 0.5 (the default). The stereo width comes from everything else.

03The Score Continues

Your ambient piece has three layers: koto, pulse, bass drone. Now add a second voice. Something that breathes in the spaces the koto leaves. A shakuhachi ghost:

your ambient piece: four voices

Four voices. The koto and shakuhachi interleave. Where the koto plays, the shakuhachi rests. Where the koto rests, the shakuhachi enters. Same principle as the Wind Scene: each voice has room because the other voices leave space for it.

Your turn

Change the shakuhachi notes. Try note("~ ~ a4 ~ ~ ~ d5 ~"). The relationship between the two melodies is the composition. Pan the shakuhachi: add .pan(0.7) to spread it right while the koto stays centered.

04The Arrangement

Everything combined. Kick, snare, ghost snares, stereo hats, open hat, an alternating reese, and a melodic stab. Ten layers. One track.

// TITLE: layers
compose
  1. Rewrite the stab melody. Try note("~ <g4 ab4> ~ <eb4 f4>") for higher, brighter notes. Or note("<[~ eb4 ~ c4] [~ f4 ~ eb4]>") for two hits per cycle.
  2. Add a euclidean ride: s("ride(3,8)").gain(0.25).pan(0.6). The ride cross-rhythm weaves through the hats.
  3. Change the bass pattern: try "<[c2 ~ eb2 ~] [c2 ~ g1 ~] [c2 c2 f2 ~] [eb2 ~ c2 ~]>" for a 4-cycle phrase instead of 2.
  4. When it grooves, hit share. That’s a full DnB arrangement you coded.
what you earned
tooldoeslooks like
.pan()stereo position (0=left, 0.5=center, 1=right).pan(0.3)
.pan(signal)automated stereo movement.pan(sine.slow(2))
perlinsmooth random noise signalperlin.range(0.2, 0.8)
ghost layerquiet euclidean pattern under a main hits("sd(3,16)").gain(0.2)
arrangement checklist

Kick and snare: centered, loud. Ghost layers: euclidean, quiet. Hats: panned, dynamic gain. Bass: centered, filtered. Everything in a stack().

Next: Atmosphere. Genre shift to phonk. The 808, dark chords, reverb, and space.

listening

Tracks that demonstrate this lesson’s concepts.

artisttrackwhy
Yasunori MitsudaChrono Trigger: Wind Scene (1995)(VGM) inspired by the three-voice texture: melody, arpeggio, bass
ConcernedApeStardew Valley: Spring (2016)(VGM) three-voice folk architecture, joy in simplicity
PhotekNi-Ten-Ichi-Ryu (1997)(DnB) drum programming so intricate it seemed inhuman
GoldieTimeless (1995)(DnB) 21 minutes of impossibly layered production
NoisiaStigma (2007)(neurofunk) polyrhythmic interplay reframes the groove
Ewe Drum EnsembleAgbadza (traditional)(DnB) master drum + bell + rattle: the original polyrhythmic stack
history

Polyrhythm isn’t a technique. It’s a worldview — the idea that multiple independent rhythmic voices can coexist without a single “correct” beat.

West African drumming

The Ewe people of Ghana use a bell pattern (the “standard pattern”) as a timeline against which multiple drums play independent, interlocking parts. Each player hears a different “beat 1.” The master drummer (atsimevu) controls the ensemble but doesn’t dictate individual parts. The music is the relationship between the layers, not any single layer. Ethnomusicologist A.M. Jones documented these structures in Studies in African Music (1959), one of the first Western academic accounts of polyrhythmic practice.

Afro-Cuban clave

The clave pattern (3+2 or 2+3) arrived in Cuba via the slave trade. It became the organizational principle of son, rumba, salsa, and eventually Latin jazz. The clave isn’t the rhythm — it’s the invisible grid that all other parts reference. Strudel’s euclidean patterns (3,8) and (5,8) generate the same kinds of maximally-even distributions that underlie clave-based music.

Photek and programmed polyrhythm (1997)

Rupert Parkes (Photek) used an E-mu sampler to program drum patterns with the precision of West African ensemble music but the timbral palette of electronic production. “Ni-Ten-Ichi-Ryu” layered single-shot drums from multiple sources with ghost notes so quiet they were almost subliminal. He cited Coltrane’s drummer Elvin Jones as an influence — jazz polyrhythm translated through a sampler.

Sources: Jones, Studies in African Music (1959); Washburne, “The Clave of Jazz” (1997); Pytlik, “Photek: Solaris” (1998).

→ explore the full timeline