Rhythms you generate rather than recall: Euclidean distribution, phase offsets, the Mondo mini-notation with its cycle-level alternation, and scale-coherent random walks.
1. Euclidean rhythms
A Euclidean rhythm distributes n triggers as evenly as possible across k steps. Godfried Toussaint's observation was that a surprising number of traditional timelines turn out to be exactly this — the even distribution is not an abstraction but something musicians arrive at independently.
Pass an array of #( onsets steps ) and send euclidean:
#( 3 8 ) euclidean to: #conga.
"3 triggers across 8 steps → 1 0 0 1 0 0 1 0, the tresillo"
#( 6 16 ) euclidean to: #bell.
"6 across 16 → exactly the bembé pattern"
| Position | Meaning |
|---|---|
| 1st | Number of triggers to distribute |
| 2nd | Total number of steps |
1.1 Which named rhythms are Euclidean
Coypu's implementation uses a Bresenham line-drawing approach rather than Bjorklund's algorithm. The two agree on some patterns and produce rotations of each other on others, so it is worth knowing which of Coypu's own named rhythms you can reproduce exactly:
| Expression | Produces | Same as |
|---|---|---|
| #( 3 8 ) euclidean | 10010010 | exactly tresillo |
| #( 6 16 ) euclidean | 1001001010010010 | exactly bembe |
| #( 4 16 ) euclidean | 1000100010001000 | exactly downbeats |
| #( 5 16 ) euclidean | 1000100100100100 | a rotation of bossa, not bossa itself |
#( 5 16 ) euclidean is sometimes described as the cinquillo. It is not —
cinquillo is a five-stroke pattern in eight steps, and Coypu already has
it under the name banda, whose own source comment notes the Cuban name. Nor
is #( 5 16 ) euclidean the bossa clave; use 16 bossa for that.
2. Offset and phase
offset: rotates a pattern, wrapping it round its own length. The triggers stay
the same; where they land changes.
"stagger two copies of one Euclidean pattern"
#( 5 16 ) euclidean offset: 1; to: #cowbell.
#( 5 16 ) euclidean offset: 3; to: #bongo.
offsetRight and offsetLeft are the one-step shorthands — the same
as offset: 1 and offset: -1.
offset: mutates in place
It changes the Sequencer's own gates rather than answering a new Sequencer, which is why the
examples above cascade it with ; before to:.
3. Transforming a Sequencer
Several messages reshape an existing pattern rather than building a new one:
| Message | Effect |
|---|---|
| offset: | Rotate the gates, wrapping round |
| offsetRight / offsetLeft | Rotate by one step |
| flip | Swap triggers and rests — the photographic negative of the rhythm |
| reverse | Play the pattern backwards, notes and durations with it |
| palindrome | Append the reverse to the original, doubling the length |
| transpose: | Shift every note by a number of semitones |
| times: / * | Repeat the whole Sequencer |
| progression: | Repeat it once per interval, transposed each time |
"a hat part that is the negative of the kick"
#kick flip to: #ch.
"a four-chord progression from one bass figure"
(16 tumbao notes: #( 36 43 )) progression: #( 0 5 7 3 ); to: #bass.
flip on a symbol works on what is playing
#kick flip reads the Sequencer currently at #kick in the
Performance, inverts it, and puts it back. It is a live-performance move rather than a
construction one.
4. Mondo mini-notation
Mondo is Coypu's string mini-notation, in the TidalCycles tradition: a whole pattern written as one string, where position within the string determines timing. Unlike the step-based notations elsewhere in Coypu, a Mondo pattern is cycle-based — the string always fills exactly one cycle, however many events you put in it.
'c4 e4 g4 c5' asMondoNotes to: #piano.
"four notes, evenly spaced across one cycle"
| Token | Meaning |
|---|---|
c4 f#3 bb2 | A note by name. c4 is MIDI 60 |
60 | A note by MIDI number |
~ or - | A rest |
[a b] | A group — subdivides its slot between the contents |
<a b> | Alternation — a different one each cycle |
x*N | Repeat N times within the slot |
x/N | Play only every Nth cycle |
4.1 Grouping and subdivision
Square brackets subdivide. Whatever is inside shares the time that one slot would have taken, which is how you get triplets and unequal divisions without changing the grid:
'c4 e4 [g4 b4] c5' asMondoNotes to: #piano.
"four slots; the third holds two notes at double speed"
'bd [sd sd] bd sd' asMondoSounds to: #drums.
*N multiplies a slot, giving the same result more compactly:
'c4 e4*3 g4' asMondoNotes to: #piano.
"the middle slot fires three times"
4.2 Alternation across cycles
Angle brackets pick one of their contents per cycle, advancing each time round. This is where Mondo earns its place: a pattern that varies over time without any scheduling code.
'c4 <e4 g4> c5' asMondoNotes to: #piano.
"cycle 1 plays e4 in the middle, cycle 2 plays g4, then it repeats"
'bd <sd cp hh>' asMondoSounds to: #drums.
"a three-cycle rotation on the second beat"
Coypu precomputes every cycle the alternations can produce and cycles through them, so the pattern is deterministic and repeats with a period equal to the least common multiple of the alternation lengths.
4.3 Playing every Nth cycle
A slash makes an event conditional on the cycle number — x/4 fires only on
cycles divisible by 4. It is the cleanest way to write a fill or an accent that arrives
once a phrase:
'bd sd bd sd/4' asMondoSounds to: #drums.
"the last snare lands only every fourth cycle"
4.4 Sounds and indices
Three entry points, depending on what the tokens mean:
| Message | Tokens are |
|---|---|
| asMondoNotes | Pitches — note names or MIDI numbers |
| asMondoSounds | Sound names, optionally name:index |
| asMondoIndex | Sample indices within one folder |
'bd:3 ~ sd:1 [hh hh:2]' asMondoSounds to: #drums.
With PerformerSuperDirt, the part after the colon becomes SuperDirt's
n — the sample index inside the folder. With other Performers it is ignored
and the default note is used instead.
SequencerPlayerCyclic rather than
the default linear player: it queries the pattern for the events falling in each slice of
the cycle, instead of advancing one step at a time. That is what makes subdivision and
alternation possible, and it means Mondo patterns and step patterns can run side by side
in the same Performance.
5. SuperDirt note strings
The older string notations, predating Mondo and still the most direct route to SuperDirt. Tokens are separated by commas and map one-to-one onto steps.
'-/8 , 38 , 56*2 , -/4 , 41 , 66' asDirtNotes to: #acid.
| Token | Meaning |
|---|---|
38 | MIDI note 38, one step |
c4 | A note name — asDirtNotes accepts both |
- or ~ | A rest, one step |
-/8 | A rest lasting 8 steps |
56*2 | Note 56, twice |
, | Token separator |
asDirtIndex is the same notation but selects sample indices rather than
pitches, and can be combined with notes: to layer a pitch on top:
('1 , -/16 , 7 , -/9 , 12' asDirtIndex
notes: '38 45 78 62 81') to: #speakspell.
asDirtNotes when you are thinking in steps and want explicit durations. Use
Mondo when you are thinking in cycles and want subdivision or per-cycle variation. They
coexist, and nothing stops you using both in one Performance.
6. Randomness and walks
Two kinds of randomness: in the rhythm, and in the pitch.
"random gates — a new pattern on every evaluation"
16 randomTrigs to: #ch.
"sparser: roughly 30% of steps"
(16 randomTrigsWithProbability: 30) to: #ch.
For pitch, a random walk moves by one scale degree at a time rather than jumping freely, which keeps a melody coherent instead of scattered:
(16 randomWalksOn: Scale sakura octaves: 2 root: 60)
| Argument | Meaning |
|---|---|
| receiver | How many notes to generate |
| randomWalksOn: | The scale to walk within, as an array of intervals |
| octaves: | How many octaves the walk may span |
| root: | The MIDI note the scale starts from |
The walk starts in the middle of the range and steps up or down on each note. Shorter forms
exist — randomWalksOn: alone, and randomWalksOn:octaves: — and the
whole family, along with the available scales, is covered in
Melody & Scales.
16 randomTrigs produces one pattern when you evaluate the line, and that pattern
then loops unchanged. To keep it moving, re-evaluate the line — which, in a live set, is
exactly the gesture you want.
8. Troubleshooting
#( 5 16 ) euclidean does not sound like the bossa clave
It is not meant to — Coypu's Bresenham variant gives a rotation. Use 16 bossa — §1.1.
A Mondo string raises an error about unbalanced brackets
Every [ needs a ] and every < a >;
Coypu checks this explicitly and reports the offending string. Count them — nesting is easy
to get wrong in a long pattern.
My Mondo alternation never changes
Alternations advance per cycle, not per step. If the transport has not completed a cycle you will not hear it move — §4.2.
A Mondo pattern plays faster than my step patterns
Mondo fits its contents into one cycle, so more tokens means faster events, whereas a step pattern's length sets its own duration. That is the fundamental difference between the two — §4.
offset: seemed to affect a pattern I had already routed
It mutates the Sequencer in place rather than answering a copy — §2.
My random pattern is not changing
It is fixed at evaluation time and then loops. Re-evaluate the line — §6.