On Tue, Jul 28, 2009 at 10:37 AM, Andrew C. Smith
You can -- see Hjalte's email. For both of the "ok" synthdefs below, you can send the array directly with set or new:
a = Synth(\ok, [x: [5, 6, 7, 8]]);
a.set(\x, { 10.rand } ! 4);
The issue with Perdo's latest try is that an array given as an argument default
must be a literal array. That is, this is OK:
SynthDef(\ok, { arg x = #[1, 2, 3, 4];
...
})
But this is not.
var default = [0, 1, 2, 3];
SynthDef(\no, { arg x = default;
...
});
And the solution as Hjalte said is to use Control, or (easier syntax) NamedControl by way of Symbol:kr.
var default = [0, 1, 2, 3];
SynthDef(\alsoOK, {
var x =
\x.kr(default);
...
})
hjh