Interactive pattern modification

Hi,

it’s right, Plazy would be a good way to go. Note that above syntax doesn’t work with Prand and many other list patterns, the Plazy approach does (check with Prand, Pshuf etc.):

(
~degrees = Scale.majorPentatonic.degrees;

Pbind(
    \degree, Pn(Plazy { Pseq(~degrees) }, inf),
    \root, 0,
    \dur, 0.2
).play;
)

~degrees = Scale.minorPentatonic.degrees;
~degrees = [0, 1, 2, 3];

As this scheme is nice for live coding, I’ve written a whole suite of patterns for this kind of (“dynamic scope”) replacement: PLx, contained in miSCellaneous_lib quark

(
~degrees = Scale.majorPentatonic.degrees;

Pbind(
    \degree, PLseq(\degrees),
    \root, 0,
    \dur, 0.2
).play;
)

~degrees = Scale.minorPentatonic.degrees;
~degrees = [0, 1, 2, 3];

There exist PLrand, PLshuf etc.

Note that behaviour is not totally the same with PLseq and Pn(Plazy { Pseq … }) because PLx patterns
follow an immediate replacement paradigm, whereas with Pn + Plazy the Pseq is finished before replacement, PLn mimics this.

Greetings

Daniel

3 Likes