← JamDojo Euclidean Rhythms

Euclidean Rhythms

Euclidean rhythms distribute a number of beats as evenly as possible across a number of steps. They appear in music traditions worldwide—from West African bell patterns to Cuban clave to electronic music.

In Strudel, you create them with the euclid function.


The Rhythm Distribution Experience

Before diving into how euclidean rhythms work, let’s feel what makes them special.

Pattern A vs Pattern B

Listen to these two patterns. Both have 3 kicks in 8 steps:

Pattern A:

sound("bd [~ bd] ~ ~ ~ bd ~")

Pattern B:

sound("bd").euclid(3, 8)

Which one feels more balanced? More natural? More like it could loop forever without getting boring?

The Density Spectrum

The same number of steps can hold different densities of beats. Listen to how the feel changes as we add more kicks to 8 steps:

Sparse (2 in 8):

sound("bd").euclid(2, 8)

Balanced (3 in 8):

sound("bd").euclid(3, 8)

Dense (5 in 8):

sound("bd").euclid(5, 8)

Very Dense (7 in 8):

sound("bd").euclid(7, 8)

Notice how each density creates a different rhythmic character. Sparse patterns breathe. Dense patterns drive. All remain balanced because the algorithm ensures even distribution.

What does “evenly distributed” actually mean?

Imagine you have to place 5 chairs around a circular table for 8 people. Where do you put them so everyone has equal access?

The euclidean algorithm solves this exact problem: it distributes N objects across M slots with maximal evenness—minimizing the difference between the smallest and largest gaps.

For 5 beats in 8 steps, the algorithm produces: X X . X . X . X .

The gaps are either 1 or 2 steps—never 0, never 3. That’s as even as mathematically possible.

This property appears in nature (sunflower seed spirals), architecture (dome construction), and music traditions that evolved over centuries without computers—because the human ear naturally gravitates toward balanced rhythms.


How It Works: The Bjorklund Algorithm

Now that you’ve heard euclidean rhythms, let’s understand why they sound so good.

The 2,300-Year-Old Beat Machine

The algorithm behind euclidean rhythms has an ancient pedigree:

  1. ~300 BCE: Euclid describes an algorithm for finding the greatest common divisor (GCD) of two numbers
  2. 2004: Computer scientist Godfried Toussaint discovers that traditional rhythms from around the world follow euclidean patterns
  3. 2005: Physicist Eric Bjorklund publishes an algorithm for distributing neutron pulses evenly in time—identical to the musical rhythm problem
  4. Today: Musicians use this algorithm to generate rhythms that sound simultaneously mathematical and deeply human

The 2,300-Year-Old Beat Machine

Euclid’s algorithm wasn’t designed for music—it solves the mathematical problem of finding common divisors. But when applied to rhythm, it produces patterns that musicians across cultures independently discovered over millennia.

The tresillo (3,8) from Cuba? Euclidean. The clave (5,8) from Latin America? Euclidean. The gankogui bell pattern (7,12) from West Africa? Euclidean. The aksak rhythm (4,9) from Turkey? Euclidean.

These cultures didn’t have computers or know about Euclid’s algorithm. They found these patterns through centuries of musical evolution because the human ear naturally prefers maximal evenness.

The algorithm doesn’t create musical rhythms—it describes the mathematics underlying rhythms that already feel right to us.

The Two Parameters That Control Everything

euclid(pulses, steps) takes just two numbers:

  • Pulses (k): How many beats to place
  • Steps (n): The total number of time slots

The density ratio k/n determines the feel:

  • k/n ≈ 0.25 (sparse): Minimal, spacious (e.g., 2 in 8)
  • k/n ≈ 0.375 (balanced): Classic patterns (e.g., 3 in 8, 5 in 16)
  • k/n ≈ 0.5 (half): Syncopated, driving (e.g., 4 in 8, 5 in 12)
  • k/n ≈ 0.75 (dense): Intense, full (e.g., 7 in 8)
  • k/n > 0.875 (very dense): Almost continuous (e.g., 7 in 8)

Pro tip: Ratios around 3/8 and 5/8 tend to create the most musical patterns because they have interesting GCD relationships that create repeating sub-patterns.


Classic Patterns Around the World

The euclidean algorithm rediscovers rhythms that have existed in global music traditions for centuries. Let’s explore these cultural touchstones.

Tresillo: The Cuban Foundation (3,8)

sound("bd").euclid(3, 8)

The tresillo pattern forms the rhythmic backbone of Cuban son, salsa, and countless Latin American styles. Its 3-3-2 subdivision creates the distinctive “Latin feel” that swept through jazz, R&B, and rock.

Tresillo: Cuba Meets West Africa

The name means “triplet” in Spanish, but the pattern originates from West African bell rhythms brought to Cuba via the slave trade. It appears in:

  • Cuban son and rumba
  • New Orleans second line
  • Bo Diddley beat (rock and roll)
  • Brazilian samba (variant)

Musical function: Creates forward momentum while avoiding the “square” feel of straight quarter notes. The uneven spacing (3+3+2 vs. 4+4) generates subtle syncopation that makes listeners want to move.

In practice: Often played on claves, cowbell, or bass drum. In salsa, the tresillo defines the montuno (repeated piano pattern). In rock, it’s the foundation of the “Bo Diddley beat.”

Clave: The Timekeeper (5,8 and 5,16)

sound("rim").euclid(5, 8)

The clave is sacred in Latin music—all other instruments align themselves to it. There are two primary forms:

Son clave (5,8):

sound("rim").euclid(5, 8)

Rumba clave (5,8 rotated):

sound("rim").euclidRot(5, 8, 1)

Son Clave vs. Rumba Clave: The Sacred Rotation

Both patterns use (5,8), but the rotation creates different feels:

Son clave: More symmetrical, smoother. Used in son, mambo, salsa. Rumba clave: More asymmetrical, funkier. Used in rumba, Afro-Cuban folklore.

The direction matters:

  • 3-2 clave: 3 hits in bar 1, 2 hits in bar 2 (forward momentum)
  • 2-3 clave: Reversed (laid-back feel)

Why it’s called the “key”: The Spanish word “clave” means “key” or “code.” In Latin music, you don’t “keep time”—you “keep clave.” Every arrangement is built to either align with or deliberately tension against the clave pattern. Playing the wrong direction is considered a serious musical error.

Extended clave (5,16): Slower tempos use 16 steps instead of 8, creating space for more complex polyrhythms.

The West African Bell Pattern: The Timeline (7,12)

sound("metal").euclid(7, 12)

This pattern, often called the “gankogui” or “standard pattern,” is fundamental to West African music and its diaspora descendants.

The African Timeline Principle

In traditional African music, the bell pattern serves as a “timeline”—a rhythmic reference point that all other instruments use for orientation. The timeline is:

  1. Always audible: Usually the highest, most penetrating instrument
  2. Never stops: Plays continuously throughout the piece
  3. Defines the cycle: Other patterns may be longer or shorter, but all relate to the bell

The (7,12) pattern is maximally asymmetric—it sounds different at every position in the cycle, making it easy to know “where you are” in the rhythm.

Global influence:

  • Afrobeat (Fela Kuti): Bell pattern holds the groove
  • Funk (James Brown): Cowbell parts derive from this
  • Electronic music: The “Amen break” and other sampled loops preserve this asymmetry

Why (7,12) specifically? The ratio 7/12 ≈ 0.583 creates five different interval sizes (1, 2, 2, 2, 2, 3), making the pattern highly recognizable and impossible to confuse with simpler divisions. The GCD(7,12) = 1 means it’s a “prime” rhythm with maximum cyclic interest.

Beyond the Classics: Hidden Euclidean Patterns

Many other cultural rhythms follow euclidean math:

Aksak (Turkey): (4,9)

sound("bd").euclid(4, 9)

Traditional Turkish and Balkan dance rhythm with 2-2-2-3 feel.

Venda Children’s Song (South Africa): (5,12)

sound("cp").euclid(5, 12)

Clapping pattern from South African children’s singing games.

These weren’t composed with algorithms—they emerged from cultural musical evolution. The math describes what the ear already knew.

The Power of Rotation

Rotation might seem like a simple shift, but it’s one of the most powerful musical tools in euclidean rhythm.

Basic Rotation

Use .euclidRot() to rotate the pattern. This shifts where it starts.

Listen for the snare on beat 1 (the downbeat) to hear how the kick pattern shifts:

No rotation (0):

stack(
sound("bd").euclidRot(3, 8, 0),
sound("sd").euclid(1, 8)  // Reference: marks beat 1
)

Rotation of 2:

stack(
sound("bd").euclidRot(3, 8, 2),
sound("sd").euclid(1, 8)  // Reference: marks beat 1
)

Rotation of 4:

stack(
sound("bd").euclidRot(3, 8, 4),
sound("sd").euclid(1, 8)  // Reference: marks beat 1
)

Same beats, same spacing, completely different feel. The snare shows you where beat 1 is—notice how the kicks shift their relationship to the downbeat.

Why Rotation Matters Musically

Rotation controls the phase relationship between the pattern and the downbeat. This determines whether your rhythm feels:

On the beat (rotation = 0): Solid, grounded, direct Syncopated (rotation ≠ 0): Funky, unexpected, danceable

Real-world examples:

Reggae one-drop: The snare hits on beat 3, not beats 2 and 4 like rock. This is rotation.

// Standard backbeat (rotation 0)
sound("sd").euclidRot(2, 8, 4)  // hits beats 2 & 4

// One-drop (rotation 2)
sound("sd").euclidRot(1, 4, 2)  // hits beat 3 only

Son clave vs. rumba clave: Same pattern, different rotation, completely different musical function.

Polyrhythmic layering: When multiple patterns have the same (pulses, steps) but different rotations, they create phase-shifting textures. This is how Steve Reich’s “Clapping Music” works.

Pro technique: Use rotation to avoid clashes when layering. If your kick and snare both use (4,16), rotate one by 4 steps so they never hit simultaneously.

Finding the Right Rotation

Different rotations work for different musical situations:


The Art of Layering

Single euclidean patterns are interesting. Layered euclidean patterns are magical. This section teaches the principles that turn mathematical patterns into living, breathing grooves.

Start Simple: Two-Layer Foundation

The foundation of any rhythm is the relationship between kick and snare:

Kick only (foundation):

sound("bd").euclid(4, 16)

Add snare (backbeat):

stack(
sound("bd").euclid(4, 16),
sound("sd").euclidRot(2, 16, 8)
)

Notice the snare is rotated 8 steps—exactly halfway through the cycle. This creates the classic backbeat (snare on beats 2 and 4).

The Interlocking Principle

The secret to great layering is interlocking—patterns that fit together like puzzle pieces, filling rhythmic space without colliding.

This principle comes from African drumming, where 3-6 drummers play simultaneously, each with their own pattern. No single pattern is “the rhythm”—the rhythm emerges from how they combine.

Non-interlocking (clash):

stack(
sound("bd").euclid(4, 8),
sound("sd").euclid(4, 8)
)

Both patterns hit at the same time. This creates rhythmic “mud”—no space, no groove.

Interlocking (complementary):

stack(
sound("bd").euclid(3, 8),
sound("sd").euclidRot(2, 8, 1),
sound("hh").euclidRot(5, 8, 2)
)

Each pattern occupies different rhythmic space. Notice how the hi-hat fills the gaps left by kick and snare.

Polyrhythm vs. Polymeter: What’s the Difference?

These terms get confused constantly. Here’s the distinction:

Polyrhythm: Multiple patterns with different pulse rates over the same time period.

  • Example: 3 against 2 (triplets vs. eighth notes in the same bar)
  • Both patterns finish at the same time
  • Creates rhythmic tension within a steady meter

Polymeter: Multiple patterns with the same pulse but different cycle lengths.

  • Example: (3,8) layered with (5,12)
  • Patterns have different loop points
  • Creates long-form phasing and evolution

Cross-rhythm: A pattern that contradicts the prevailing meter.

  • Example: Playing in 3/4 feel over a 4/4 bass
  • One pattern implies a different downbeat than the other

Most euclidean layering is polymeter: Same pulse (sixteenth notes), different cycle lengths. A (3,8) pattern loops every 8 steps. A (7,12) pattern loops every 12 steps. Their combined cycle is lcm(8,12) = 24 steps before the full pattern repeats.

This creates long-form interest—the rhythms keep revealing new combinations as they phase through multiple cycles.

Three-Layer Build: Bass, Snare, Hats

Let’s build a complete rhythm step by step:

Layer 1: Kick foundation (3,8)

sound("bd").euclid(3, 8)

Sparse, grounded. The tresillo pattern.

Layer 2: Add snare (2,8 rotated)

stack(
sound("bd").euclid(3, 8),
sound("sd").euclidRot(2, 8, 4)
)

The snare hits on beats 2 and 4—classic backbeat. But rotation of 4 ensures it never hits with the kick.

Layer 3: Add hats (7,8 rotated)

stack(
sound("bd").euclid(3, 8),
sound("sd").euclidRot(2, 8, 4),
sound("hh").euclidRot(7, 8, 1)
)

Dense hi-hats (7 out of 8 steps) create constant motion. The rotation ensures the one silent step doesn’t land on the downbeat, maintaining forward momentum.

Complementary Densities: The Secret Formula

Certain density combinations naturally interlock. Here are proven formulas:

Sparse + Dense:

  • Kick: (3,8) or (4,16) — foundation
  • Hats: (7,8) or (13,16) — constant motion

Half + Half:

  • Kick: (4,8) — four-on-the-floor
  • Snare: (2,8) + rotation — backbeat

Prime Number Magic:

  • Bell: (7,12) — timeline reference
  • Kick: (4,16) — won’t align for 48 steps
  • Creates long-form evolution

What to Listen For: Identifying Good Interlocking

When patterns interlock well, you’ll hear:

  1. Negative space: Silence is as important as sound. Patterns leave “breathing room”
  2. Call and response: One pattern answers another rhythmically
  3. Different timbres never clash: When kick and snare hit together, it’s intentional (accent), not accidental
  4. Long-form evolution: The combined pattern reveals new combinations over 2-4 cycles
  5. Danceable: Your body knows where the downbeat is, but the syncopation makes you move

When patterns clash badly, you’ll hear:

  • Rhythmic “mud” (too many simultaneous hits)
  • Loss of groove (can’t find the pocket)
  • Static feel (pattern doesn’t evolve)
  • Confusion about where beat 1 is

Pro tip: Temporarily mute layers while building. Add them back one at a time to hear exactly how each contributes to the whole.

Using Rotation to Prevent Clashes

Here’s a practical technique for layering:

  1. Start with the same (pulses, steps) for multiple parts
  2. Layer them—listen for clashes
  3. Rotate one pattern by small increments (1-2 steps) until the clash resolves
  4. Result: Maximally interlocking patterns with related densities

Example:

stack(
sound("bd").euclid(4, 16),      // rotation 0
sound("sd").euclidRot(4, 16, 4), // rotation 4 - offset 1 beat
sound("rim").euclidRot(4, 16, 8) // rotation 8 - offset 2 beats
)

Three identical patterns (4,16), but rotations of 0, 4, and 8 create a three-part interlocking groove.


Euclidean Patterns with Melody

Euclidean rhythms aren’t just for drums. Apply them to melodic material and you open up fascinating compositional possibilities.

Basic Melodic Application

Any melodic pattern can be filtered through a euclidean rhythm:

Simple chord progression (no euclidean):

note("c3 e3 g3 b3").piano()

Same chords, euclidean rhythm (3,8):

note("c3 e3 g3 b3").piano().euclid(3, 8)

The euclidean function selects which notes play. Instead of hearing all 4 notes evenly, you hear 3 of them distributed across 8 steps.

Pattern Independence: Rhythm ≠ Pitch

Here’s where it gets interesting: The pitch pattern and rhythm pattern can cycle independently.

note("c3 e3 g3").piano().euclid(5, 8)
  • Pitch pattern: 3 notes (C, E, G)
  • Rhythm pattern: 5 hits in 8 steps

The patterns cycle at different rates, creating evolving melodic phrases. On each repetition, different notes align with the downbeat.

Practical uses:

  • Bass lines: (4 notes, 5 hits) creates a walking bass that never feels predictable
  • Arpeggios: (7 notes, 5 hits) makes chord tones dance around the beat
  • Generative melodies: Long pitch patterns + shorter euclidean rhythms = endless variation

Euclidean Bass Lines

Bass lines benefit enormously from euclidean rhythms—they create groove without being overly busy:

Four-note bass line, five hits (5,16):

note("c2 e2 g2 b2").s("sawtooth").lpf(800).euclid(5, 16)

The (5,16) rhythm creates a syncopated feel. Combined with a 4-note pattern, the bass line evolves over 4 cycles.

Add a kick for context:

stack(
note("c2 e2 g2 b2").s("sawtooth").lpf(800).euclid(5, 16),
sound("bd").euclid(4, 16)
)

Notice how the bass and kick interlock—sometimes hitting together (accent), sometimes separate (syncopation).

Rhythmic Arpeggios

Use dense euclidean patterns on melodic material for arpeggio-like textures:

7 hits across 8 steps:

note("c4 d4 e4 g4 a4").piano().euclidRot(7, 8, 1)

This creates a nearly-continuous arpeggio with one strategic rest, generating rhythmic interest without silence.

Melodic Layering

Layer multiple melodic euclidean patterns for counterpoint:

stack(
note("c4 e4 g4").piano().euclid(3, 8),
note("c5 b4 a4 g4").piano().euclid(5, 8).gain(0.6)
)

Two independent melodic patterns with different densities create evolving harmonic relationships.


Genre Explorations: Euclidean Rhythms in the Wild

Now that you understand the theory, let’s see how euclidean patterns create the signature grooves of different musical styles.

Traditional & World Rhythms

These genres showcase how euclidean patterns evolved naturally in musical cultures around the world.

Afrobeat (110-125 BPM)

Pioneered by Fela Kuti in 1970s Nigeria, Afrobeat fuses West African rhythms with jazz, funk, and highlife. The genre is defined by 4-6 interlocking percussion parts that phase against each other, creating hypnotic polyrhythmic textures.

stack(
sound("metal").euclidRot(7, 12, 3),  // Bell: timeline reference
sound("bd").euclidRot(4, 16, 0),     // Kick: responds to bell
sound("sd").euclidRot(3, 8, 4),      // Snare: backbeat variation
sound("hh").euclidRot(9, 16, 1),     // Hats: dense, rolling
sound("rim").euclidRot(5, 16, 2)     // Clave: adds complexity
).cpm(27.5)

Afrobeat Characteristics:

Core principle: The bell pattern (7,12) acts as a timeline—all other parts orient themselves to it. Instruments enter and exit, but the bell never stops.

What to listen for:

  • Bell dominance: Highest, most penetrating sound, continuous
  • Interlocking, not doubling: Kick and snare RESPOND to the bell, rarely hit simultaneously
  • Dense hi-hats: (9,16) or (11,16) creates rolling, liquid feel
  • Polymeter phasing: Patterns cycle at different lengths, revealing new combinations every 2-4 bars

Key parameters:

  • Bell: Always (7,12), usually rotated 2-3 steps
  • Kick: Sparse (3,16) or (4,16), never on every beat
  • Snare: Often (3,8) rotated to avoid standard backbeat
  • Hats: Dense (9,16) or (11,16) for constant motion

Classic tracks to study:

Common mistake: Playing kick on every quarter note. Afrobeat kicks are sparse and syncopated—they dance around the beat, not pound it.

Reggae One Drop (70-80 BPM)

Reggae’s signature “one drop” pattern emphasizes beat 3, creating the laid-back, skanking groove that defines the genre. Developed in 1960s-70s Jamaica, it revolutionized how drums could support a groove.

stack(
sound("bd").euclidRot(1, 4, 2),      // Kick: ONLY on beat 3
sound("sd").euclidRot(1, 4, 2),      // Snare: also beat 3 (doubled with kick!)
sound("hh").euclid(8, 8),            // Hats: straight 8ths
sound("rim").euclidRot(3, 16, 4)     // Rim: skank pattern
).cpm(18.75)

Reggae One Drop Characteristics:

Core principle: The kick and snare hit TOGETHER on beat 3 only. This is radical—most groove-based music separates kick and snare. The “drop” creates space for the bassline to breathe.

What to listen for:

  • The drop: Massive kick+snare hit on beat 3, silence on beat 1
  • Rim clicks: Light skank rhythm filling the gaps (often (3,8) or (3,16))
  • Hi-hat timing: Straight eighths or upbeat emphasis (off the beat)
  • Bass dominance: With sparse drums, the bassline drives the rhythm

Key parameters:

  • Kick: (1,4) rotated 2 steps to land on beat 3
  • Snare: (1,4) rotated 2 steps (doubles the kick!)
  • Hats: (8,8) for straight feel or (4,8) for half-time
  • Rim: (3,16) for cross-stick skank

Reggae variations:

  • Rockers: (4,4) kick, more driving (Sly & Robbie style)
  • Steppers: (4,8) kick on all four beats, militant feel

Classic tracks:

Bossa Nova (130-150 BPM)

Born in late 1950s Brazil, bossa nova (“new trend”) blends samba rhythms with jazz harmony. The clave-based pattern creates the gentle, swaying feel that made it a global phenomenon.

stack(
sound("bd").euclid(3, 8),            // Kick: tresillo/3-3-2 pattern
sound("rim").euclidRot(5, 16, 2),    // Rim: bossa clave variation
sound("hh").euclidRot(7, 16, 1),     // Hats: subtle syncopation
sound("sd").euclidRot(2, 8, 3)       // Snare: light touches
).cpm(35)

Bossa Nova Characteristics:

Core principle: The kick plays the tresillo (3,8) pattern—the 3-3-2 subdivision that creates the characteristic lilt. Percussion stays light and subtle to leave space for voice/guitar.

What to listen for:

  • 3-3-2 feel: The tresillo pattern in the bass drum creates rhythmic lilt
  • Lightness: Bossa is whispered, not shouted—dynamics stay controlled
  • Syncopated rim: Often plays a (5,16) variation of son clave
  • Jazz harmony over samba rhythm: Complex chords with Brazilian groove

Key parameters:

  • Kick: (3,8) is essential—this IS the bossa feel
  • Rim: (5,16) rotated, playing cross-stick
  • Hats: (7,16) or (6,16) for subtle complexity
  • Snare: (2,8) rotated, very light

Historical context: João Gilberto reduced samba’s complexity to this minimal pattern in the late 1950s. Combined with Antonio Carlos Jobim’s sophisticated harmonies, it created a new genre.

Classic tracks:

Blues Shuffle (80-95 BPM)

The shuffle rhythm—with its distinctive “long-short” swing feel—is the rhythmic foundation of blues, early rock and roll, and much of American popular music.

stack(
sound("bd").euclid(4, 16),           // Kick: steady quarter notes
sound("sd").euclidRot(2, 8, 4),      // Snare: backbeat on 2 & 4
sound("hh").euclid(6, 12),           // Hats: triplet feel (creates shuffle)
sound("rim").euclidRot(3, 16, 2)     // Rim: ghost notes
).cpm(22)

Blues Shuffle Characteristics:

Core principle: The hi-hat uses (6,12) instead of (8,16)—this creates a triplet subdivision. Playing pairs of triplets gives the “shuffle” feel: long-SHORT long-SHORT.

What to listen for:

  • Triplet subdivision: The (X,12) patterns create a 3-feel against the 4-beat bar
  • Loping rhythm: The uneven eighth notes create a “rolling” quality
  • Backbeat: Snare solidly on beats 2 and 4
  • Relaxed tempo: Usually 80-100 BPM, allowing the shuffle to breathe

Key parameters:

  • Kick: (4,16) or (4,8) for solid quarter notes
  • Snare: (2,8) rotated 4 steps for backbeat
  • Hats: (6,12) is the KEY—this creates shuffle feel
  • Rim: (3,16) for ghost note texture

Musical function: The shuffle provides rhythmic momentum while maintaining a laid-back feel. It’s the bridge between straight eighth notes (mechanical) and full swing (jazz).

Classic shuffle tracks:

Variations:

  • Slow shuffle: 70-80 BPM (John Lee Hooker)
  • Medium shuffle: 85-95 BPM (Chicago blues)
  • Fast shuffle: 100+ BPM (boogie-woogie)

Classic House (122-128 BPM)

House music was born in early 1980s Chicago, taking its name from The Warehouse club. Built on four-on-the-floor kicks from disco, but with drum machine precision, house created the template for modern dance music.

stack(
sound("bd").bank("RolandTR909").euclid(4, 4),        // Kick: four-on-the-floor
sound("sd").bank("RolandTR909").euclidRot(2, 8, 4),  // Snare: backbeat
sound("hh").bank("RolandTR909").euclid(8, 8),        // Hats: closed, driving
sound("oh").bank("RolandTR909").euclidRot(2, 8, 2),  // Open: syncopation
sound("cp").bank("RolandTR909").euclidRot(1, 4, 2)   // Clap: accent
).cpm(31)

Classic House Characteristics:

Core principle: Four-on-the-floor kick (4,4) provides unwavering pulse. Everything else adds syncopation and energy around this steady foundation.

What to listen for:

  • Relentless kick: Quarter notes on every beat, driving the dance floor
  • Backbeat: Snare/clap on beats 2 and 4, like disco
  • Hi-hat patterns: Closed hats on 8ths (driving) or 16ths (urgent)
  • Open hat syncopation: Offbeat open hats create lift and space
  • TR-909 sound: Crisp, punchy, electronic—defines the genre

Key parameters:

  • Kick: Always (4,4)—this is non-negotiable for house
  • Snare: (2,8) rotated 4 steps
  • Closed hats: (8,8) or (16,16) for intensity
  • Open hats: (2,8) rotated to upbeats for syncopation
  • Claps: (1,4) or (2,8) for emphasis

Historical context: Frankie Knuckles and Ron Hardy pioneered this rhythm in Chicago clubs, using TR-909 drum machines to extend disco breaks into full tracks. The TR-909’s specific sonic character became inseparable from the genre.

Classic house tracks:

Euclidean variations: While the kick stays (4,4), experiment with:

  • Hats: (13,16) instead of (16,16) for subtle syncopation
  • Claps: (3,16) for less predictable accents
  • Ride: (7,8) for driving energy

Electronic & Urban Styles

Modern electronic and urban genres use euclidean patterns for both their mathematical precision and ability to create evolving grooves.

Jazz Swing Feel (120-140 BPM)

Jazz swing uses uneven subdivisions and polymeter to create the characteristic “swing” feel that distinguishes it from straight eighth notes.

stack(
sound("bd").euclid(2, 8),            // Kick: minimal, on 1 & 3
sound("hh").euclidRot(5, 12, 1),     // Hats: triplet feel creates swing
sound("rim").euclidRot(3, 8, 2),     // Ride: cross-stick pattern
sound("sd").euclidRot(2, 8, 4)       // Snare: light backbeat
).cpm(32.5)

The (5,12) hi-hat pattern creates a triplet subdivision against the (2,8) kick, generating the polymeter that gives jazz its characteristic swing feel.

Drum & Bass (170-180 BPM)

Emerging from UK rave culture in the early 1990s, drum & bass features breakneck tempos with syncopated snare placements that create rhythmic tension.

stack(
sound("bd").euclidRot(3, 16, 0),     // Kick: sparse at fast tempo
sound("sd").euclidRot(2, 16, 6),     // Snare: offbeat (key to D&B feel)
sound("hh").euclid(11, 16),          // Hats: dense, rolling
sound("rim").euclidRot(5, 16, 3)     // Rim: adds texture
).cpm(43.5)

The offbeat snare rotation (typically 6 or 10 steps) creates the signature “Amen break” feel even with euclidean patterns.

Techno (130-145 BPM)

Hard, driving techno emphasizes relentless energy through dense, mechanical patterns.

stack(
sound("bd").bank("RolandTR909").euclid(4, 4),        // Kick: four-on-the-floor
sound("sd").bank("RolandTR909").euclidRot(2, 16, 8), // Snare: sparse accents
sound("hh").bank("RolandTR909").euclid(16, 16),      // Hats: continuous drive
sound("oh").bank("RolandTR909").euclidRot(4, 16, 2), // Open: syncopation
sound("rim").bank("RolandTR909").euclidRot(5, 16, 1) // Rim: rhythmic interest
).cpm(34.5)

Techno often uses (16,16) closed hats for constant energy, with euclidean accents on percussion to prevent monotony.

Funk Breakbeat (95-110 BPM)

Funk emphasizes syncopation and “ghost notes”—subtle hits between main beats that create groove depth.

stack(
sound("bd").euclidRot(5, 16, 0),     // Kick: syncopated, NOT on every beat
sound("sd").euclidRot(4, 16, 4),     // Snare: dense, ghosted
sound("hh").euclid(13, 16),          // Hats: very dense
sound("rim").euclidRot(7, 16, 2)     // Rim: ghost note texture
).cpm(26.25)

The dense patterns (13,16) and (7,16) create the busy, syncopated feel that makes funk “funky.” The kick’s (5,16) pattern avoids straight quarter notes.

Trap (130-150 BPM half-time)

Trap uses sparse kicks with dense, rolling hi-hats. The tempo is fast, but the groove feels half-time due to snare placement.

stack(
sound("bd").bank("RolandTR808").euclidRot(2, 16, 0), // Kick: minimal, strategic
sound("sd").bank("RolandTR808").euclidRot(2, 8, 4),  // Snare: half-time backbeat
sound("hh").bank("RolandTR808").euclid(14, 16),      // Hats: dense, rolling
sound("oh").bank("RolandTR808").euclidRot(3, 16, 4)  // Open: accents
).cpm(17.5)

The sparse kick (2,16) combined with dense hats (14,16) and half-time snare creates trap’s characteristic sparse-yet-busy feel.

Hip Hop (85-95 BPM)

Hip hop drums provide a pocket for the rapper, emphasizing groove and space over density.

stack(
sound("bd").bank("RolandTR808").euclidRot(3, 16, 0), // Kick: boom-bap foundation
sound("sd").bank("RolandTR808").euclidRot(2, 8, 4),  // Snare: backbeat (the "bap")
sound("hh").bank("RolandTR808").euclid(6, 8),        // Hats: sparse, laid-back
sound("oh").bank("RolandTR808").euclidRot(2, 16, 6), // Open: syncopation
sound("cp").bank("RolandTR808").euclidRot(2, 16, 4)  // Clap: doubles snare
).cpm(22.5)

The (3,16) kick and (2,8) snare create the “boom-bap” pocket. Hi-hats stay sparse (6,8) to leave space for vocals.

Dembow / Reggaeton (90-120 BPM)

The dembow rhythm is the backbone of reggaeton, Latin trap, and perreo music. Named after Shabba Ranks’ “Dem Bow” track from Jamaican dancehall, it became the defining beat of Puerto Rican reggaeton in the 1990s.

stack(
sound("sd(2,8)"),                       // Snare: beats 2 & 4
sound("[bd bd]").euclidRot(4, 8, 1),    // Kick: syncopated dembow pattern
sound("cp").euclidRot(2, 16, 5).gain(0.4) // Clap: extra syncopation
).bank("RolandTR707").cpm(29)

Dembow Characteristics:

Core principle: The kick pattern creates a syncopated “boom-boom… boom-boom” feel using [bd bd].euclidRot(4,8,1). The double kick ([bd bd]) combined with euclidean rotation creates the characteristic dembow lilt that makes the rhythm instantly recognizable.

What to listen for:

  • Syncopated kick: The rotated euclidean pattern avoids straight quarter notes
  • Steady snare: Snare on beats 2 and 4 provides rhythmic anchor
  • Sparse arrangement: Dembow is minimal—kick, snare, clap. The simplicity leaves room for vocals and melodic hooks
  • Head-nodding groove: The uneven kick spacing creates irresistible bounce

Key parameters:

  • Kick: [bd bd].euclidRot(4, 8, 1) — the double kick with rotation is essential
  • Snare: (2,8) — straightforward backbeat
  • Clap: (2,16) rotated for extra syncopation

Historical context: The dembow originated in Jamaican dancehall with Shabba Ranks’ 1990 track “Dem Bow.” Puerto Rican DJs adopted and transformed it into reggaeton’s signature rhythm. Today it dominates global pop through artists like Bad Bunny, Daddy Yankee, and J Balvin.

Classic dembow tracks:

Variations:

  • Traditional dembow: ~95 BPM, bouncy feel
  • Perreo: Slower (~85 BPM), heavier bass
  • Latin trap: Faster (~130 BPM half-time), darker sound

Drum Machine Classics (Concise Examples)

These examples showcase specific drum machines without extensive analysis. Experiment with the parameters to explore each machine’s character.

80s Pop (118 BPM) — LinnDrum

stack(
sound("bd").bank("LinnDrum").euclid(4, 8),
sound("sd").bank("LinnDrum").euclidRot(2, 8, 4),
sound("hh").bank("LinnDrum").euclid(8, 8),
sound("cp").bank("LinnDrum").euclidRot(2, 16, 8)
).cpm(29.5)

Clean, punchy drums that defined 80s pop.

Electro (125 BPM) — TR-808

stack(
sound("bd").bank("RolandTR808").euclid(4, 16),
sound("sd").bank("RolandTR808").euclidRot(4, 16, 4),
sound("hh").bank("RolandTR808").euclid(12, 16),
sound("cp").bank("RolandTR808").euclidRot(2, 8, 4),
sound("cb").bank("RolandTR808").euclidRot(3, 16, 2)
).cpm(31.25)

Mechanical, robotic 808 patterns for electro and Miami bass.

New Wave (120 BPM) — TR-707

stack(
sound("bd").bank("RolandTR707").euclid(4, 8),
sound("sd").bank("RolandTR707").euclidRot(2, 8, 4),
sound("hh").bank("RolandTR707").euclid(8, 8),
sound("rim").bank("RolandTR707").euclidRot(3, 16, 2),
sound("cb").bank("RolandTR707").euclidRot(2, 16, 6)
).cpm(30)

Digital crispness for 80s new wave and synth-pop.

Lo-Fi (72 BPM) — TR-606

stack(
sound("bd").bank("RolandTR606").euclidRot(3, 8, 0),
sound("sd").bank("RolandTR606").euclidRot(2, 8, 4),
sound("hh").bank("RolandTR606").euclid(5, 8),
sound("oh").bank("RolandTR606").euclidRot(2, 8, 3)
).cpm(18)

Gritty, lo-fi character perfect for bedroom beats.

Modern Pop (100 BPM) — Mixed Machines

stack(
sound("bd").bank("RolandTR808").euclid(3, 8),
sound("sd").bank("RolandTR909").euclidRot(2, 8, 4),
sound("hh").bank("RolandTR909").euclid(8, 8),
sound("cp").bank("LinnDrum").euclidRot(2, 16, 8),
sound("rim").bank("RolandTR707").euclidRot(3, 16, 2)
).cpm(25)

Modern production often layers sounds from multiple drum machines for hybrid character.


Creative Production Techniques

Beyond basic layering, euclidean rhythms enable advanced production techniques that create evolving, hypnotic grooves.

Phasing and Evolution (Steve Reich Approach)

Use identical patterns with slight rotation differences to create gradual phase shifting:

stack(
sound("cp").euclidRot(5, 16, 0),
sound("cp").euclidRot(5, 16, 1).gain(0.7)
)

As the patterns cycle, they drift in and out of phase, creating constantly evolving rhythmic relationships. This is the principle behind Steve Reich’s “Clapping Music.”

Rotation Builds (Spinning Tension)

Gradually rotate a pattern over time to build tension:

sound("bd").euclidRot(3, 8, "0 1 2 3".slow(4))

The rotation parameter itself becomes patterned, causing the euclidean pattern to “spin” through different phase relationships.

Density Modulation (Rising Intensity)

Increase the number of hits over time for crescendo effects:

sound("hh").euclid("<3 5 7 11>", 16)

The hi-hats get progressively denser, building energy. Reverse the sequence (<11 7 5 3>) for decrescendo.

Ghost Patterns (Subliminal Groove)

Layer a very quiet euclidean pattern for subliminal rhythmic complexity:

stack(
sound("bd").euclid(4, 16),
sound("sd").euclidRot(2, 8, 4),
sound("hh").euclidRot(7, 12, 2).gain(0.2)  // Ghost layer
)

The quiet (7,12) hi-hat adds polymeter complexity you feel more than hear—it enriches the groove without cluttering.

Cross-Rhythm Accents

Use rotation to create accents that contradict the prevailing pulse:

stack(
sound("bd").euclid(4, 16),               // Steady pulse
sound("cp").euclidRot(3, 16, 1).gain(1.2) // Accent pattern (shifted)
)

The (3,16) clap pattern, rotated by 1, creates accents that syncopate against the steady kick, adding rhythmic tension.


Common Mistakes & Solutions

Even with mathematical perfection, certain euclidean combinations sound bad. Here’s how to avoid common pitfalls.

Mistake 1: Same Cycle Length for All Parts

Problem: Using (4,8), (2,8), (6,8) for kick, snare, hats.

stack(
sound("bd").euclid(4, 8),
sound("sd").euclid(2, 8),
sound("hh").euclid(6, 8)
)

Everything loops at 8 steps—no long-form evolution. This gets predictable and boring.

Solution: Mix cycle lengths—use (4,16), (2,8), (7,12) to create polymetric interest that evolves over multiple bars.

stack(
sound("bd").euclid(4, 16),
sound("sd").euclidRot(2, 8, 4),
sound("hh").euclid(7, 12)
)

Now the combined pattern takes lcm(16,8,12) = 48 steps to repeat fully.

Mistake 2: Too Many Hits (Rhythmic Noise)

Problem: Using (7,8), (6,8), (7,8) creates rhythmic “mud”—too dense, no breathing room.

stack(
sound("bd").euclid(7, 8),
sound("sd").euclid(6, 8),
sound("hh").euclid(7, 8)
)

Can’t hear individual parts—just noise.

Solution: Balance density—sparse kick (3,8), moderate snare (2,8), dense hats (7,8).

stack(
sound("bd").euclid(3, 8),
sound("sd").euclidRot(2, 8, 4),
sound("hh").euclid(7, 8)
)

Now each layer occupies distinct rhythmic space.

Mistake 3: Ignoring Rotation (Predictable Downbeats)

Problem: All patterns start on step 0—everything hits the downbeat together.

stack(
sound("bd").euclid(3, 8),
sound("sd").euclid(2, 8),
sound("hh").euclid(5, 8)
)

Too “on the beat”—lacks funk and syncopation.

Solution: Rotate at least one pattern to create syncopation.

stack(
sound("bd").euclid(3, 8),
sound("sd").euclidRot(2, 8, 4),   // Rotated for backbeat
sound("hh").euclidRot(5, 8, 1)    // Rotated for groove
)

Now the snare creates backbeat and hats add off-beat energy.

Mistake 4: Overcrowded Arrangements

Problem: Layering 6+ euclidean parts simultaneously.

Solution: Use euclidean patterns to mute/unmute parts. Not every element needs to play all the time.

stack(
sound("bd").euclid(3, 8),
sound("sd").euclidRot(2, 8, 4).struct("t t f t"),  // Drops out occasionally
sound("hh").euclid(7, 8),
sound("rim").euclidRot(5, 16, 2).struct("f t t t") // Enters on bar 2
)

Use .struct() to create arrangement patterns—parts enter and exit, creating dynamic interest.


Quick Reference

Euclidean Function Syntax

FunctionParametersExampleDescription
euclid()pulses, steps.euclid(3, 8)Distributes pulses evenly across steps
euclidRot()pulses, steps, rotation.euclidRot(5, 8, 2)Same as euclid with rotation offset
euclidLegato()pulses, steps.euclidLegato(3, 8)Holds each pulse until the next (no gaps)
Mini-notation(pulses, steps, offset)sound("bd(3,8)")Compact notation for euclid patterns

Classic Euclidean Patterns Library

NamePatternOriginCharacter
Tresillo(3,8)Cuba/West AfricaLatin foundation, 3-3-2 subdivision
Son Clave(5,8)CubaSacred Latin pattern, balanced
Rumba Clave(5,8) rot 1CubaFunkier clave variant
West African Bell(7,12)West AfricaTimeline pattern, maximally asymmetric
Cinquillo(5,8)CubaSon clave variant
Bossa Nova(3,8) kick + (5,16) rimBrazilGentle sway, jazz harmony
Aksak(4,9)Turkey/Balkans2-2-2-3 dance rhythm
Venda Clapping(5,12)South AfricaChildren’s song pattern

Layering Strategies Cheatsheet

Sparse + Dense:

  • Kick: (3,8) or (4,16)
  • Hats: (7,8) or (13,16)

Half + Half:

  • Kick: (4,8)
  • Snare: (2,8) + rotation 4

Prime Number Magic (maximum evolution):

  • Bell: (7,12)
  • Kick: (4,16)
  • Combined cycle: lcm(12,16) = 48 steps

GCD Rule: If GCD(pulses1, pulses2) = 1, patterns won’t sync until lcm(steps1, steps2). Use coprime numbers for maximum variation.

Common Density Ratios

RatioFeelExamplesUse
0.25Sparse, breathing(2,8), (3,12), (4,16)Kick patterns, minimal grooves
0.375Balanced, classic(3,8), (6,16), (5,16)Tresillo, clave, foundational
0.5Half-time, syncopated(4,8), (8,16)Driving grooves, house kicks
0.583Maximally asymmetric(7,12)Bell patterns, timelines
0.75Dense, intense(6,8), (12,16)Hi-hats, constant motion
0.875Very dense, almost full(7,8), (14,16)Driving energy, buildups

What You Learned

Core Concepts

  • Euclidean rhythms distribute beats with maximal evenness—the most balanced spacing possible
  • The Bjorklund algorithm rediscovers patterns that evolved naturally in music cultures worldwide
  • Rotation changes phase relationship to the downbeat, creating different grooves from identical spacing
  • Interlocking patterns fill rhythmic space without clashing—the African drumming principle

Mathematical Foundations

  • Density ratio (pulses/steps) determines rhythmic character
  • GCD relationships predict when patterns sync—coprime numbers create maximum variation
  • Polymeter occurs when patterns have same pulse but different cycle lengths
  • LCM (least common multiple) determines when combined patterns fully repeat

Musical Applications

  • Classic patterns like tresillo (3,8), clave (5,8), and bell (7,12) are euclidean
  • Cultural context explains why these patterns appear globally—human ear prefers balanced rhythms
  • Pattern independence allows pitch and rhythm to cycle at different rates
  • Genre identity emerges from specific euclidean parameter choices and drum machine timbres

Production Techniques

  • Complementary densities create interlocking grooves (sparse kick + dense hats)
  • Rotation prevents clashes when layering similar patterns
  • Phasing creates evolving textures (Steve Reich approach)
  • Dynamic parameters allow euclidean values to change over time

Common Pitfalls to Avoid

  • Same cycle length for all parts → boring/predictable
  • Too many hits → rhythmic noise/mud
  • Ignoring rotation → square/on-the-beat feel
  • Overcrowding → use arrangement patterns (.struct()) to create space

Where to Go Next

Explore More Strudel Features

  • Mini-Notation — Learn compact pattern syntax including euclidean notation
  • Tonal Harmony — Apply euclidean rhythms to chord progressions
  • Auditory Space — Pan euclidean patterns across the stereo field
  • Effects — Process euclidean rhythms with reverb, delay, distortion

Dive Deeper into Theory

  • Godfried Toussaint’s Paper — “The Euclidean Algorithm Generates Traditional Musical Rhythms” (academic source)
  • Eric Bjorklund’s Paper — Original neutron pulse distribution paper that describes the algorithm
  • Book: “The Geometry of Musical Rhythm” by Godfried Toussaint — Comprehensive exploration of mathematical rhythm theory

Listen and Learn

Study these artists who masterfully use the rhythms covered in this guide:

African/Afrobeat:

Latin:

Electronic:

Minimalism:

Keep Creating

The best way to master euclidean rhythms is to experiment constantly:

  1. Pick a genre you love and recreate its euclidean feel
  2. Layer 3-4 patterns and adjust rotation until they groove
  3. Try “wrong” combinations—sometimes mistakes sound amazing
  4. Combine euclidean drums with melodic patterns for full compositions
  5. Share your creations with the Strudel community

Remember: These patterns evolved over centuries because they feel right. Trust your ears more than the math. If it grooves, it works.