Loosing OSC messages


#1

Hi guys,

I’ve a question about OSC messages in SC: I’m using SC in conjunction with another software (VVVV) to create a realtime synthesis/animation system where SC is in charge of sending triggers via OSC in order to keep the other software synchronized.

There’s actually a lot of messages that are being shared (messages about envelope followers and triggers of different kind like sound started, sound finished, play this video, play this animation, etc…).

My current setup is made of SC running on a PC while VVVV is running on a second one and both PCs are connected to a cabled LAN. Future implementations will see both SC and VVVV running on the same machine.

When I first tried the system I was very happy with the result but then I noticed sometime some message seemed not to be sent/received :frowning:

I’m afraid that when messages are a lot, some of them is being lost. I mean, messages from the language to the SCsynth are dispatched as expected, problems arise when it comes to messages between SC and VVVV.
This is particularly noticeable when messages are particularly critical. I’m still not able to understand this behavior: probably is a question of the receiver software or maybe something related to the SC OSC senders.

I’m wondering if it is a normal behavior in cases like that.
Could it be a question related to the kind of connection? I’m using UDP (I think, see code below). Maybe better to use TCP?
In case, how can I implement the TCP connection in my code? Can it be a better solution?
Has some of you experimented a similar problem?

This is how I create the connection with VVVV (actually I’m using 2 ports for different purposes):

~vvvv   = NetAddr("192.168.1.14", 15200);
~video  = NetAddr("192.168.1.14", 15400);

This is how I send messages to VVVV:

~video.sendMsg("/playVideo", 1);
~vvvv.sendMsg("/some/method", 1);

and so on.

Thank you very much for your help and support


#2

UDP indeed can loose packets and TCP might be the solution. Although I have zero experience with this myself, the following bug report may give some hints for how to configure using tcp instead of upd in supercollider:


#3

Thank you @shiihs for the link.

I think it’s also worth mentioning that these OSC messages are sent from inside a Task.
Don’t know actually if that can change the perspective on looking at this particular issue…