OSCRouter - simple, open source networking router for UDP/TCP/OSC packets

Chris Mizerak's icon

Complete with full source code

OSCRouter_Screenshot1.png
png
FriFlo's icon

Oooh! Does that mean, I can send bigger chunks of OSC with this without any loss?

Chris Mizerak's icon

OSCRouter will happily route OSC over TCP, which does mean support for very large chunks of OSC data and also guaranteed ordering. However, for the entire channel of communication to be 100% guaranteed, both the OSC sender and receiver would also need to use TCP. If just one side is TCP, then I suppose you could use OSCRouter to get you TCP most of the way in one direction... For example, OSC Sender (different machine) ---> TCP ---> OSCRouter (local machine) ---> UDP ---> OSC Receiver (local machine) or vice-versa.

FriFlo's icon

Thanks for the info, chris! In my case, I am looking for a way to reliably send bigger OSC chunks to a tablet running Lemur, so I guess OSC router could only run on the PC side ... I just bought an android tablet with bigger screen and ethernet lan support. I will see, if this will make the messages transferred more reliable.

FriFlo's icon

But: I was also looking for a way, to send may own kind of midi protocol via TCP from one PC to other PCs (all running Max 7). For this, the OSCrouter might very well be useful, as I wouldn't have any restrictions on the number of midi ports! How about latency and acuracy vs. something like IPmidi or RTP midi?

Chris Mizerak's icon

Hello :)

Yes, unfortunately I don't believe Lemur works over TCP, so you would still have a gap in the guaranteed deliver/ordering pipeline.

IPmidi is UDP, so you have the possibility of packet loss and packets being delivered out of order. RTP midi is also UDP but likely more robust because it claims to detect packet loss and resend lost data.

Using TCP (OSCRouter) would give you the guaranteed accuracy, but have higher latency.

So, you have to decide which tradeoff you are willing to make, based on your application. UDP is a better choice for synchronizing a drum beat, for example, but TCP would be a better choice for transferring a large amount of data, or critical data that must always be delivered.