Euclidean Rhythm Generator

This tool is a Euclidean Rhythm generator. It is based on the work of computer scientist Godfried Toussaint. In 2005, he published a paper called “The Euclidean Algorithm Generates Traditional Musical Rhythms.” There, 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 which did not fit because they were too long.

Toussaint placed beats in a circle of time as evenly as possible from each other. This is similar to the Bresenham algorithm, which tries to find a straight line between two points, the most efficient way of joining. Of course, given constraints it is impossible to create a system of perfection, so the multiple notes in multiple circles are mostly non-coincident, they don’t sound at the same time. What does happen is they meet on common divisors of the space, and that is where the rhythm comes from.

What is astonishing is that it generates the rhythms that we humans find so compelling.​​​​​​​​​​​​​​​​ When Toussaint cataloged the results, to his surprise they were the beats that form the basis of music. We have another tool that explores rhythm further. The tool above is good for beats and polyrhythms; I go more into the philosophy and structure in this our Toussaint Rhythm Explorer page. For further reading Toussaints original paper can be read here, and you can experiment with 25 Euclidian tracks at once with our Polyrhythm Generator tool.

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

How to Use the Euclidean Rhythm Generator

Quick Start

  • Click the Start Rhythm 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 6 concentric circles, representing 6 different instrument tracks.

Each track can be set to a different instrument; deep kick, snare. hi-hat, clap, woodblock, tom drum, clave, need more cowbell, rim shot, bell, triangle, shaker and finally silence.

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.
    • Low is robotic and hits a perfect beat.
    • High is looser and jazzy

Three rhythm tools, three Jobs

This page, the Euclidean Rhythm Generator, is for building beats. You can set two to six rings of beats to turn at a time, and adjust the steps and hits on each. There are preset buttons that load common world rhythm patterns. This is a good page to start with.

The Toussaint Rhythm Explorer is for understanding how beats sound. Three tracks, but with rotation, probability, aksak groupings, melodic mode, and options to set for evenness, syncopation, and density. Rotate a pattern to hear different rhythm types.

The Polyrhythm Generator is for density and complexity of sound. There are twenty-five tracks contained in five sound banks. They run in different cycle lengths that drift and reconverge. The full cycle can run into thousands of steps. Some settings sound like random beats, others sound like full musical compositions. The interesting thing is how the start of songs emerges from the random.

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 our second tool exploring Euclidean timing, 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.