OSCdef never recognizes the message "path" i send to it

I am trying to send a simple message to supercollider (from processing, so i can return a response containing some information about the volume) and have this simple OSCdef

~proc = NetAddr("", 12321);

    ~proc.sendMsg("/response_back", "supercollided received the message and responded back!".asString)
}, "/getdata"});

And in my other program i am sending the osc message “/getdata”, to the only running supercollider server at

The message seems to be sent, but the supercollider output window always says

FAILURE IN SERVER: /getdata Command not found

Even though it is called /getdata in the definitoin :frowning:

What could i be missing?

You should send to the language at port 57120 (that’s the default port – check NetAddr.langPort).

The server understands only the messages documented in the Server Command Reference. It is not supported to send arbitrary messages to the server.

Edit: Also, you have too many curly braces. You need only one pair, not including the command path /getdata.


1 Like

oh i didn’t know there’s a differentce between server port and the “lang” port where server can receive messages defined via OSCdef, thank you

and yes, sorry the bracket was a typo because i was writing it

OSCdef is 100% language side – you’ll never send messages for OSCdef to the server.