The Patchbay_

Euclidean Rhythm Generator

Spread k onsets as evenly as possible over n steps — the Euclidean rhythms behind countless drum patterns and live-coding beats. Set the hits, the steps and a rotation, and copy the pattern straight into TidalCycles or Strudel.

E(3,8) is the Cuban tresillo; E(5,8) the cinquillo; E(2,5), E(4,9) and E(5,16) turn up in music worldwide. See the TidalCycles and Strudel cheat sheets for the (k,n) syntax.

How it works

A Euclidean rhythm spreads k onsets as evenly as possible across n steps, using the same process as Euclid's algorithm for the greatest common divisor. It is written E(k, n).

E(k, n) = k onsets distributed as evenly as possible over n steps

The remarkable result, described by Godfried Toussaint, is that a surprising number of traditional rhythms from around the world fall out of this one procedure.

Worked example

Rotating a Euclidean pattern — starting it at a different step — produces most of the remaining familiar variants.

In practice

Related

TidalCycles cheat sheetPolyrhythm calculatorStrudel