The other way is topEnvironment:
(
~a = { |ev| ("utility function, has event by argument " ++ ev).postln; 0 };
Event.addEventType(\custom, {
topEnvironment[\a].value(currentEnvironment);
currentEnvironment.copy.put(\type, \note).play;
});
)
(type: \custom).play;
hjh