Hi! I need to have a routine that can embed a pattern and then embed another pattern when the previous pattern ends.
~pattern = Pseq([1, 2, 3, 4],1);
~pattern = Pseq([5, 6, 7, 8], 1);
(
r = Routine {
~pattern.embedInStream;
~pattern.embedInStream;
};
)
r.next;
This “works” but it’s obviously not the greatest solution. I want to have the routine reset somehow when the pattern ends so that I can redefine the variable ~pattern
when ever and have it embeded on time.
The only way i can find to reset a routine from within itself is the .yieldAndReturn
method but as the name suggests it also yields something so it’s not very useful to me.