If you just want to find out when a node is finished (as opposed to sending a totally custom message from it), there’s no need to bother with adding anything to the SynthDef. What James’ code is doing in the latter half is setting up an OSC receiver for the /n_end messages that the server sends anyway when nodes end. These are explained in the rather lengthy Server Command Reference, more precisely in the “Node Notifications from Server” section. If that’s totally confusing, see Client vs Server for the big picture.
This doesn’t save much typing, but it might be conceptually simpler to understand if the “usual machinery” of Node is used to mask the OSC business:
(
var myfun = { |n| (n.nodeID + "says bye").postln };
(dur: 3, degree: [2, 3], callback: // chord two notes as test
{ |ev| ev[\id] do: { |id| Node.basicNew(s, id).onFree(myfun); } }
).play
)