This is mostly a syntax issue, so no real problem, but I find very convenient to call an Event
key using ().something
instead of ().at(\something),
and more precisely instead of ().at(\something).value()
in the case the value is a function.
However, I’d like to reference this function arguments by names, so that it can be specified easily by the programmer. But when using the first syntax, it doesn’t work :
(
var event = ();
event.function = { arg self, foo = 0; foo.postln };
event.function(1);
event.function2 = { arg self, foo = 0; foo.postln };
event.function2(foo: 2);
event.function3 = { arg self, foo = 0; foo.postln };
event.function3.value(foo: 3);
event.at(\function2).value(foo: 4);
)
Am I missing something or is it problematic to use the event.function2(foo: 2);
syntax, which I find elegant ?
Regards,
D.