Go Down

Topic: Recotana's OSC Library (Read 2268 times) previous topic - next topic

nickv

Dec 08, 2009, 09:33 am Last Edit: Dec 08, 2009, 09:34 am by greatwitenorth Reason: 1
I've been playing around with Recotana's OSC library and came across an issue I'm not sure how to solve. Basically the arduino receives an OSC message something like this:

/dmx/1

and of course the value.

When I use:

recMes.getAddress(1);

it returns the second value with the forward slash like this:

/1

How would I get the 1 by itself without the forward slash. I've tried the wstring library with no luck. Plus that's probably not the most efficient way to do this. Is there anyone familiar with the library that they'd know how to modify the code so recMes.getAddress(1) outputs without the forward slash? I tried to look through it but it all seems a little foreign to me. Thanks.

nickv

Looks like I solved my own problem. Replace lines 700-711 from the original OSCClass.cpp (v1.0.1) with the code below. This will output the osc messages without the forward slashes.

           if(adrCount<MAX_ADDRESS){
           //Added this in to remove the slashes out of final output
           if(d!='/'){
           tempAddress[adrCount][adrMesPos]=d;                  
     
           if(packetCount>3)  {
                 packetCount=0;
                 packetPos+=4;
           }
           
           adrMesPos++;
           }
           }
           messagePos++;
           packetCount++;

mpinner

nickv, thanks for replying to your own post;)

im researching all osc arduino options currently and finding open loops all over the last two years.

spacehippy matt pinner

GoodVibrations

@matt, I am also researching this topic and it seems that the most efficient OSC firmware is this http://adrianfreed.com/content/oscuino-arduino-osc-sketch-open-sound-control-work
however it works better on Sparkfun Bitwacker and CREATE USB boards, because there it supports bundles, timing, etc.

mpinner

GoodVibrations, this OSCuino looks very promising. I cannot wait to try it out thanks!

bioactive712

hey guys..
i need some help with this library..
i cant compile it..
no example..
i fix the spi.h problem.. but after that i get a thousand errors...
i use arduino 0019

any help would be appreciated

tep

I'm sorry to say that but you probably need to use Arduino 18 (as I do) for the library while waiting for an update.

bioactive712

i downloloaded the 17 version and it compiled..
i have the touch osc app on my iphone and cannot find out if something works or not...
i'm really noob on the osc part
any ideas?

tep

#8
Oct 21, 2010, 08:16 am Last Edit: Oct 21, 2010, 08:16 am by tep Reason: 1
Begin with the examples, modify and put together some to do what you need and you will progressively understand it and be able to do everything by yourself. But take your time. ;)

nickv

Does anyone know of a working OSC library for the latest arduino release (0021)? If not maybe I'll have to figure out how to write one and see what happens.

tep

I'm currently using Arduino 018 just for this excellent library, waiting for an update.

nickv

check out:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1290828691

for an updated OSC library for 0021.

Go Up