whenmod

From TidalCycles userbase
Revision as of 00:03, 10 December 2018 by Yaxu (talk | contribs) (Yaxu moved page Whenmod to whenmod)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Type: whenmod :: Int -> Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a

whenmod has a similar form and behavior to every, but requires an additional number. It applies the function to the pattern, when the remainder of the current loop number divided by the first parameter, is greater or equal than the second parameter.

For example the following makes every other block of four loops twice as fast:

d1 $ whenmod 8 4 (fast 2) (sound "bd sn kurt")