Questions about JavaOSC

410 views
Skip to first unread message

Ewan

unread,
Aug 5, 2010, 2:26:01 PM8/5/10
to Android Music Developers
Hi there,

For the last week or so I've been working on a Android version of the
monome:

http://code.google.com/p/androidome/
http://monome.org

However, I'm having a problem with the JavaOSC library from Illposed:
http://www.illposed.com/software/javaosc.html
I've got the library up and running, and generally it is great, there
is just very occasionally the odd issue. Very rarely, the received OSC
messages don't match the sent messages in high traffic situations. An
example:

SENT
/soyuz/led 1 0 0
/soyuz/led_col 0 0
/soyuz/led_col 2 0
/soyuz/led_col 1 0
/soyuz/led_col 3 0
/soyuz/led_col 4 0
/soyuz/led_col 5 0
/soyuz/led_col 6 0
/soyuz/led_col 7 0
/soyuz/led 1 0 0

RECIEVED
/soyuz/led 1 0 0
/soyuz/led_col 0 0
/soyuz/led_col 2 0
/soyuz/led_col 1 0
/soyuz/led_col 3 0
/soyuz/led_col 4 0
/soyuz/led_col 5 0
/soyuz/led_col 6 796094329
(missing message?)
/soyuz/led 1 0 0

It looks like the messages:

/soyuz/led_col 6 0
/soyuz/led_col 7 0

have been interpreted as a single message, but I can't work out why,
possible due to a dropped packet somewhere over the network? Any help/
advice would be greatly appreciated! Occasionally messages are also
just clean dropped:

/soyuz/led_col 2 255
/soyuz/led_col 2 0
/soyuz/led_col 3 255
/soyuz/led_col 3 0
/soyuz/led_col 4 255
/soyuz/led_col 4 0
/soyuz/led_col 5 255
( /soyuz/led_col 5 0 - expected but not received?)
/soyuz/led_col 6 255
/soyuz/led_col 6 2

Also has anyone had any luck with hand-coding OSC libraries or any
general experience with high-traffic OSC application? Any help greatly
appreciated.

Thanks, Ewan

Jip

unread,
Aug 6, 2010, 3:07:07 AM8/6/10
to Android Music Developers
Take in mind that OSC is made on top of UDP, which doesn't guarantee
that all packets will arrive to its destination. This enables faster
communications in overloaded networks, and is widely used for
streaming protocols.
is there any router between android and your pc or mac? if so, try
configuring an ad-hoc connecton (I'm not sure if android allows it).
Also you could try sending UDP packets directly, to discard bugs in
the OSC library, or trying another implementation like this one:
http://www.sciss.de/netutil/

Jose

On Aug 5, 8:26 pm, Ewan <ewan.heming...@gmail.com> wrote:
> Hi there,
>
> For the last week or so I've been working on a Android version of the
> monome:
>
> http://code.google.com/p/androidome/http://monome.org

Dan Stowell

unread,
Aug 6, 2010, 3:13:04 AM8/6/10
to android-musi...@googlegroups.com
OSC is not made on top of UDP, it's agnostic of how it's delivered. In
supercollider for example you can choose TCP or UDP. The issue kind of
sounds a bit like an internal bug in javaOSC to me (race condition?),
but as José suggests it could be UDP's fault - so if you're able to
switch to TCP instead, that might fix it.

Dan


2010/8/6 Jip <jip...@gmail.com>:

--
http://www.mcld.co.uk

Andreas Reuterberg

unread,
Aug 6, 2010, 5:53:57 AM8/6/10
to android-musi...@googlegroups.com
I've used the same OSC library for FingerPlay MIDI without any
problems. You can have a look at my source code if you want.

http://code.google.com/p/fingerplaymidi

I wish I had the time to write a "memory optimized" OSC library for
Android, one which doesn't do a 'new' for each packet sent :).

/Andreas

Andreas Reuterberg

unread,
Aug 6, 2010, 5:55:23 AM8/6/10
to android-musi...@googlegroups.com
.. oh, and perhaps a OSC library which can handle both UDP and TCP.

Ewan

unread,
Sep 11, 2010, 11:54:39 AM9/11/10
to Android Music Developers
Andreas do let me know if you ever get round to writing that, sounds
interesting. I ended using the NetUtil library (http://www.sciss.de/
netutil/), for which this hasn't been an issue at all. I tried to
debug the JavaOSC library, but couldn't make any headway with it. The
issue only seemed to happen in high-traffic situations which makes
tracking down the exact point tricky...

On Aug 6, 10:55 am, Andreas Reuterberg <andreas.reuterb...@gmail.com>
wrote:
> .. oh, and perhaps a OSC library which can handle both UDP and TCP.
>
> On Fri, Aug 6, 2010 at 10:53 AM, Andreas Reuterberg
>
>
>
> <andreas.reuterb...@gmail.com> wrote:
> > I've used the same OSC library for FingerPlay MIDI without any
> > problems. You can have a look at my source code if you want.
>
> >http://code.google.com/p/fingerplaymidi
>
> > I wish I had the time to write a "memory optimized" OSC library for
> > Android, one which doesn't do a 'new' for each packet sent :).
>
> > /Andreas
>
> > On Fri, Aug 6, 2010 at 8:13 AM, Dan Stowell <danstow...@gmail.com> wrote:
> >> OSC is not made on top of UDP, it's agnostic of how it's delivered. In
> >> supercollider for example you can choose TCP or UDP. The issue kind of
> >> sounds a bit like an internal bug in javaOSC to me (race condition?),
> >> but as José suggests it could be UDP's fault - so if you're able to
> >> switch to TCP instead, that might fix it.
>
> >> Dan
>
> >> 2010/8/6 Jip <jipa...@gmail.com>:

Ewan

unread,
Sep 11, 2010, 11:56:01 AM9/11/10
to Android Music Developers
Oh and if anyone is interested in the final thing, have a peek here:

http://ewanhemingway.co.uk/programming/androidome
Reply all
Reply to author
Forward
0 new messages