Sections
You are here: Home Forum Development Discussion Broadcasting OSC

Broadcasting OSC

Up to Development Discussion

Broadcasting OSC

Posted by Hugobox at August 08. 2008

Hi!

I was wondering if the Make could broadcast OSC messages instead of only replying, or would there be another way to send OSC to multiple computers?

Re: Broadcasting OSC

Posted by Liam Staskawicz at August 09. 2008
Have a look in osc.c for something like Osc_SetReplyAddress(). If you change that to 255.255.255.255 then you should be able to broadcast your messages.

Re: Broadcasting OSC

Posted by Hugobox at August 12. 2008

OK great! so the OSC reply adress function looks like this:

int Osc_SetReplyAddress( int channel, int replyAddress )


but I'm not sure what the OSC channel is, and the reply address is one integer instead of 4. Setting both to 255 didn't seem to work.

Re: Broadcasting OSC

Posted by Liam Staskawicz at August 12. 2008
There's an IP_ADDRESS() macro that takes 4 ints and spits out a single int. THe OSC channel corresponds to UDP or USB - UDP is 0, as I recall...

Re: Broadcasting OSC

Posted by Hugobox at August 12. 2008

Thanks! it works great!

Re: Broadcasting OSC

Posted by Hugobox at August 13. 2008

The code always works when placed in the main task loop, but when placed in the initialisation commands, like right after  Network_SetActive( true );  it will work for a few seconds, I suspect that  the replyaddress gets overwritten  somewhere.

Re: Broadcasting OSC

Posted by Liam Staskawicz at August 13. 2008
By default, the OSC system sets the reply address to whatever it received the most recent message from. This could ideally be a little more flexible, but in the meantime you could either continue to reset it yourself, or alter the OSC UDP Task in osc.c.
Powered by Ploneboard
Document Actions