Given a running tcp/OSC-server at port 12344
, this code should make it possible to connect to it.
q = q ? ();
q.netAddr = NetAddr("localhost", 12344);
q.netAddr.tryConnectTCP;
This is untested since IMHO SuperCollider currently does not allow to create a TCP socket.
to disconnect, execute
q.netAddr.disconnect;
At a language reboot/recompile, all TCP connections are disconnected in Kernel:shutdown
.
Remote Server
Link to heading
To connect to an already running scsynth
instance (here running on localhost with port 57115), use
(
q = q ? ();
q.netAddr = NetAddr("localhost", 57115);
q.netAddr.tryConnectTCP;
q.server = Server(
\others,
q.netAddr,
ServerOptions.new.protocol_(\tcp)
);
q.server.startAliveThread(0);
q.server.doWhenBooted({
"Yo".postln;
s.notify;
s.initTree
});
CmdPeriod.add({q.server.freeAll;});
q.server.makeWindow;
)
Tools Link to heading
q.server.scope
q.server.dumpOSC(1)
q.server.dumpOSC(0)