-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Right now, if an instrument ends before it is gated off (because it has a fixed envelope generator, for example), the /n_set commands fails because the synth node has already been freed. To avoid that, track nodes in the server by listening to /n_go and /n_end OSC messages that the server sends, to know with certainty if a node exists or not at a given time.
This is a code example for Supercollider that shows how the OSC messages look like:
(
OSCresponderNode(s.addr, '/n_end', { arg time, responder, msg;
[time, responder, msg].postln;
}).add;
)
n = s.nextNodeID;
s.sendMsg("/s_new", "sin", n, 0, 0, "freq", 850);
s.sendMsg("/n_set", n, "freq", 600);
s.sendMsg("/n_free", n);