Hi all,
I have a general sense of how Pbindf and Pchain work, i.e. that they can “filter” one pattern through another, and that they essentially allow pattern construction based on simpler template patterns. Recently, I encountered something that surprised me.
For example, if I start with a pattern that represents a sequence of 4 notes…
s.boot;
(
p = Pbind(
\dur, 1/8,
\degree, Pseq([0,2,3,5], 1),
\legato, 0.02,
);
p.play;
)
and then use Pbindf to modify the \degree values, I had imagined this new value Pattern would “replace” the old one, but instead it seems like it’s being added to the Pbind, so that both the old and new are present. Thus, the four-note Pseq is still present, and thus the total number of events is still four:
(
q = Pbindf(
p,
\degree, Pseq([4,5,7,9,10,11,12,13], 1)
);
q.play;
)
A similar thing happens with Pchain:
(
p = Pbind(
\dur, 1/8,
\degree, Pseq([0,2,3,5], 1),
\legato, 0.02,
);
q = Pchain(
Pbind(\degree, Pseq([4,5,7,9,10,11,12,13], 1)),
p
);
q.play;
)
Is there a way to actually “swap out” one value Pattern for another using these modular pattern-building techniques? Is there something I’m misunderstanding?
Eli