Shorter way to write polyphonic pattern

Hi,

i'm a beginner in the world of Tidal Cycle. I'm starting by trying to creat simple drum pattern.
here is a short simple drum pattern :slight_smile:

D1 $ sound "[bd!2, hh!8, ~ sn:2, ~!2 ho ~!2 ho ~!2, ~!2 ht ~!5]"

It works , but I can't find a way to avoid repetition in the code (exemple "~!2 ho ~!2 ho ~!2").
How can I shorten this pattern? What would you do ?

perhaps use the shift operator of the API (has no representation in mini-notation, I think):

d1 $ stack [ sound "[bd!2, hh!8, ~ sn:2, ~!2 ht ~!5]"
           , sound  ("0 1%8" <~ "[~ ~ ho ~]*2" )  
           ]

also, if you want to practice your Euclids:

   ,  struct "1(7,8)" $ sound "ho(3,8,1)" 

or this:

    , zoomArc (Arc 0 (8%9)) $ sound "[~ ~ ho]*3"

an infinity of options ...

2 Likes