Pages: [1]   Go Down
Author Topic: Recotana's OSC Library  (Read 1720 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 08, 2009, 03:34:13 am by greatwitenorth » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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++;
Logged

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino Rocks-N-Rolls
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
Logged

Los Angeles, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino Rocks-N-Rolls
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-wink
« Last Edit: October 21, 2010, 01:16:46 am by tep » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

check out:

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

for an updated OSC library for 0021.
Logged

Pages: [1]   Go Up
Jump to: