Accessing a synth instance via ID?

On top of what James said, you can construct a (client-side) Node object back from ID with basicNew, although I think there are some limitations when doing that in the sense that you don’t get all features of the object you’ve “lost”. But surely release and free work on the basicNew-ed node object.

// say we know just the id
i = Synth(\default).nodeID

y = Node.basicNew(s, i)

y.release(1.5) // or .free for abruptly

It’s sometimes useful to do that with events (save the id in a callback, or even construct the node there), in which case one needs be aware than an event can create multiple synths on chords etc. More discussion on the latter: Stopping an event with infinite duration.

1 Like