Getting the effect of overlapping cycles

I'm starting to wrap my head around the concept of cycles (instead of bars). Is there a function for creating the effect of overlapping cycles?

Let's say I want to have a melodic figure with three notes going over a four beat cycle, changing starting position as it goes. I know that I can get the effect by doing this:

d1 $ note "<[g fs e g] [fs e g fs] [e g fs e]>"
  # sound "supermandolin"

or with five notes like this:

d2 $ note "<[e fs g a] [b e fs g] [a b e fs] [g a b e] [fs g a b]>"
  # sound "supermandolin"

But is there a function for automating this, so I don't have to write out the permutations by hand?

d1 $ n "{e fs g a b}%4"
1 Like

Wow, that was easy :slight_smile: Thanks!