Publish any object for remote access via network (OSC, see http://opensoundcontrol.org ). This allows to create easy access for other languages and systems, such as Pd, Processing or Max.
For more examples and demos see http://www.fredrikolofsson.com/f0blog/?q=node/401
OpenObject API has two levels:
There is only one instance for each instance of sc-lang. Any functionality within sclang can be remote controlled, for instance by using environments with functions (example below).
Start listening to addr (if nil
, it listens to all addresses). SClang listens on the port 57120. If for some reason it was given a different one by the OS, an error message is posted. Restarting SuperCollider helps.
Some applications do not allow to receive messages through the same port they are passing in the OSC message as reply port. As a workaround, this port can be explicitly overridden here.
Stop listening.
Remove all objects.
Check if listening.
Add an object for remote access under a name.
The key under which object is published.
Remove an object.
Remove an object published under name.
The default is false, but if set to true, any objects or classes that implement the message " at " can be accessed remotely. As name, use the scheme: name_key, e.g. Tdef_x for Tdef(\x).
Register the proxy classes Tdef, Ndef, Pdef, Pdefn, Ndef and Fdef (convenience method).
*lookup is set to true.
For remote code execution, OpenObject can be opened to the interpreter.
Open the interpreter for external access. Do this only if you know what you are doing.
addr |
Address from which the messages come. If a replyID (an Integer) is given, sends back a reply: The results are sent back to the sender under the OSC command |
A Boolean to de/activate a layer of extra protection. By default this is true and will block strings that contain unixCmd
, systemCmd
, Pipe
and File
. To turn off the protection set this to false.
Close the interpreter.
Once an object has been published under a name, methods can be called via OSC messages:
"/oo_reply" replyID val1 val2 ...