run

From TidalCycles userbase
Revision as of 21:58, 25 November 2018 by Echophon (talk | contribs) (Created page with "{{DISPLAYTITLE:run}} Type: <syntaxhighlight lang="haskell" inline>run :: (Num a, Enum a) => Pattern a -> Pattern a </syntaxhighlight> The '''run''' functi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Type: run :: (Num a, Enum a) => Pattern a -> Pattern a

The run function generates a pattern representing a cycle of numbers from 0 to n-1 inclusive. Notably used to ‘run’ through a folder of samples in order:

d1 $ n (run 8) # sound "amencutup"

The first parameter to run can be given as a pattern:

d1 $ n (run "<4 8 4 6>") # sound "amencutup"

scan

Type: scan :: (Num a, Enum a) => Pattern a -> Pattern a

scan is similar to run, but starts at 1 for the first cycle, adding an additional number each cycle until it reaches n

d1 $ n (scan 8) # sound "amencutup"