Hi!
I am not sure if this topic has already showed up here in the forum, if so please share the link.
I would like to have a list of degrees (e.g. chromatic scale) in which I selecting a sub list randomly and looping through it:
// melodies, not chords
[1,2,3,4], [1,2,3,4], [1,2,3,4]
[5,1,4,11], [5,1,4,11], [5,1,4,11]
[10, 2, 7, 8], [10, 2, 7, 8], [10, 2, 7, 8]
At each big cycle, let say after 100 values, the chromatic scale drops down one of its values randomly. However, the emptying process should have memory, because it will be like emptying a Bag and not like selecting different smaller random lists every time:
[0,1,2,3,4,5,6,7,8,9,10,11]
[0,1,2,3,4,5,6,7,9,10,11]
[0,1,2,4,5,6,7,9,10,11]
[0,2,4,5,6,7,9,10,11]
[0,2,4,5,6,7,9,11]
[0,2,4,6,7,9,11]
I managed to find this solution:
(
Pbind(
\note, Pn(
Plazy(
{var x = (0..12)@|@dup({rrand(0,12)},4);
Pn(Pshuf(x,3), 1);
}),
inf),
\dur, 1/8
).play;
)
And then I nest several of this into Pseq()
.
What are the other ways to this?
Is it possible to do so with a single Pattern (something like Pshuf
)?
For debugging, is it possible to trace separetely what the Plazy
, Pn
and Pshuf
are producing? E.g. have them posting their output with a marker or linebreak in the post window?
Thanks a lot!