2 summary:: notify sc-lang side node objects of their server sided state
3 related:: Reference/Server-Command-Reference, Classes/Node, Classes/DebugNodeWatcher
4 categories:: Control, Server>Nodes
7 Node instances (Synths and Groups) can be registered with the NodeWatcher.
8 It watches for server node status messages:
11 and sets the isPlaying and isRunning variables on the Node instance accordingly. A Node that ends is unregistered at that time.
13 In some cases this can be an invaluable service. The use of an independant object to maintain the state keeps the implementation of the Node classes simple.
14 Note that server notification should be on. (this is default. see: aServer.notify)
17 //the most common use:
18 NodeWatcher.register(aNode);
26 Create a new instance listening to the server's address
29 Create a new instance listening to the server's address. If there is one present already return that one.
34 Can be a Group or a Synth. The NodeWatcher is created internally.
36 argument::assumePlaying
37 If true, the node's strong::isPlaying:: field is set to true.
40 Remove the node from the list of nodes. This happens also when a node is freed.
45 Add the OSCFunc to listen to the address.
48 Remove the OSCFunc to stop listen to the address.
54 b = s.makeBundle(false, {
55 a = Group.new(s); //create a node object
56 NodeWatcher.register(a); // register before creating on the server
60 s.listSendBundle(nil, b); //start the node on the server
65 s.freeAll; //free all nodes