[OT] C examples for OSC implementation ?

Jun 27, 2007 at 1:03pm

[OT] C examples for OSC implementation ?

Hello,

We need to talk from our application, in C, to Max, through OSC, but we
can’t find handy samples on how to do this. Just a few tricks on how to
call OSC inside a C code would be cool.

Many thanks in advance.

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

#32648
Jun 27, 2007 at 1:39pm

Moving this message to the Dev forum, please direct your replies to the Dev list.

#107824
Jun 27, 2007 at 1:40pm

I haven’t done this myself, and perhaps you’ve already looked at this, but:

http://www.cnmat.berkeley.edu/OpenSoundControl/

at the bottom of the page: OSC Resources

particularly the source code to sendOSC and dumpOSC

http://www.cnmat.berkeley.edu/OpenSoundControl/src/

as well as

http://www.cnmat.berkeley.edu/ICMC98/papers-pdf/OSC.pdf

http://www.cnmat.berkeley.edu/CAST/Server/CAST-OSC-implementation.html

and

http://www.create.ucsb.edu/mailman/listinfo/osc_dev

Apologies if this is all stuff you’ve already looked at.

Good luck!

-Brian

> —– Original Message —–
> From: “f.e”

> Subject: [maxmsp] [OT] C examples for OSC implementation ?
> Date: Wed, 27 Jun 2007 15:03:33 +0200
>
>
> Hello,
>
> We need to talk from our application, in C, to Max, through OSC,
> but we can’t find handy samples on how to do this. Just a few
> tricks on how to call OSC inside a C code would be cool.
>
> Many thanks in advance.
>
> f.e
> — f.e chanfrault | aka | personal computer music
> > >>>>>> http://www.personal-computer-music.com
> > >>>>>> |sublime music for a desperate people|

>

#107825
Jul 8, 2007 at 10:12am

#107826
Jul 8, 2007 at 2:04pm

Did you actually plan to make a OSC server/client implementation in C in less than a few days without having done preliminary research?

OSC is nothing more (and nothing less) than udp with some format conventions. So first you’ll have to program your udp server/client and then you’ll have to add the parsing for OSC.

Searching around a bit, I guess there are several examples of how to use udp sockets, like

http://www.cs.rpi.edu/~hollingd/netprog/, go to ‘UDP Sockets Programming’, there are code examples.

or

http://sage.mc.yu.edu/kbeen/teaching/networking/resources/sockets.html

or

some osc stuff I did myself, but that’s in Java:

http://avdl1064.oli.tudelft.nl/WFS/

Greets,
Mattijs

Quote: f.e wrote on Sun, 08 July 2007 12:12
—————————————————-
> There’s absolutely no handy doc on berkeley’s site. And we’re on Windows
> (no Linux, no OS9 !). If someone knows how to make a client and a
> server, how to receive simple lists, send them too, it would be so
> simple for us to understand by looking at the few lines of code. We’re
> in a very hurry, and we’re so stucked. Arghhh. It’ll take days to manage
> something while we thought using OSC for its simplicity.
>
> Best wishes
>
> f.e
>

#107827
Jul 8, 2007 at 2:31pm

On 8 Jul 2007, at 15:04, Mattijs Kneppers wrote:

> OSC is nothing more (and nothing less) than udp with some format
> conventions.

Well, really, it’s a generic byte-oriented packet format. It’s
possible to stream OSC over TCP/IP. (I’ve done it.)

Nick Rothwell / Cassiel.com Limited
http://www.cassiel.com
http://www.myspace.com/cassieldotcom
http://www.loadbang.net

#107828
Jul 8, 2007 at 5:48pm

Quote: nick rothwell / cassiel wrote on Sun, 08 July 2007 16:31
—————————————————-
>
> On 8 Jul 2007, at 15:04, Mattijs Kneppers wrote:
>
> > OSC is nothing more (and nothing less) than udp with some format
> > conventions.
>
> Well, really, it’s a generic byte-oriented packet format. It’s
> possible to stream OSC over TCP/IP. (I’ve done it.)

Of course, it’s a convention and you can use it with any network protocol. I did it with tcp/ip too (with flash) but the original idea is that it’d be streaming and real-time, so use with udp is the most logical choice.

Mattijs

>
>
> Nick Rothwell / Cassiel.com Limited
> http://www.cassiel.com
> http://www.myspace.com/cassieldotcom
> http://www.loadbang.net
>
>
>
>
—————————————————-

#107829
Jul 8, 2007 at 10:25pm

#107830

You must be logged in to reply to this topic.