I’ve been reading through a lot of tutorials and forums on SuperCollider lately, and came across on some code samples using *
and #
and _
, but I don’t find why they are used. Can someone explain that to me ? // Is there somewhere a comprehensive list of all this characters and their usage ?
Some samples:
*
as in:
(
var list = [1, 2, 3];
func(*list); // equivalent to func(list[0], list[1], list[2])
)
or #
for literal array :
But then, why using literal arrays instead of regular arrays ?
p = Pbind(
\degree, Pwhite(-7, 12, inf),
\dur, Pwrand([0.25, Pn(0.125, 2)], #[0.8, 0.2], inf),
\legato, Pfunc { ~legato } // retrieves value set by MIDI control
).play;
)
or #
: this is not a literal array, is it ?:
var a, b, c;
#a, b, c = [1, 2, 3]; // equivalent to a=1; b=2; c=3;
or _
as in:
(
Pbind(
\mtranspose, -1,
\octave, 5,
[\dur, \degree], Ptuple(y.collect(Pseq(_, inf)))
).play
)