Classes | External Control > OSC

OSCresponder : Object

client side network responder
NOTE: This class is deprecated and will be removed in a future version of SC. Use OSCFunc and OSCdef instead. They are faster, safer, and have more logical argument order than the old responder classes, and they support pattern matching and custom listening ports. Use of the older classes OSCresponder, OSCresponderNode, and OSCpathResponder can be unsafe, since responders in user and class code can override each other unintentionally.

Register a function to be called upon receiving a specific command from a specific OSC address.

Other applications sending messages to SuperCollider should distinguish between sending messages to the server or the language. Server messages are documented in the Server Command Reference and should be sent to the server's port - s.addr.port - which is 57110 by default. Messages sent to the server will not be processed by any OSCresponder in the language.

Messages from external clients that should be processed by OSCresponders must be sent to the language port, 57120 by default. Use NetAddr.langPort to confirm which port the SuperCollider language is listening on.

See OSC Communication for more details.

NOTE: It is highly recommended to use OSCresponderNode or OSCpathResponder instead of OSCresponder directly. OSCresponders can overwrite each other, but OSCresponderNodes with the same address and command name can coexist peacefully.

Class Methods

OSCresponder.new(addr, cmdName, action)



The address the responder receives from (an instance of NetAddr, e.g. Server.default.addr). An address of nil will respond to messages from anywhere. An address with a port of nil will respond to messages from any port from that specific IP.


An OSC command eg. '/done'.


A Function that will be evaluated when a cmd of that name is received from addr. arguments: time, theResponder, message, addr

NOTE: OSCresponder evaluates its function in the system process. In order to access the application process (e.g. for GUI access ) use { ... }.defer; within the action function, e.g., { |time, resp, msg| { gui.value_(msg[3]) }.defer }

Inherited class methods

Undocumented class methods



OSCresponder.all = value



OSCresponder.respond(time, addr, msg)

Instance Methods

Inherited instance methods

Undocumented instance methods



.action = value



.addr = value


.cmdName = string





.value(time, msg, addr)


see OSCresponderNode.