I was busy working on some patterns and decided to try the Pdef/pbind solution. However, I’m suprised to hear that when I change between patterns, the defined scale defaults back to major. I’m rather surprised to see/hear this, am I missing something?
Here’s my simple test example (the real SynthDef is more complicated, but with the same - scale - results):
Pdef(\m);
Pdef(\m).play;
Pdef(\m).fadeTime = 4;
(
a = Scale.dorian;
Pdef(\m,
Pbind(
\instrument, \default,
\scale, Pfunc({a},inf),
\degree, Pseq([0, 1, 2, 3, 4, 5], 4),
\dur, 0.5,
\amp, 0.2,
\out, 0,
);
);
)
Pdef(\m, Pbind(\instrument, \default, \dur, 1, \degree, Pseq([0, 1, 2, 3, 4, 5],8)));
Lastly, I should add I tried a few versions (with local or global variables), such as define the scale with ~a
inside and outside the Pdef, and tried defining plain \scale, ~a,
, but the results seem the same - unless I missed something out.
Any suggestions or remarks most grateful.
Since posting this I also notice another thing that doesn’t transfer across, \amp
. Do we have to ‘literally’ redefine each variable? I thought that once the original Pdef
is defined then everything stays the same, unless you change it with the \key
…