home/ modules/ tidal-boolean-structure-and-step-sequencing

Tidal: boolean structure and step sequencing

  • learner can impose boolean rhythmic structure with struct/mask and binary generators
  • learner can build rhythms from Euclidean complements, necklaces and step strings
  • learner can gate and switch patterns with boolean templates
  • learner can set non-isochronous accents with @N event durations

Live-code a rhythm section whose kick/snare/hat are each driven by boolean structures — one Euclidean, one binary-string, one necklace — switched live with mask, and set non-isochronous accents with @N.

This module turns rhythm from something you type hit-by-hit into something you generate and reshape from data — the move that separates a preset drum loop from a live-coded set. In a techno or footwork context on a standard Tidal + SuperDirt rig, the payoff is concrete: while the kick keeps the floor moving, you can swap the entire hat grammar with one edit, because the rhythm lives in a boolean template that is separate from the sounds it gates.

Start supported: take a dense hat pattern and carve space into it, leaning on “mask gates a pattern with a boolean mask” versus “struct imposes a boolean rhythmic structure” to feel the difference between silencing an existing groove and re-gridding it. Then build each voice’s template from a different generator — the function form of Euclidean placement (“euclid k n”), a binary-string groove where a single integer names a whole bar (“ascii, binary, and binaryN”), and inter-onset intervals for asymmetric, Balkan-flavoured cycles (“necklace”). Along the way, use the drum-machine-style “step” string as a legible on-ramp, produce interlocking counter-voices with the Euclidean complement (euclidInv/euclidFull), and push accents off the isochronous grid with “@N sets an event’s duration”.

Every required atom is load-bearing for the capstone: without struct, mask, the three generators, complements, step strings and @N, one of the three voices — or the live switching itself — cannot be delivered. The supporting atoms enrich rather than gate: the general Euclidean live-coding idiom and its Strudel, Sonic Pi and SuperCollider cousins show the same ideas across rigs, and run opens the door to sweeping through binary grooves by incrementing a number.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

euclidean-rhythm

s("bd(3,8)")

strudel-0004 · CC0

d1 $ sound "bd(3,8)"

tidal-0004 · CC0

Atoms in this module

Required — these gate the capstone

TidalCycles struct imposes a boolean rhythmic structure on any pattern, enabling Euclidean and binary rhythm shapes
Procedure L3 Craft F
TidalCycles mask gates a pattern with a boolean mask, letting events through only where the mask is true
Procedure L3 Craft F
TidalCycles ascii, binary, and binaryN turn strings or integers into boolean rhythm patterns via their binary representation
Procedure L3 Craft F
TidalCycles euclidInv and euclidFull produce the rhythmic complement or dual-voice Euclidean pattern
Procedure L3 Craft FA
TidalCycles necklace generates boolean rhythmic patterns from a list of inter-onset intervals rather than onset/total-steps parameters
Procedure L3 Craft FA
TidalCycles step builds a pattern from a step-sequencer string, mapping x to a hit and digits to sample indices
Procedure L2 First instrument F
TidalCycles `@N` sets an event's duration to N steps, enabling non-isochronous rhythms
Concept L3 Craft FA
TidalCycles euclid k n places k onsets Euclideanly across n steps, the function form of the (k,n) mini-notation
Procedure L2 First instrument FA

Supporting — enrichment, not gating

The run function generates sequential integer patterns for automatically stepping through sample indices or pitch values
Procedure L2 First instrument F
Euclidean rhythm notation is a first-class idiom in TidalCycles/Strudel, compressing a groove to two integers
Concept L2 First instrument FA
Pbjorklund2(k,n) emits Euclidean duration patterns that can be modulated by nesting other pattern classes
Procedure L3 Craft FN
spread() generates a Euclidean boolean ring for rhythmic hit placement in Sonic Pi
Procedure L2 First instrument FA
struct imposes a new rhythmic grid on a pattern while mask only silences it where the mask is 0
Concept L3 Craft F