home/ modules/ tidal-pattern-transformations-and-combinators

Tidal: pattern transformations and combinators

  • learner can transform patterns with every/chunk/iter/rot/off and periodic conditionals
  • learner can reason about patterns as functions of time that compose freely
  • learner can build canons and evolving structures by composing transformations

Take a single mini-notation seed and, using only composable transformations (every, chunk, iter, off, rot, jux, slow/fast), evolve it live into a 32-cycle arrangement that builds to a canon and resolves — with no new source material added.

This module is about the move that defines TidalCycles performance: taking one bar of material and making it carry a whole passage of a set. In an algorave slot you rarely have time to type fresh phrases; what reads as development — a techno loop mutating, a melodic figure blooming into interlocking voices — is almost always a small seed wrapped in more and more transformation layers. That is the whole task here: evolve, live, a single mini-notation seed into a 32-cycle arc that builds to a canon and resolves, adding nothing new.

The scaffolding starts with the mental model. Seeing a Tidal pattern as a function from time to events — and a line as source string plus a stack of function wrappers — explains why everything here composes freely and why redefining code mid-set applies cleanly from the current cycle. From there the learner drills each device against a fixed seed in isolation: periodic variation with “every applies a transformation every nth cycle”, the roving spotlight of chunk, rotation-in-time with iter, value rotation with rot against a fixed rhythmic skeleton, and stereo splitting with jux. A supported mid-point exercise combines two devices under one gate using function composition, then stages an 8-cycle build using whenmod-style cycle predicates — a rehearsal of the capstone’s form at quarter scale. The final unsupported run adds the canon move: overlaying offset, transformed copies with off, then resolving by peeling the wrappers back off.

Every required atom is load-bearing for that performance: each names either a transform the capstone explicitly permits, the conditional machinery that stages the 32 cycles, or the pattern-as-function reasoning that lets them nest safely. The supporting set widens the palette — palindrome, spread, bite, time-shift operators, pattern algebra — and situates the practice in the design philosophy of composable pattern languages, enriching but never gating the task.

Runnable examples

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

every-n-transform

s("bd sd hh cp").every(4, rev)

strudel-0028 · CC0

d1 $ iter 4 $ sound "bd sn hh cp"

tidal-0045 · CC0

stereo-panning

d1 $ pan (slow 2 sine) # sound "hh*8"

tidal-0037 · CC0

SinOsc s => Pan2 p => dac; -0.7 => p.pan;

chuck-0042 · MIT

Atoms in this module

Required — these gate the capstone

A Tidal pattern is a function from a time arc to a list of events, not a stored sequence
Concept L2 First instrument FNA
Tidal's higher-order pattern transformations compose freely because they operate on functions, not on stored event lists
Concept L3 Craft F
Tidal pattern combinators transform time — not just events — enabling rotation, reversal, and every-nth-cycle transformations
Concept L3 Craft F
Live-coding pattern languages are composable: any two transformations combine into a new one without extending the language
Principle L3 Craft F
Two pattern-transforming functions can be composed into one and applied together in TidalCycles
Concept L3 Craft F
every applies a transformation to a pattern on every nth cycle, leaving other cycles unchanged
Procedure L2 First instrument F
every turns a static pattern into an evolving one by transforming it on every Nth cycle
Concept L2 First instrument F
chunk applies a transformation to a different Nth of the cycle each cycle, rotating the window
Concept L2 First instrument F
TidalCycles chunk divides a pattern into n sections and applies a transform to each in turn, one per cycle
Procedure L3 Craft F
iter n rotates a pattern's starting point forward by one subdivision each cycle
Concept L2 First instrument F
TidalCycles' 'iter' rotates a pattern by a fraction each cycle, and the rotation amount is itself patternable
Procedure L3 Craft FA
TidalCycles rot rotates the values of a pattern leftward while preserving the original rhythmic structure
Procedure L3 Craft F
TidalCycles `off` overlays a time-offset, transformed copy of a pattern to build canons
Concept L3 Craft FA
slow and fast scale a Tidal pattern's time by a factor, changing its speed without altering its structure
Procedure L2 First instrument F
Tidal slow, fast, and hurry change pattern duration relative to the cycle
Concept L1 Foundations F
jux applies a transformation to only one stereo channel, splitting a mono pattern into a hard stereo image
Concept L2 First instrument F
A TidalCycles pattern is built in two layers: a mini-notation sequence as source material, then transformations applied to it
Concept L2 First instrument F
TidalCycles when and whenmod apply transforms based on a predicate or modular arithmetic test on the cycle number
Procedure L3 Craft F

Supporting — enrichment, not gating

The ~> and <~ operators shift a Tidal pattern forward or backward in time by a fraction of a cycle
Procedure L3 Craft F
fastcat and cat concatenate patterns in series, differing only in whether they compress to one cycle
Procedure L3 Craft F
stack layers a list of patterns to play simultaneously so one transformation can shape them all
Procedure L3 Craft F
TidalCycles `while` applies a function only when a binary pattern is true, gating transformations per cycle
Concept L2 First instrument F
const replaces the entire playing pattern with another one
Procedure L3 Craft F
TidalCycles loopFirst repeats only the first cycle of a pattern, freezing later cycles' content
Procedure L3 Craft F
TidalCycles timeLoop t loops a pattern's cycle sequence every t cycles, like a modulo on cycle number
Procedure L3 Craft F
Tidal represents time as rational numbers so musical subdivisions are stored exactly as fractions without floating-point error
Concept L3 Craft F
TidalCycles trunc cuts a pattern short while linger repeats the kept fraction to fill the cycle
Concept L3 Craft F
TidalCycles palindrome alternates a pattern between forward and backward playback every other cycle
Procedure L3 Craft F
TidalCycles spread applies a function with each of a list of parameter values in turn, cycling one value per cycle
Procedure L3 Craft F
TidalCycles ribbon cuts a fixed window from a pattern's timeline and loops that window
Procedure L3 Craft F
TidalCycles bite slices a pattern cycle into equal-sized pieces and addresses them by index, enabling arbitrary reordering of pattern sections
Procedure L3 Craft F
Tidal's pipe arithmetic operators (|+, |-, |*, |/) modify control values relative to an existing pattern value
Procedure L3 Craft F
Tidal's |>, <|, |<, >|, |+| operators combine two patterns by separately controlling which side provides structure vs. values
Concept L3 Craft F
Naming a pattern-transformation function adds it to a system's compositional vocabulary and shapes what music is possible
Principle L3 Craft FN
The apparently simple 'reversal' operation has multiple non-equivalent implementations depending on assumptions about rests, events, and scale
Concept L3 Craft F
High-level abstractions reduce cognitive load in live coding but may constrain musical affordances; some practitioners prefer lower-level control
Principle L3 Craft FN
Live coders work at least one level of abstraction above individual sound events, manipulating compositional structure rather than note-by-note detail
Principle L3 Craft FM