Difference between revisions of "listToPat"

From TidalCycles userbase
Jump to: navigation, search
(adding listToPat)
 
 
Line 6: Line 6:
  
 
<!--T:2-->
 
<!--T:2-->
'''listToPat''' takes a list of things and turns them into a pattern where each item in the list becomes an event all happening in the same cycle, looping upon subsequent cycles.  
+
'''listToPat''' takes a list of things and turns them into a pattern where each item in the list becomes an event all happening in the same cycle, looping upon subsequent cycles. Can also be called as <source inline> fastFromList </source>
  
 
<!--T:3-->
 
<!--T:3-->

Latest revision as of 20:55, 24 December 2020


Type: listToPat :: [a] -> Pattern a

listToPat takes a list of things and turns them into a pattern where each item in the list becomes an event all happening in the same cycle, looping upon subsequent cycles. Can also be called as fastFromList

d1 $ n (listToPat [0, 1, 2]) # s "superpiano"

is equivalent to

d1 $ n "[0 1 2]" # s "superpiano"

See also: fromList