pick
  1. pat
  2. xs

Picks patterns (or plain values) either from a list (by index) or a lookup table (by name). Similar to inhabit, but maintains the structure of the original patterns.

note("<0 1 2!2 3>".pick(["g a", "e f", "f g f g" , "g c d"]))
sound("<0 1 [2,0]>".pick(["bd sd", "cp cp", "hh hh"]))
sound("<0!2 [0,1] 1>".pick(["bd(3,8)", "sd sd"]))
s("<a!2 [a,b] b>".pick({a: "bd(3,8)", b: "sd sd"}))
parametertype
pat
xs
  • any
returns
mentioned in (5)