Euclidean Rhythms

Spread k beats as evenly as possible over n steps and you often get a rhythm that people already play. Pick k and n, press play, and compare with the list below.

The sound is a short click made by the browser's audio engine; with sound off the wheel still turns. The filled dot at the top is step 0.

Named rhythms

Each row builds the pattern with the algorithm on this page and checks that it is the same circle of gaps as the traditional pattern, allowing any rotation. Press a row's button to load it.

Name (where played)PatternE(k,n)Match

Not everything is Euclidean

The son clave of Cuban music, x..x..x...x.x..., has five beats in sixteen steps, but its gaps are 3, 3, 4, 2, 4. The most even five-in-sixteen has gaps 3, 3, 3, 3, 4. The page checks this too: The bossa nova pattern is the even one.

How it is built

The method is Bjorklund's (2003), written for scheduling pulses in a neutron accelerator, and Godfried Toussaint noticed in 2005 that it matches Euclid's greatest-common-divisor procedure and many traditional rhythms. Start with k groups "x" and n−k groups ".". While more than one leftover group remains, pair each leftover group with one of the main groups, and repeat with the new groups until the leftovers number one or none. Reading the groups off gives the pattern. Different tellings start the circle at different places, which is why the table allows rotation.

What was checked

Not checked: the sound (I cannot hear it), the origins named in the table (from memory of Toussaint's 2005 paper, not looked up), and whether every named rhythm is played exactly as written.