Changing the degree on each cycle when playing notes

I’m getting back into FoxDot after mostly tinkering with tidalcycles, and there’s a sort of pattern I’m used to using in Tidal

n "0 1 2 3 4" |+ n "<0,12,24>"

The above, in Tidal, goes up the notes in the base octave (0), one octave up (12) or two octaves up (24), giving me a note pattern of 0 1 2 3 4 12 13 14 15 16 24 25 26 27 28.

The best I can guess is P[0,2,7,3,4,5]+P[0,7] to try to move up the line at root=0, and at root=7. I printed the output to check it, and got: P[0, 9, 7, 10, 4, 12], when I want P[0,2,7,3,4,5,7,9,14,10,11,12]

Is there a way to do this I haven’t stumbled across yet?

You might want to use TimeVars here and shift the values based on time, so would depend on the duration of the notes as well. Let’s assume a duration of 1, here’s how it would look in FoxDot:

p1 >> pluck(P[0, 2, 7, 3, 4, 5] + var([0, 7], 6))

Or to do it more explicitly, you could use stutter like:

p1 >> pluck(P[0, 2, 7, 3, 4, 5] + P[0, 7].stutter(6))

In the next update, the Pattern loop method has been updated to include a functional transformation so you could also use:

p1 >> pluck([0, 2, 7, 3, 4, 5].loop(2, lambda x: x + 7))

Hope that helps!

That was exactly what I was looking for, thanks!

I skipped over that part of the documentation, apparently.