Inter-process OSC messages

12 views
Skip to first unread message

Alex

unread,
May 5, 2010, 3:19:13 PM5/5/10
to supercollider-android-developers
Hi all,

My latest commit has a cheeky little front-end to OSCMessages and
scpackets written in Java and running over IPC. It seems to be good
enough to do createSynthMessage with, but I tried feeding it some
noteMessages and it did not like me. Still investigating that, but I
think it's a pretty good place to be starting from, and we should have
full OSC soon :)

Alex

Peter Kirn

unread,
May 5, 2010, 5:41:12 PM5/5/10
to supercollider-android-developers
That's great, Alex. Are you just using SC's native OSC support then,
is that the strategy?

I'll have to try sending OSC between SC and Processing. :)

Richard Lawler, the developer of PatternMusic (iPhone/iPad), today
commented that he hoped Android would evolve into a platform that
would allow open connections between apps. That seemed to me a little
optimistic performance-wise on the gadgets we have now, but it could
work in the future (and OSC isn't so bad.)

I think for Pd what I'll do is just write the OSC interface in Java
and pass Pd messages to the Pd service, rather than try to deal with
Pd directly handling OSC. That'll also make OSC code more reusable
with other apps.

Peter

Alex

unread,
May 6, 2010, 2:36:54 AM5/6/10
to supercollider-android-developers
Never too optimistic! I don't think the IPC is as heavyweight as (for
example) the touchscreen thread for GUI interaction, so provided we
can open enough audio channels to avoid passing byte[]s across IPC, I
think it's a very viable prospect.

We're not accessing the OSC directly, it's completely Java until it
hits C++ inside the service. What the current implementation does in
terms of data shoogling is this:

[Activity]
\|/
(Java LinkedList which looks a bit like a SC buffer)
http://github.com/glastonbridge/SuperCollider-Android/blob/master/src/uk/co/mcld/dabble/GlastoCollider1/OscMessage.java
\|/
(Interprocess Parcel)
\|/
[SuperCollider Service]
\|/
(Object Array)
\|/
(scpacket)
\|/
[SuperCollider]

I'm not suggesting this is good or bad, it's just a starting point!
IMO I tried to walk the line between high-level structures and low-
level buffers, and didn't really capture the charm of either. You're
free to reuse OscMessage.java if it is any use to PD though.

Alex

Peter Kirn

unread,
May 6, 2010, 10:13:07 AM5/6/10
to supercollider-android-developers
That makes sense to me! I have to take a look at the code and see how
the specifics look. I can't imagine Pd - or anything else - would be
much different, aside from the last step. I do like the idea of doing
something clever with the collection for the OSC message itself;
that's what a lot of the OSC libraries do very inelegantly (to be
generous) currently.

Peter

On May 6, 2:36 am, Alex <glastonbri...@googlemail.com> wrote:
> Never too optimistic!  I don't think the IPC is as heavyweight as (for
> example) the touchscreen thread for GUI interaction, so provided we
> can open enough audio channels to avoid passing byte[]s across IPC, I
> think it's a very viable prospect.
>
> We're not accessing the OSC directly, it's completely Java until it
> hits C++ inside the service.  What the current implementation does in
> terms of data shoogling is this:
>
> [Activity]
> \|/
> (Java LinkedList which looks a bit like a SC buffer)http://github.com/glastonbridge/SuperCollider-Android/blob/master/src...
Reply all
Reply to author
Forward
0 new messages