[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: OSC on Super Collider 3.8 Windows



Do you see anything coming in after turning on debug tracing?

OSCFunc.trace(true);

Also, you could try seeing how the data looks different in the two cases (from SC vs from your external program) — though make sure they’re sending the same arguments!  Run netcat (nc) in the Terminal (or a shell, if you’re on Linux)

$ nc -l -u 13531 | hexdump -C

Then change your definition of the NetAddr "m” in sclang to send to port 13531 (or whatever port you set with “nc”).

I get messages like this in the Terminal:

00000000  2f 64 61 74 61 00 00 00  2c 73 00 00 48 65 6c 6c  |/data...,s..Hell|
00000010  6f 20 41 70 70 20 31 00  2f 64 61 74 61 00 00 00  |o App 1./data...|
00000020  2c 73 00 00 48 65 6c 6c  6f 20 41 70 70 20 31 00  |,s..Hello App 1.|
(etc)

After that, try having your UDPWriter from C# send to the same port (13531 or whatever), and see if the message looks the same or not.  It should be 24 bytes for each message, in the “Hello App 1” case above:
2f 64 61 74 61 00 00 00  2c 73 00 00 48 65 6c 6c 6f 20 41 70 70 20 31 00

If you’re accidentally sending TCP-style, I suspect maybe your C# program is including the 4-byte binary length indicating how long the OSC message is…(not used with UDP because it’s packet-based, not stream-based, so the size is known — the size of the packet).

Hope that helps you track this down,
Glen.

On 21 Dec 2016, at 21:34, fgrond <floriangrond@xxxxxxxxx> wrote:

Dear List,

I forgot to add that from within SuperCollider OSCFunc seems to work perfectly

n = NetAddr("127.0.0.1", NetAddr.langPort); // local machine
OSCFunc.newMatching({|msg, time, addr, recvPort| msg.postln; }, '/data', n); // path matching.

m = NetAddr("127.0.0.1", NetAddr.langPort); // loopback
m.sendMsg("/data", "Hello App 1");

only

var writer = new UDPWriter("127.0.0.1", 57120);
writer.Send(new OSCElement("/data", 500);

does not work.

would you know of any other way to test OSC communication on Windows like a simple commandline client or another program that acts as a client to test?

Best,

Florian


On 21/12/16 11:29, Florian Grond wrote:
Dear List,

I'm trying to set up an OSC communication on a Windows 10 enterprise computer
The client program is written in C# using the Ventuz.OSC  and/or  Bespoke library.

We use SC 3.8 the firewall is off.

We would expect to see messages come in, if we send from the C# program to port 57120 on the 127.0.0.1

var writer = new UDPWriter("127.0.0.1", 57120);
writer.Send(new OSCElement("/data", 500);

and setup in SuperCollider:

n = NetAddr("127.0.0.1", NetAddr.langPort); // local machine
OSCFunc.newMatching({|msg, time, addr, recvPort| msg.postln; }, '/data', n); // path matching.

If you know of any OSC library that you would recommend any .net solution is good
 
Any advice very much appreciated,

Florian



-- 
--8<-------8<-------- hier abtrennen -----8<--------8<---- 

F l o r i a n   G R O N D

Post-doctoral fellow McGill university IDMIL (Input Device and Music Interaction Laboratory)

Affiliate member at the Centre for Interdisciplinary Research in Music Media and Technology
http://www.cirmmt.org/

phone +1 514 995 7683

http://www.grond.at

-->8------->8-------- hier abtrennen ------->8------>8----