Euclidean Rhythms, Explained

After reading this you will know how two numbers, a count of pulses and a count of steps, produce the tresillo, the cinquillo and dozens of other traditional rhythms, and how to read and rotate the patterns the generator draws.

What a Euclidean rhythm is

A Euclidean rhythm places k pulses as evenly as possible into n steps, where the steps are equal slices of time. Write it E(k, n). When n divides k exactly the answer is boring: E(4, 8) is one hit every other step, [x . x . x . x .]. The interesting cases are the ones where k does not divide n, because then the pulses cannot be spaced by a single fixed gap and the algorithm has to compromise.

The most famous example is the Cuban tresillo, E(3, 8). Three pulses into eight steps gives [x . . x . . x .]: gaps of 3, 3 and 2 steps. You have heard this pattern in son, in reggaeton, and in the bassline of countless pop songs. It is not arbitrary. It is the unique most-even way to put 3 hits into 8 slots.

When to reach for it, and when not

Euclidean patterns are useful when you want a rhythm that feels driving and asymmetric without composing it by hand. Feed a drum machine E(5, 16) on the hi-hat and E(3, 8) on the kick and you get interlocking parts that stay locked to the same bar. Generative and algorithmic music leans on them heavily for exactly this reason: two integers describe a whole part.

They are the wrong tool when the rhythm you want is deliberately uneven in a way evenness cannot reach. A swung shuffle, a rubato phrase, or a pattern with a specific syncopation that is not the most-even one will not come out of E(k, n). The generator gives you the maximally even pattern and its rotations, nothing else. If you need [x . . x . x . .] and that is not a rotation of the Euclidean necklace, you will have to edit by hand.

Toussaint's 2005 survey found that a large fraction of traditional rhythms from West Africa, Latin America and the Balkans are exactly Euclidean or rotations of Euclidean patterns. The construction was not designed for music: Bjorklund derived it to space pulses evenly in a neutron accelerator timing system.

The idea behind the algorithm

The goal is to make every gap between consecutive pulses as close to equal as possible. With k pulses in n steps the average gap is n/k. For E(3, 8) that average is 8/3 \approx 2.667. You cannot use a gap of 2.667 steps, so the pattern uses some gaps of 2 and some of 3, mixed as evenly as the counts allow.

g_i \in \{\lfloor n/k \rfloor, \lceil n/k \rceil\}

Here g_i is the gap before pulse i, \lfloor n/k \rfloor is the average gap rounded down, and \lceil n/k \rceil is the average rounded up. Every gap in a Euclidean rhythm is one of these two values. For E(3, 8) the gaps come from \{2, 3\}, and the counts work out to two threes and one two, summing to 3 + 3 + 2 = 8.

Bjorklund's method builds the pattern by treating it like Euclid's algorithm for the greatest common divisor. Start with k groups of [x] and n - k groups of [.]. Repeatedly pair off the surplus onto the front groups, the same interleaving step Euclid uses when he subtracts the smaller number from the larger. The remainders shrink until nothing is left to distribute, and the concatenated groups are the rhythm. This is why the algorithm and the ancient GCD procedure share a name.

Building E(3, 8) by hand

These are the exact defaults behind the demo button. Reproduce them with one click, then follow the steps.

  1. Start with 3 pulses and 8 - 3 = 5 rests: [x] [x] [x] [.] [.] [.] [.] [.].
  2. Attach one rest to each pulse group, using 3 of the 5 rests: [x .] [x .] [x .] with [.] [.] left over.
  3. Attach the 2 leftover rest-groups to the first 2 pulse-groups: [x . .] [x . .] with [x .] left over.
  4. Only one group remains to distribute, so stop. Concatenate: [x . .] [x . .] [x .].
  5. Read off the 8 steps: [x . . x . . x .]. Gaps are 3, 3, 2.

That is the tresillo. The same procedure with the cinquillo preset, E(5, 8), gives [x . x x . x x .], gaps of 2, 1, 2, 1, 2, which sum to 8 and use only the values 1 and 2 as the formula predicts.

Reading the necklace and the strip

The generator draws each pattern two ways. The linear strip reads left to right in [x . . x . . x .] notation, one character per step. The necklace wraps those steps into a circle so that step 0 sits next to step n-1. The circle makes an important fact visible: a rhythm has no true beginning. Rotating the necklace, which the rotation slider does, changes only where you start counting.

This is why several named rhythms are the same necklace at different rotations. The chart below shows the gap sequence of E(3, 8) at three rotations. The set of gaps \{3, 3, 2\} never changes; only the starting point moves.

Every rotation of E(3,8) uses the same three gaps (two 3s and one 2); rotation only reorders them.

With 8 steps and 3 pulses the pattern is [x . . x . . x .]. Raising pulses to 5 gives [x . x x . x x .]; lowering to 2 gives [x . . . x . . .]. Rotation shifts the same set of hits to a later starting step without changing the gaps.

A table of common patterns

These are the presets on the tool plus a few neighbors. The gap column lists the steps between successive pulses, reading from step 0.

Euclidean rhythms and their gap sequences at rotation 0
PatternSteps nPulses kStringGapsTraditional name
E(2,5)52x . x . .2, 3khafif-e-ramal
E(3,8)83x . . x . . x .3, 3, 2tresillo
E(5,8)85x . x x . x x .2, 1, 2, 1, 2cinquillo
E(4,9)94x . x . x . x . .2, 2, 2, 3Turkish aksak
E(7,16)167x . . x . x . x . . x . x . x .3, 2, 2, 3, 2, 2, 2Brazilian samba

Check any row against the formula. For E(7, 16) the average gap is 16/7 \approx 2.29, so gaps are 2 and 3. Count them: five 2s and two 3s give 5 \times 2 + 2 \times 3 = 16, and there are 7 gaps for 7 pulses. Everything checks.

Common mistakes

The first mistake is asking for more pulses than steps. E(9, 8) is undefined: you cannot fit 9 distinct hits into 8 slots. The slider caps k at n, and E(n, n) is every step filled, which is a metronome, not a rhythm.

The second is confusing rotation with a different rhythm. If you compare [x . . x . . x .] and [. . x . . x . x] they look distinct, but the second is the first rotated by 5 steps. Same necklace. When two patterns share a gap multiset, check for rotation before assuming they differ.

Tempo interacts with step count in a way that surprises people. E(3, 8) at 120 BPM with 8 steps per beat is far faster than E(3, 8) at 120 BPM with 8 steps per bar. The pattern is identical; the perceived speed depends entirely on how much time you assign to one step. Set the tempo to what your ear wants, not to a number that looks right.

Related tools

Euclidean rhythms handle the time axis. For the pitch axis, name a chord from notes with the Chord Identifier, find every key that contains a set of notes with the Scale Finder, and assemble and audition harmony with the Chord Progression Builder. A common workflow is to lock a groove here, then build the chords to sit on top of it in those tools.

Frequently asked questions

Why is E(3,8) called the tresillo?

Tres means three in Spanish, and the pattern has three pulses. It is the rhythmic backbone of Cuban son and, by extension, much of Latin and modern pop music. The gaps 3, 3, 2 give it its characteristic lopsided pull.

Is every traditional rhythm Euclidean?

No. Toussaint showed that many well-known patterns are Euclidean or rotations of Euclidean necklaces, but plenty of rhythms are not maximally even. Euclidean construction is a generator of a specific family, not a theory of all rhythm.

What does the rotation slider actually change?

It shifts which step the cycle starts on. The set of gaps between pulses stays the same; only the starting point moves. Two rhythms that are rotations of each other share the same necklace.

Can k be 0 or equal to n?

Both are edge cases. E(0, n) is silence, all rests. E(n, n) is a hit on every step, a steady metronome. Neither is a rhythm in the interesting sense, but the generator will draw them.

Why does the algorithm look like finding a greatest common divisor?

Because it is the same repeated-subtraction structure. Bjorklund distributes the surplus rests onto the pulse groups exactly the way Euclid's algorithm reduces a pair of integers. The remainders shrink each round until distribution stops, and the leftover grouping is the pattern.