Euclidean Rhythms
Rhythm from a number of steps and hits: the hits spread over the steps as evenly as possible. Four tracks, polyrhythm, probability and swing; download as MIDI and WAV.
Euclidean rhythms
TEMPO
120 BPMSWING
0 %LOOP
The tracks divide the same bar by their own step counts: polyrhythms such as 3 against 4.
FAMOUS PATTERNS
The downloaded file is what you hear: seeded probability, swing and tempo included (4 bars; the WAV starts with a half-second lead-in).
Track 1 · E(4,16)
Track 2 · E(5,16)
Track 3 · E(7,12)
Track 4 · E(3,8)
How do steps and hits make a rhythm?
A Euclidean rhythm spreads k hits as evenly as possible over a cycle of n steps: E(3,8) puts three hits on eight steps and gives the Cuban tresillo. This tool layers four tracks; each has steps, hits, rotation and probability, plus tempo and swing. Tracks can share one bar (polyrhythm) or loop independently on their own step counts, and you can download the result as MIDI or WAV.
How do you build Euclidean rhythms?
- Press Play: the first hit arrives half a second later on the downbeat; each ring is a track and the filled dots are hits.
- On a track, Steps sets the cycle length and Hits the number of hits; the hits spread evenly on their own.
- Rotate turns the pattern: the same Euclidean rhythm starts on another step and the accent moves.
- Below 100% probability each hit plays with that chance; the dice are seeded, so the same setting always gives the same rhythm.
- In a shared bar the tracks divide the bar by their own step counts (3 against 4); in Independent a step is a sixteenth and the tracks drift into alignment.
- Pick a famous pattern or build your own; Download MIDI gives the drum notes, Download WAV the sound you hear.
What is it used for?
Build the skeleton of world rhythms
E(3,8) gives the Cuban tresillo; pick one of the famous patterns and change the number of steps and hits to hear how a pattern is built.
Take a drum pattern into your software
Download the rhythm you built as MIDI and use it as drum notes in your music software; Download WAV gives you the sound you hear.
Get polyrhythm into your ear
Tracks can divide a shared bar by their own number of steps (for example 3 against 4); switch tracks on and off one at a time to practise independent rhythms in the two hands.
Even distribution in a maths lesson
The Euclidean algorithm spreads k hits over n steps as evenly as possible; show a class how the same rule produces very different rhythms with rotation and the number of steps.
How to read the results
- Each ring is a track, Track 1-4 from the outside in. Filled dots are hits and small empty dots are silent steps; the top of the ring is the first step of the cycle. A hit there plays at full strength, the others a little softer.
- E(5,8) in a track's heading means five hits on eight steps. While it plays, the short arc moving round a ring is that track's place in its cycle; in SHARED BAR the thin hand from the centre shows where you are in the bar.
- If SHORTEST GAP at the bottom is 50 ms or more, every hit plays. If the line turns the warning colour and ends in HITS DROPPED, two hits come 25-50 ms apart and the second doesn't play: lower the tempo or the step count.
- The time on the CYCLE line is how long the pattern takes to repeat: one bar in SHARED BAR, and in INDEPENDENT as many sixteenths as the common multiple of the tracks' step counts (at most 512). The tracks realign at the end of it.
- Below 100% Probability the ring still draws the whole pattern, so a filled dot may skip a round. The ring shows the pattern, not the dice; the same setting always plays the same hits.
Famous Euclidean rhythms
| Rhythm | Pattern | Known as |
|---|---|---|
| E(3,8) | x··x··x· | Tresillo (Cuba) |
| E(5,8) | x·x·xx·x | Cinquillo (Cuba) |
| E(7,12) | x·x·x·xx·x·x | Bembé bell pattern (West Africa) |
| E(5,16) | x···x··x··x··x·· | Bossa nova (Brazil) |
| E(4,9) | x··x·x·x· | Aksak (Turkey) |
| E(2,5) | x··x· | Khafif-e-ramal (Persia) |
How does the Euclidean algorithm build a rhythm?
Euclid's greatest common divisor algorithm divides two numbers again and again. Eric Bjorklund used the same steps to spread pulses as evenly as possible in a timing system; in 2005 Godfried Toussaint showed that these distributions match many traditional rhythms of the world.
The tool computes the distribution with a short rule: step i of n is a hit when (i × k) mod n is less than k. The result is a rotation of Bjorklund's sequence; Rotate brings it to any starting step you like.
Polyrhythm and independent loops
In a shared bar, a 4-step and a 3-step track divide the same bar into four and three: you hear a 3 against 4 polyrhythm, and the tracks meet at every downbeat.
In an independent loop every step is a sixteenth; tracks of 16, 12 and 7 steps cycle at their own lengths and realign only at the common multiple of their step counts. The cycle length is shown under the rings.
Frequently asked questions
- Why are some hits dropped?
- The tool plays at most 20 hits per second: at least 50 ms between two hits. Hits closer than 25 ms count as one stroke and play together; a following hit 25-50 ms later is dropped. The line under the rings shows the shortest gap and the number of dropped hits; it clears when you lower the tempo or the step count.
- Is the downloaded file the same as what I hear?
- Yes. The WAV file is the same sound engine's file render; probability rolls the dice with the same seed, so the same hits play, swing and tempo included. The MIDI file holds General MIDI drum notes on channel 10 (düm bass drum, tek snare, ka hand clap, tahta wood block, zil closed hi-hat); assign them to any drum sound you like.
- Which steps does swing delay?
- Swing plays the odd steps (the second, fourth…) late by the chosen fraction of half a step. In a shared bar it applies only to tracks with an even step count; in an independent loop to every track. 0% is a straight rhythm.
Listen and try
· v1.15 · changelog