Author Message

<  extend  ~  ofxOsc v0.3 now available

PostPosted: Thu Aug 07, 2008 2:00 pm
User avatarJoined: Fri Jul 04, 2008 9:31 amPosts: 414Location: Vienna, Austria
hey,

ofxOsc v0.2 is available here:
http://www.frey.co.nz/projects/ofxosc

i've updated it to include bundle support (only for sending - bundles are automatically and transparently unwrapped into their component messages on receive). i've also changed the hostname argument on setup() to a std::string (rather than a const char*). and, lastly, i've added a clear() method to ofxOscMessage so you can reuse the same message object when sending.

have a look at examples/oscSendExample/testApp.cpp for an example of bundle creation and sending - basically you just go like this:

Code:
ofxOscBundle b;

// make message
ofxOscMessage m;
m.setAddress( "/bundle1" );
m.addIntArg( 3 );
// add to bundle
b.addMessage( m );

// and repeat
m.clear();
m.setAddress( "/bundle2" );
m.addFloatArg( 5.5f );
// add to bundle
b.addMessage( m );

// make nested bundle
ofxOscBundle nested_b;
m.clear();
m.setAddress( "/bundle3a" );
m.addStringArg( "nested bundle test" );
nested_b.addMessage( m );
m.clear();
m.setAddress( "/bundle3b" );
m.addStringArg( "test2" );
nested_b.addMessage( m );

// add to outer bundle
b.addBundle( nested_b );

// send
osc_sender.sendBundle( b );


any bugs, problems, let me know.


Last edited by damian on Mon Jan 12, 2009 9:53 pm, edited 1 time in total.


_________________
damian stewart | skype: damiansnz | damian [at] frey [dot] co [dot] nz
frey | live art with machines | http://www.frey.co.nz
Offline Profile
PostPosted: Thu Aug 07, 2008 4:25 pm
Joined: Thu May 15, 2008 7:52 amPosts: 192Location: California
Great damian!

I'll definitely be using this within the next couple days! I really appreciate you adding the support for bundles. =)



_________________
Website - http://sethsandler.com
Twitter - http://twitter.com/SethSandler
Linkedin - http://www.linkedin.com/in/sethsandler
techsparked - http://techsparked.com/users/seth
Offline Profile
PostPosted: Fri Aug 08, 2008 2:59 pm
Joined: Wed Feb 13, 2008 9:42 pmPosts: 13Location: Amsterdam
Damian you rock!

David and myself are currently hard at work on a follow-up piece (called Swarm) of our 'Wixel Cloud' light sculpture. Check out these links for info and experiments:

Wixel Cloud (3d physical light sculpture made out of 75 wixels):
http://blendid.nl/wixelcloud/
Video of the piece at Vimeo:
http://www.vimeo.com/1344159
Wixels - Our wireless pixels (wirelessly controlled, physical pixels):
http://blendid.nl/wixels/

I spotted Dinne's question on OSC bundles on the forum the other day.
http://www.openframeworks.cc/forum/viewtopic.php?p=4777#4777
(Dinne and the other guys @ http://bluemelon.nl are helping us out with the hardware design - and since we're going to scale up to 500 wixels for our next piece, bundles are a very cool (and in our case vital!) feature to have). Great to see your update arrive in such an amazingly short time - wow!

Swarm will be part of an interactive light-art exhibition in Eindhoven coming September. So our new wixel hardware is going to be fully assembled very soon and i'm eager to see the new OSC code at work!

Thanks a bundle! :D
-Tim


Offline Profile
PostPosted: Fri Aug 08, 2008 6:16 pm
User avatarJoined: Fri Jul 04, 2008 9:31 amPosts: 414Location: Vienna, Austria
that's because i'm awesome. ;-)

i'm going to be out of the Netherlands in September unfortunately, otherwise i'd so be there. oh well..

i just quit my job making Flash websites, but that means i'm running out of money. does someone want to give me a job?



_________________
damian stewart | skype: damiansnz | damian [at] frey [dot] co [dot] nz
frey | live art with machines | http://www.frey.co.nz
Offline Profile
PostPosted: Fri Oct 10, 2008 2:18 pm
Joined: Fri Mar 02, 2007 9:38 amPosts: 74Location: stockholm
Hi Damian,

Thanks for a sweet lib. Is it possible to see which IP sent the OSC message? How? If not would it be easy to implement?

cheers
/cj


Offline Profile
PostPosted: Fri Oct 10, 2008 6:01 pm
User avatarJoined: Tue May 27, 2008 10:03 amPosts: 691Location: London, UK
Yea being able to distinguish senders would be ace... I'd vote for this too...


Offline Profile
PostPosted: Mon Jan 12, 2009 9:05 pm
User avatarJoined: Fri Jul 04, 2008 9:31 amPosts: 414Location: Vienna, Austria
hmm, should've put a watch on this thread, i somehow missed this feature request..

hold tight, 0.03 coming soon, with much more relaxed message parsing (no more assert() crashes if you try and get the wrong argument type - now it just coerces the input type to the requested type).

sooooon...



_________________
damian stewart | skype: damiansnz | damian [at] frey [dot] co [dot] nz
frey | live art with machines | http://www.frey.co.nz
Offline Profile
PostPosted: Mon Jan 12, 2009 9:56 pm
User avatarJoined: Fri Jul 04, 2008 9:31 amPosts: 414Location: Vienna, Austria
all right, v0.3 is up, available at http://www.frey.co.nz/projects/ofxosc.

- i've made it much more forgiving when there's a type mismatch. before it threw an exception if you tried to get a float pointer as an int or vice versa - now it prints a warning to stderr and tries to convert to the proper format (even works for getting a float as a string).

- the message.getAddress() now returns a string rather than a char* - this will cause existing code that uses strcmp( m.getAddress(), "pattern" ) to break, you'll have to go strcmp( m.getAddress().c_str(), "pattern" ) instead, or just use m.getAddress() == "pattern" instead.

- you can get the remote ip and port by calling m.getRemoteIp() (returns string) and m.getPort() (returns int).

please try it out and let me know what you think.

cheers
d



_________________
damian stewart | skype: damiansnz | damian [at] frey [dot] co [dot] nz
frey | live art with machines | http://www.frey.co.nz
Offline Profile
PostPosted: Mon Jan 12, 2009 10:49 pm
Joined: Mon Jun 02, 2008 8:24 pmPosts: 409Location: Kiel - Germany
kool. I will use this for my next ofxTuio update even though that might take some more time since I am busy right now.


Offline Profile
PostPosted: Tue Jan 20, 2009 6:40 am
Joined: Wed Oct 01, 2008 3:16 amPosts: 9Location: NY
hi Damian, hi guys,

Im still a bit new with OF and how to communicate between other platforms,
Im interested in working with MAX and OF since I havent seen much audio libraries in OF yet.. but anyway my question is the following:
I tried to test the example of the ofxOsc but I couldnt .. it shows a window with an error.. just one error that drives me crazy:
Image
if anybody knows why would be great
thanks for all!



_________________
Eduardo Menendez
Offline Profile
PostPosted: Tue Jan 20, 2009 10:19 am
Joined: Sat Jul 14, 2007 9:39 amPosts: 8
Damian, thanks for your work on this.

Receiving OSC messages in OF is working beautifully with your library, but I'm having trouble sending messages with 0.3.

The following chunk never gets the message where it needs to go. The code compiles without warning or errors.

Code:
ofxOscMessage mout;
mout.setAddress( "/wii/forcefeedback" );
mout.addIntArg( 1 );
sender.sendMessage( mout );


Once the above is invoked, the following message ends up in the system console after a 5 - 10 second delay:

"OSC Problem: Bad size count 469762048 in bundle (only 28 bytes left in entire bundle)."

This seems like a very large bundle for a single integer? Is it possible that instead of sending the message just snowballs into a larger bundle — explaining the delay before the error registers in the system console?


Offline Profile
PostPosted: Mon Feb 09, 2009 8:20 pm
Joined: Thu Feb 05, 2009 8:01 pmPosts: 14
Is there a library file for code:blocks? I'm getting a lot of errors with the other win32 libraries. I've tried .a and .lib so far.

Thanks,


Offline Profile
PostPosted: Mon Mar 23, 2009 9:31 am
User avatarJoined: Wed Sep 10, 2008 9:06 pmPosts: 22Location: Paris - France
hey guys!

ofxOSC looks really amazing but I'm having the same problem as popa2k with CB on windows :(
I even tried a self-compiled lib from the last version of oscpack I found on the website but CB keeps failing during the linking!

Any idea why?

thanks!
kikko



_________________
http://www.kikko.fr
Offline Profile
PostPosted: Mon Mar 23, 2009 11:21 am
User avatarJoined: Sat Feb 21, 2009 3:07 pmPosts: 26Location: denmark
i'm using it with no problems on os x ... i set xcode to use gcc 4.2 and not the default 4.0



_________________
http://3xw.ole.kristensen.name/
Offline Profile
PostPosted: Mon Mar 23, 2009 3:32 pm
Joined: Sat Dec 20, 2008 1:01 amPosts: 49Location: geneva.ch
Hi,

I managed to get it to compile on XP with CodeBlocks. I was using OF v 0.0573, I don't know if that might be an issue?

best regards

david


Offline Profile

Display posts from previous:  Sort by:

All times are UTC
Page 1 of 2
25 posts
Go to page 1, 2  Next
Users browsing this forum: No registered users and 3 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron