Sending OSC from mac to SC

I’m trying to send OSC commands from a swift program to SC. I’m using OSCCore.swift.
I made a simple OSCFunc in SC with a target address ‘/chat’.


The OSCCore.swift has an example that works. I added a message to ‘/chat’ that fails.

let bndl = OSCBundle(timetag: OSCTimeTag.immediate, content: [
    OSCMessage(address: "/dumpOSC", args: [Int32(1)]),
    // "/s_new", name, node ID, pos, group ID
    OSCMessage(address: "/s_new", args: ["sine", synthID, Int32(1), Int32(1)]),
    // "/n_set", "amp", sine amplitude
    OSCMessage(address: "/n_set", args: [synthID, "amp", Float32(0.5)]),
    // "/n_set", "freq", sine frequency
    OSCMessage(address: "/n_set", args: [synthID, "freq", Float32(640.0)]),
    OSCMessage(address: "/chat", args: []) // <--- FAILS

FAILURE IN SERVER: /chat Command not found

This make sense since there is no ‘/chat’ in SC. How do I structure an OSC message to reach the OSCFunc?

OSCFunc is in the language (sclang process).

/s_new, /n_set are in the server (scsynth process).

These are separate processes with separate ports. You can’t bundle /chat in with the others and send them all to the same place.

-> 57110

-> 57120


Thanks, I’ll separate them and see that goes…

And thanks for the very quick response!

It worked! I’d better read the docs. I don’t have a handle on the inner workings of SC.