Sorry if this question already exists, I wasn't able to quite find what I was looking for...
How would I go about patterning the offset function (not sure what it's actually called) combined with loopFirst
?
What I actually want to do is "lock" various cycles of random patterns. Basically I want to be able to cycle through / pattern through different iterations of a random pattern.
Like in this example that generates random notes... I want to be able to play the 13th cycle and then the 91st cycle, and keep switching between them. In other words, I want to create a repeating 2 cycle pattern where I choose which cycles loop.
loopFirst $ ("<12 90>" ~>) $ degradeBy 0.1 $ st "[t*16]" $ n (irand 16)
That code doesn't work, it just loops cycle 13 (12) over and over again. This works, but only plays half of each:
loopFirst $ ("[12 90]" ~>) $ degradeBy 0.1 $ st "[t*16]" $ n (irand 16)
And for some reason, this doesn't work - it just plays cycle 13 (12) repeatedly:
loopFirst $ ("[12 90]/2" ~>) $ degradeBy 0.1 $ st "[t*16]" $ n (irand 16)
OK in writing this question I think I found a way to do this:
fast 0.5 $ loopFirst $ ("[29 90]" ~>) $ degradeBy 0.1 $ st "[t*32]" $ n (irand 16)
That code plays 1 cycle of the 30th iteration (29) and then 1 cycle of the 91st iteration (90), which is what I'm looking for.
But I'm wondering... is there a better/easier way to do this?