From TidalCycles userbase
Revision as of 01:37, 25 December 2020 by Left adjoint (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Type: chunk :: Int -> (Pattern b -> Pattern b) -> Pattern b -> Pattern b

chunk divides a pattern into a given number of parts, then cycles through those parts in turn, applying the given function to each part in turn (one part per cycle).


d1 $ chunk 4 (# speed 2) $ sound "bd hh sn cp"

The below highlights in bold which part of the above pattern has the (# speed 2) function applied to it over four cycles:

bd hh sn cp
bd hh sn cp
bd hh sn cp
bd hh sn cp

Another example:

d1 $ chunk 4 (hurry 2) $ sound "bd sn:2 [~ bd] sn:2"


chunk' does the same as chunk but cycles through the parts in the reverse direction.