Difference between revisions of "fromList"
From TidalCycles userbase
Left adjoint (talk | contribs) (creating entry for fromList) |
Left adjoint (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
<!--T:3--> | <!--T:3--> | ||
<source> | <source> | ||
− | d1 $ n (fromList [0, 1, 2]) # superpiano | + | d1 $ n (fromList [0, 1, 2]) # s "superpiano" |
</source> | </source> | ||
− | <!--T: | + | <!--T:4--> |
is equivalent to | is equivalent to | ||
− | <!--T: | + | <!--T:5--> |
<source> | <source> | ||
− | d1 $ n "<0 1 2>" # superpiano | + | d1 $ n "<0 1 2>" # s "superpiano" |
</source> | </source> | ||
− | <!--T: | + | <!--T:6--> |
'''See also: [[listToPat]]''' | '''See also: [[listToPat]]''' | ||
− | <!--T: | + | <!--T:7--> |
[[Category:Functions]] | [[Category:Functions]] | ||
</translate> | </translate> |
Latest revision as of 17:20, 24 December 2020
Type: fromList :: [a] -> Pattern a
fromList takes a list of things and turns them into a pattern where each item in the list has a duration of one cycle, looping back around at the end of the list.
d1 $ n (fromList [0, 1, 2]) # s "superpiano"
is equivalent to
d1 $ n "<0 1 2>" # s "superpiano"
See also: listToPat