Shifting notes with euclid pattern

I'm trying to raise notes in a line using an euclidian pattern. This is how I'm trying to do it right now:

n ("7 2 5 0" +| "0*16" |+ "12(6, 16)")

This gives me only 6 events despite I'm trying to use the structure from the left side which has 16:

 (0>1/16)|n: 16.0f
 (3/16>¼)|n: 16.0f
 (5/16>⅜)|n: 16.0f
 (½>9/16)|n: 16.0f
(11/16>¾)|n: 16.0f
(13/16>⅞)|n: 16.0f

It seems that the rests are killing the events instead of leaving them unchanged. How can I solve this?

Thanks in advance,

1 Like

Hello @gadfly16,
Apologies if I'm misinterpreting what you're aiming for, but I'd use while to conditionally apply the euclidean pattern. I think you could do something like this:
while "t(6,16)" (|+ n 12) $ n ("7 2 5 0" +| "0*16")
or, if appropriate, maybe break it up to save a few keystrokes:
while "t(6,16)" (|+ n 12) $ s "mySound*16" # n "7 2 5 0"


this is exactly what I needed. Thanks a lot! It seems that while is not covered in the documentation, not even in the "All Functions" section.
Thanks again,

True enough. I only learned of while recently in this thread: Applying a function when boolean pattern matches

Now, I use it all the time.


I decided to make a page for while in the wiki, but somebody was faster than me. Nice!