home/ atoms/ tidal-pattern-transformations

Tidal's higher-order pattern transformations compose freely because they operate on functions, not on stored event lists

Tidal provides transformations like density, slow, rev, every, iter, and superimpose that all take a pattern and return a new pattern. Because patterns are functions, composition happens at function level: density 2 (every 3 rev p) wraps pattern p in two function wrappers, each manipulating the time arc or event arcs. No actual events are computed until playback time — this is lazy evaluation. The practical benefit: you can compose to ‘arbitrary depth without worrying about storage’. The musical benefit: arbitrary structural complexity from simple building blocks.

Examples

whenmod 8 4 (slow 4) $ every 2 ((1/2)<) $ every 3 (density 4) $ iter 4 "grey darkgrey green black" — four nested transformations composing freely.

Assessment

Given every 4 rev "bd hh sd hh", describe what happens each cycle (1, 2, 3, 4) and explain how functional composition makes this possible without pre-computing 4 cycles of events.

“Because these transforms operate on patterns as functions, and not simply lists, this can be done to arbitrary depth without worrying about stor- age; no actual events get calculated and manipulated u”
corpus · l3-l4-making-programming-languages-to-dance-to-live-coding-w · chunk 4