Hey all, apologies if this newbie question has already been asked or if I missed it in the documentation.
I am trying to find the best solution to alternate between sub-patterns in a fixed order. Using Pswitch I can get my desired behavior, but every time I add a new subppatern I have to embed the full sequence. Alternatively I can use Prand to get one subpattern at a time, but I lose the fixed order that I am hoping for.
(
var a,b,c,d,e,s;
a = Pseq(0!3,1);
b = Pseq(11!2,1);
c = Pseq(22!2,1);
d = Pseq(33!2,1);
e = Pswitch([a,b,c,d], Pseq([0,1,0,2,0,3],inf));
// e = Pseq([a, Prand([b,c,d],1)],inf); // random order
s = e.asStream;
21.do({
s.next.postln;
});
);
// 0,0,0,11,11,0,0,0,22,22,0,0,0,33,33,0,0,0,11,11,0...
So, is there some pattern class that can alternate between subpatterns in a fixed order?
e = Pseq([a, P?([b,c,d],1)],inf);
// 0,0,0,11,11,0,0,0,22,22,0,0,0,33,33,0,0,0,11,11,0...
Or is there some other solution I’m missing?
Thanks for the help