foldEvery

From TidalCycles userbase
Revision as of 19:29, 9 December 2018 by Yaxu (talk | contribs) (Yaxu moved page FoldEvery to foldEvery)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Type: foldEvery :: [Int] -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a

foldEvery transforms a pattern with a function, once per any of the given number of cycles. If a particular cycle is the start of more than one of the given cycle periods, then it it applied more than once. It is similar to chaining multiple every functions together.

Example:

d1 $ foldEvery [3, 4, 5] (fast 2) $ sound "bd sn kurt"

this is equal to:

d1 $ every 3 (fast 2) $ every 4 (fast 2) $ every 5 (fast 2) $ sound "bd sn kurt"