I’m trying to run some Pfuncs
in a Pseq
like this:
(
Pdef(
\example,
Pbind(
\funcs, Pseq([
Pfunc({
postln("Executing Pfunc 1");
}),
Pfunc({
postln("Executing Pfunc 2");
}),
Pfunc({
postln("Executing Pfunc 3");
}),
Pfunc({
postln("Executing Pfunc 4");
})
]),
\dur, 4
)
).play;
)
What I was expecting was that each Pfunc
executes once, giving the following output:
Executing Pfunc 1
Executing Pfunc 2
Executing Pfunc 3
Executing Pfunc 4
But what actually happens is that the first Pfunc
executes over and over until I stop the pattern:
Executing Pfunc 1
Executing Pfunc 1
Executing Pfunc 1
Executing Pfunc 1
Executing Pfunc 1
... etc ...
This is a surprise to me as if I put a normal sequence in the Pseq
it behaves as expected:
(
Pdef(
\example,
Pbind(
\funcs, Pseq([
0,1,2,3
]).trace,
\dur, 4
)
).play;
)
0
1
2
3
Can anyone advise me on how to achieve what I’m looking for?