home/ atoms/ tidal-function-composition-operator

Two pattern-transforming functions can be composed into one and applied together in TidalCycles

When you want two transformations to happen together under one gate or offset, you compose them into a single function rather than nesting calls. In TidalCycles this works because a transform like rev takes a pattern and returns a pattern, and fast 2 does the same; joining them produces a new function that first reverses then speeds up (or vice versa). McLean shows applying rev and fast 2 every third repetition by composing them into one function. The general idea (composition of pattern-to-pattern functions) is what lets while, every, chunk, etc. each take a single function argument that may itself do several things.

Examples

d1 $ every 3 (fast 2 . rev) $ s "amen*4"
-- every third cycle, reverse then double-speed, as one transform

Assessment

Explain why fast 2 . rev can be passed to every 3 as a single argument; state whether rev . fast 2 gives the same audible result and why.

“this is a hash score operator for joining it together two functions into one”
corpus · alex-mclean-yaxu-eulerroom-equinox-2020-tidalcycles-set-talk · chunk 1