Tidal pattern combinators transform time — not just events — enabling rotation, reversal, and every-nth-cycle transformations
Because Tidal patterns are functions over time, combinators shift the time argument rather than shuffling an event list. Rotating a pattern offsets the query time. every n f p applies transformation f every n cycles. Haskell’s Functor and Applicative instances allow fmap and <*> to lift functions pointwise over patterns, enabling higher-order pattern-of-functions constructions. Strudel’s operator set (fast, slow, every, rev, palindrome) directly descends from these combinators, making this design central to the Tidal/Strudel idiom.
Examples
every 3 (rev) "black grey red" — reverses pattern every 3rd cycle. palindrome plays forward then backward. blend 0.5 blue <$> p — maps a colour blend over every event in pattern p.
Assessment
Explain why every n f p requires appending a transformed copy rather than simply applying f at every nth step. Write a Strudel expression that reverses a pattern every 4 cycles.