I personally find that Pthings (patterns) usage takes some time to understand and feel… First, patterns can be nested. Recently, I figured out that most of the time, you do not create your arrays yourself, but instead take advantage of patterns types to do what you need.
Simple example
var array = [ 1, 1, 1, 1 ];
Pseq( array, inf );
is equivalent to
Pseq(
Pseq( 1, 4 ),
inf
);
Most of the time, it ends up being easier to use patterns and nesting, than “array construction”, at least for me. I feel like patterns were designed to be used with nesting, not with “classical programming”.
In your case, I think that the problem’s equivalent in pattern/nesting style is :
\degree, Prand( [
Pseq( ~arrays[0], 1 ),
Pseq( ~arrays[1], 1 ),
...
Pseq( ~arrays[n], 1 )
], inf )
).play;
EDIT : to accommodate to the 3 times repeat, you’ll change the Pseq repeat :
\degree, Prand( [
Pseq( ~arrays[0], 3 ),
Pseq( ~arrays[1], 3 ),
...
Pseq( ~arrays[n], 3 )
], inf )
).play;