I came accross this SynthDef. There’s variables a and b that are not defined, but are used as the in argument for PanAZ, as an array. A line above Out.ar there is #a, b = sig;
…
I’m just trying to figure out what is happening here. The # says “a” is a literal array, and that it and “b” are equal to “sig”??
I just don’t get what they are doing here, or how the var1, var2 = var3
syntax works…:
(
SynthDef(\string, {
arg out=0, freq = 360, gate = 1, pan, amp=0.1;
var sig, eg, fc, osc, a, b, w;
fc = LinExp.kr(LFNoise1.kr(Rand(0.25,0.4)), -1,1,500,2000);
osc = Mix.fill(8, { LFSaw.ar(freq * [Rand(0.99,1.01),Rand(0.99,1.01)], 0, amp) }).distort * 0.2;
eg = EnvGen.kr(Env.asr(1,1,1), gate, doneAction: Done.freeSelf);
sig = eg * RLPF.ar(osc, fc, 0.1);
#a, b = sig;
Out.ar(out, Mix.ar(PanAz.ar(4, [a, b], [pan, pan+0.3])));
}).add.controls;
)
Thanks!