<div dir="ltr">If you're already using liblo (which is a great library BTW), you don't need oscpack. They both work with OSC.<div><br></div><div>I think you're missing some understanding on the fundamentals of OSC. An OSC message has an address and a number of arguments, so a "list" in OSC will just be a message with that number of arguments. To read them out in C++ with liblo (or pretty much any other OSC library), you get the message and check that the address is what you expect, check the number of arguments, and for each argument, you check the type (int, float, stirring, etc), and then pull the actual value as the type you want out. Basically something like this in pseudo C++ :</div><div><br></div><div>if (message.address == "/expected/path" ){</div><div> </div><div>  vector<float> list;</div><div>  for( int i = 0; i < message.numArguments; ++i) {</div><div>  </div><div>    if (message.argumentType(i) == FLOAT) {</div><div><br></div><div>      list.push_back(message.argumentAsFloat(i))</div><div><br></div><div>   }</div><div>}</div><div><br></div><div>liblo is a C library and what I wrote above is more applicable to oscpack which uses classes, but the liblo function calls do exactly the same thing. Also, you can check agains the type string as well which has 1 char per type aka sending a message for pd like "/hello" 1.2 2.3 4.5 will have the types string of "fff" for 3 float arguments.<br><div class="gmail_extra"><br></div><div class="gmail_extra">On a related point, I have a C++ wrapper liblo library that makes it work like oscpack :D <a href="https://github.com/danomatika/oscframework">https://github.com/danomatika/oscframework</a></div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">---------- Forwarded message ----------<br>From: Py Fave <<a href="mailto:pyfave@gmail.com">pyfave@gmail.com</a>><br>To: <br>Cc: "<a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>" <<a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>><br>Date: Wed, 11 Mar 2015 15:42:11 +0100<br>Subject: Re: [PD] communicating with c++ app using OSC<br><div dir="ltr">i have seen this used successfully on c++ side<br><br>oscpack -- Open Sound Control packet manipulation library<br><a href="http://www.audiomulch.com/~rossb/code/oscpack" target="_blank">http://www.audiomulch.com/~rossb/code/oscpack</a><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-11 8:56 GMT+01:00 Jamie Bullock <span dir="ltr"><<a href="mailto:jamie@jamiebullock.com" target="_blank">jamie@jamiebullock.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>Hi Paul,<div><br></div><div>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). </div><div><br></div><div>Instead you need some intermediate data structures to handle argument lists, introspecting types from arguments and unpacking values. This is what oscpack does:</div><div><br></div><div><span style="line-height:1.7"> <a href="https://code.google.com/p/oscpack/source/browse/trunk/examples/SimpleReceive.cpp" target="_blank">https://code.google.com/p/oscpack/source/browse/trunk/examples/SimpleReceive.cpp</a></span></div><div><br></div><div>It's straightforward to use and I've found it reliable.</div><span><font color="#888888"><div><br></div><div>Jamie</div></font></span><div><div><div><br></div><div><br><div><div style="color:rgb(0,0,0)">On Tue, Mar 10, 2015 at 7:42 pm,  Paul Keyes <<a href="mailto:spskeyes@gmail.com" target="_blank">spskeyes@gmail.com</a>> wrote:            <div style="overflow:visible"><blockquote style="color:rgb(48,59,64)"><div dir="ltr">If I really want to use OSC is there a simple way to do it?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 24, 2014 at 4:10 PM, Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Paul -<br>
<br>
No need to use OSC for this - you can just use "netsend".  THere's sample<br>
code for receiving from netsend in pd/src/u_pdreceive.c.<br>
<br>
cheers<br>
Miller<br>
<div><div><br>
On Fri, Oct 24, 2014 at 03:21:22PM -0300, Paul Keyes wrote:<br>
> Hi,<br>
><br>
> I'm sending a list from pd to a c++/liblo app like so:<br>
><br>
> [mylist]<br>
> |<br>
> [list prepend /osc_addr]<br>
> |<br>
> [list trim]<br>
> |<br>
> [packOSC]<br>
><br>
> ...<br>
><br>
> How can I read this list into an array or vector in the c++ app?<br>
> There seems to be lots of libraries, I've been testing liblo, but nothing<br>
> straightforward for receiving a list.<br>
><br>
> Any help is greatly appreciated!<br>
</div></div></blockquote></div></div></blockquote></div></div></div></div></div></div></blockquote></div></div></blockquote></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Dan Wilcox</div><div>@danomatika<br><a href="http://danomatika.com" target="_blank">danomatika.com</a><br><a href="http://robotcowboy.com" target="_blank">robotcowboy.com</a></div></div></div>
</div></div></div>