loopFirst

From TidalCycles userbase
Revision as of 23:31, 28 December 2020 by Left adjoint (talk | contribs) (Created page with "{{DISPLAYTITLE:loopFirst}} Type: <source inline>loopFirst :: Pattern a -> Pattern a</source> '''loopFirst''' is a function that takes a pattern and loops...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Type: loopFirst :: Pattern a -> Pattern a

loopFirst is a function that takes a pattern and loops only the first cycle of the pattern. For example, in the following code will only play the bass drum sample.

d1 $ loopFirst $ s "<<bd*4 ht*8> cp*4>"

This function combines with sometimes to insert events from the first cycle randomly into subsequent cycles of the pattern:

d1 $ sometimes loopFirst $ s "<<bd*4 ht*8> cp*4>"