[PD] communicating with c++ app using OSC

Py Fave pyfave at gmail.com
Wed Mar 11 15:42:11 CET 2015


i have seen this used successfully on c++ side

oscpack -- Open Sound Control packet manipulation library
http://www.audiomulch.com/~rossb/code/oscpack



2015-03-11 8:56 GMT+01:00 Jamie Bullock <jamie at jamiebullock.com>:

>
> Hi Paul,
>
> std::vector doesn't make a good container for OSC messages, as message
> argument  types aren't generally contiguous (a message could be two ints
> and a float, for example).
>
> Instead you need some intermediate data structures to handle argument
> lists, introspecting types from arguments and unpacking values. This is
> what oscpack does:
>
>
> https://code.google.com/p/oscpack/source/browse/trunk/examples/SimpleReceive.cpp
>
> It's straightforward to use and I've found it reliable.
>
> Jamie
>
>
> On Tue, Mar 10, 2015 at 7:42 pm, Paul Keyes <spskeyes at gmail.com> wrote:
>
> If I really want to use OSC is there a simple way to do it?
>
> On Fri, Oct 24, 2014 at 4:10 PM, Miller Puckette <msp at ucsd.edu> wrote:
>
>> Hi Paul -
>>
>> No need to use OSC for this - you can just use "netsend". THere's sample
>> code for receiving from netsend in pd/src/u_pdreceive.c.
>>
>> cheers
>> Miller
>>
>> On Fri, Oct 24, 2014 at 03:21:22PM -0300, Paul Keyes wrote:
>> > Hi,
>> >
>> > I'm sending a list from pd to a c++/liblo app like so:
>> >
>> > [mylist]
>> > |
>> > [list prepend /osc_addr]
>> > |
>> > [list trim]
>> > |
>> > [packOSC]
>> >
>> > ...
>> >
>> > How can I read this list into an array or vector in the c++ app?
>> > There seems to be lots of libraries, I've been testing liblo, but
>> nothing
>> > straightforward for receiving a list.
>> >
>> > Any help is greatly appreciated!
>>
>> > _______________________________________________
>> > Pd-list at lists.iem.at mailing list
>> > UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150311/2ef3c471/attachment.html>


More information about the Pd-list mailing list