Euclidean Rhythm Generator

Algorithmic Rhythm Generator

This tool is a Euclidean Rhythm generator. It is based on the work of mathematician Godfried Toussaint. In 2005 he published a paper called “The Euclidean Algorithm Generates Traditional Musical Rhythms.” He looked at the greatest common divisor of two numbers and used them to generate rhythmic beats and silences, and he generated almost all traditional rhythms, except for Indian talas.

I’m not a mathematician but reading the description, it seems like he wanted to distribute beats as evenly as possible and make them equidistant over time. I think it follows the same idea as the Bresenham algorithm which tries to find the straight line between two points. Again, I’m not a mathematician so that is probably an approximation of the complexity. What is astonishing is that it generates the rhythms that we humans find so compelling.​​​​​​​​​​​​​​​​ I have several other tools on this site, a tool to explore beat and a beat synthesizer and metronome.

Tracks: 2
Tempo (BPM) 120
Swing 0%
Classic Euclidean Rhythms

How to Use the Euclidean Rhythm Generator

Quick Start

  • Click the Start Quad Engine button to hear the rhythm.
  • Click the Preset Buttons (like Rock Beat or Bossa Nova) to instantly load classic musical patterns from around the world.

Understanding the Circle The visualizer consists of 4 concentric circles, representing 4 different instrument tracks.

  • Inner Circle (Blue): Track 1
  • Middle Circles (Pink & Yellow): Tracks 2 & 3
  • Outer Circle (Green): Track 4

Creating Your Own Rhythms Each track operates on two simple sliders that control the Euclidean algorithm:

  • Steps (The Time): This is the length of the loop. If you set it to 16, the circle is divided into 16 slices.
  • Hits (The Beats): This is how many times the instrument strikes.
    • The Magic: The tool automatically spaces your Hits as evenly as possible across your Steps.
    • Try This: Set Steps to 8 and Hits to 3. You will hear the “Tresillo” rhythm, the heartbeat of Reggaeton and Dancehall music.

Global Controls

  • Master Speed (BPM): Controls how fast the rhythm plays.
  • Swing: Adds a variation to the beat.
    • 0% is robotic and perfect.
    • High % sounds looser and jazzy

Instrument Selection You can change the sound of any track using the dropdown menu. Choose from Deep KickSnareHi-HatClaveWoodblock, and more.

I have another tool that goes deeper into explanations and experiments. The tool above is good for beats and polyrhythms; the tool below is good for playing with rhythm. I go more into the philosophy and structure in this post. For further reading Toussaints original paper can be read here.

Toussaint Explorer

A laboratory for Euclidean rhythms — after Godfried Toussaint
Next convergence
Track 1 (Inner)
Track 2 (Middle)
Track 3 (Outer)
100 BPM
0%
Track 1 — Inner
Steps 8
Hits 3
Rotation 0
Probability 100%
Grouping
x . . x . . x .
Track 2 — Middle
Steps 8
Hits 5
Rotation 0
Probability 100%
Grouping
x . x . x x . x
Track 3 — Outer
Steps 16
Hits 9
Rotation 0
Probability 100%
Grouping
x . x x . x . x x . x x . x . x
Pattern Analysis
Evenness
Syncopation
Density
Complexity
World Rhythm Presets
About Euclidean Rhythms: In 2005, Godfried Toussaint discovered that the Euclidean algorithm — used since antiquity to find greatest common divisors — generates rhythms found in traditional music worldwide. "The Euclidean algorithm generates almost all the most important world music rhythms." This tool explores his research interactively.

Frequently Asked Questions

What is a Euclidean rhythm generator?

A Euclidean rhythm generator creates beat patterns by distributing a set number of hits as evenly as possible across a set number of steps. The math comes from Godfried Toussaint’s 2005 discovery that the Euclidean algorithm, used since antiquity to find greatest common divisors, naturally generates the rhythmic patterns found in traditional music from Cuba, West Africa, the Middle East, and the Balkans. The result is that mathematically “even” beat distributions turn out to be the same patterns humans have found compelling for thousands of years.

What is the difference between Steps and Hits?

Steps define the total length of the rhythmic loop, if you set Steps to 16, the circle is divided into 16 equal time slices. Hits define how many of those slices contain a beat. The Euclidean algorithm then spaces those hits as evenly as possible across the available steps. Set Steps to 8 and Hits to 3, and you get the Tresillo, the foundational rhythm of Reggaeton and Dancehall.

What is swing in a rhythm generator?

Swing shifts the timing of beats slightly off the mathematical grid, creating a looser, more human feel. At 0%, the rhythm is perfectly even and mechanical. As you increase the swing percentage, the beats develop a push-pull quality, the “lilt” you hear in jazz, funk, and certain Afrobeat styles. Small amounts of swing make a rhythm feel played rather than mechanical.

What are Euclidean rhythms used for in music?

Euclidean rhythms appear in virtually every musical tradition worldwide. The Tresillo E(3,8) underlies Cuban and Caribbean music. The Cinquillo E(5,8) appears throughout Afro-Cuban styles. The Bossa Nova pattern is E(5,16). Soukous from Congo uses E(5,12). The mathematical evenness of these patterns is what makes them feel simultaneously complex and natural to the human ear.

What is the Toussaint Explorer?

The Toussaint Explorer is the second tool on this page, a laboratory version of the Euclidean rhythm generator designed for deeper experimentation. It adds rotation, probability, grouping controls, and pattern analysis metrics, including evenness, syncopation, density, and complexity. It also includes world rhythm presets mapped to their exact Euclidean formulas, so you can study how traditional rhythms translate into the algorithm.