Just getting started learning SC using Eli Fieldsteel’s book and have a basic question about routines, patterns, and looping Pbinds. As a simple example, I’d just like to play ascending chromatic scales up 12 notes starting at middle C, and then starting on C#, and then starting on the next semitone up etc. Would the normal, most concise way be to put the Pbind in a Routine loop, or use Pspawner, or some other way, or is there a way to do all of this with just one Pbind with nested patterns?
// Using Routine
(
Routine({
var startNote = 0;
12.do {
Pbind(\dur, 0.15,
\note, Pseries(start: startNote, step: 1, length: 12),
).play;
2.yield;
startNote = startNote + 1;
};
}).play;
)
// Using Pspawner
(
Pspawner({ | sp |
var startNote = 0;
12.do {
sp.seq(
Pbind(*[ note: Pseries(start: startNote, step: 1, length: 12), dur: 0.15]),
);
startNote = startNote + 1;
};
sp.suspendAll;
}).play
)
With Pspawner, it doesn’t look like I’d need a wait/yield in the loop since that sp.seq seems to block until the Pbind is finished playing? Also, am wondering what the * means and why the Pbind params are specified in an array here versus the Pbind format in the Routine example? I was looking at the Pspawner docs for this format. Thanks for any info!