anticipateIn

From TidalCycles userbase
Revision as of 20:55, 6 July 2021 by Tiagor (talk | contribs) (Correction of type definition and clarification of example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Type: anticipateIn :: Show a => a -> Time -> ControlPattern -> IO ()


Start playing a pattern after a specified number of cycles and assign it an ID.

The first argument is the ID of the newly created pattern and the second argument is the number of cycles after which the pattern will begin playing.


In the following example we give the pattern the ID 2 and start after 3 cycles:

d1 $ fast 2 $ sound "bd sd"
anticipateIn 2 3 $ fast 4 $ sound "hh*2" *| gain "0.9 0.6"


Stop the newly created pattern using its ID:

d2 silence