GenerateRandomSearch

Euclidean Rhythm Generator

Ask for three hits in eight steps, spread as evenly as possible, and you get the tresillo — a rhythm found across Cuban, West African and Latin American music. Ask for five in sixteen and you get the bossa nova pattern. The algorithm that produces them was written by Bjorklund for timing marks in particle accelerators, and its accidental reproduction of traditional rhythms is one of the more startling coincidences in music theory.

What this generator does

Runs Bjorklund's algorithm for the steps and hits you choose, showing the pattern, the gaps between hits, and the traditional name where the combination has one. Rotation moves the starting point without changing the rhythm's shape.

How to use this tool

  1. Choose how many steps the cycle has and how many hits to fit.
  2. Read the pattern, and the gaps between hits.
  3. Rotate it to move where the cycle starts.
  4. Copy the pattern as x and dot notation for a sequencer.

Understanding the controls

Steps in the cycle
Between 2 and 32 subdivisions. Sixteen is a bar of sixteenth notes; twelve suits compound time.
How many hits
Between one and the step count. The algorithm spreads them as evenly as the arithmetic allows, which is what makes the result musical.
Rotation
Where the cycle starts. The gaps stay the same, so the rhythm is the same shape heard from a different point — which is how one pattern gives several grooves.

Common use cases

  • Building drum patterns that feel natural rather than mechanical
  • Recognising traditional rhythms as maximally even distributions
  • Programming a step sequencer or a drum machine
  • Teaching why some rhythms recur across unrelated cultures
  • Exploring what a given step and hit count sounds like

How this generator works

Bjorklund's algorithm repeatedly folds the remainder into the pattern until nothing is left over, which distributes the hits as evenly as possible. The check measures the gaps between consecutive hits and requires at most two distinct lengths differing by one — that is precisely what maximal evenness means, and it is verified rather than assumed.

Randomness and fairness

Nothing here is random. The same steps, hits and rotation always give the same pattern, which is why there is no seed — the algorithm is deterministic by nature.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Rhythms are patterns of hits and rests only, with no accents, velocities or note lengths.
  • There is no audio playback; the pattern is shown as a grid and as text.
  • The traditional names cover the well-known combinations; many others have names this does not know.
  • Rotation is applied after generation, so it does not change which combinations count as traditional.
  • Patterns are not stored between visits.

Privacy and your data

The pattern is computed in your browser from the numbers you choose. Nothing is transmitted or stored.