Go Down

Topic: serial to osc (Read 2025 times) previous topic - next topic

Hello guys, I would like to ask about which is the most convenient library or any other software component for making the a board to send OSC messages within the same computer. Basically I am up to connect couple of sensors to an Uno board and then to send their OSC data via the board into SuperCollider. I've searched a couple of ways, some of them are basically consisted by some libraries for OSC and Arduino or sending the data into Processing and then to SC as OSC messages.

Thanks
K.

Headroom

If this is the most convenient way I cannot answer, however, you can sent OSC directly from an Arduino Board to a PC via ArdOSC.

You need to equip your Arduino with an Ethernet card as OSC uses the UDP protocol.
You can also do this per WiFi by connecting a little pocket router o the Ethernet Shield. ive done this in two set- ups. While you may be tempted to use a WiFi shield, don't do it!
I believe the only WiFi shield this may work with is the WiFly from Sparkfun.
http://trippylighting.com

http://ledshield.wordpress.com/

oigresUPM

Hey I want to do the same stuff! I want to control a virtual instrument of Ableton Live with 4 sensors with OSC protocol... So is it totally necessary to use another device in your arduino board? via USB? And you said Kostantinos about sending the data to Processing, how does it work??
Thank!!

Grumpy_Mike

Simply send the data to processing using serial,, once in processing have it sent out as OSC. There are plenty of examples on the processing sight.

oigresUPM

YEp! Thanx! I've got my data now in Processing! Now I have to transform to OSC! Thanks again!

Grumpy_Mike

#5
Feb 07, 2013, 10:22 pm Last Edit: Apr 29, 2013, 09:46 pm by Grumpy_Mike Reason: 1
Quote
Now I have to transform to OSC]Now I have to transform to OSC

Have a look at some of my processing OSC programs.
http://www.thebox.myzen.co.uk/Mac_Apps/Processing.html

slimus


Simply send the data to processing using serial,, once in processing have it sent out as OSC. There are plenty of examples on the processing sight.


I need to do same thing, how ?
i receive serial data from Arduino  and i want to send OSC message to another software in the same computer.

Grumpy_Mike

Jut look at that link.

adrianfreed

Thanks for your interest in OSC.
My group has just released the most feature-rich library of OSC for the Arduino and variants.
It addresses UDP and serial encodings.

You will find Processing and Max/MSP and PD examples as part of the library demos.
http://cnmat.berkeley.edu/oscuino

Grumpy_Mike

I have tried that and while I can get the arduino to send stuff to PD, I can't get PD to send anything back. The arduino is recieving a message as I can see the RX light blink but I can't get the serial read example to light the led.
Anything I need to change on the PD send side, I am sure it is not sending the "right message" for the simple read example.

Grumpy_Mike

I have solved it!

The problem was that the SerialOscRead example was looking for OSC bundle messages. Where as the SerialOscuino from PD was sending OSC messages.

There are no receive examples for just simple messages in the examples folder of the OSC library. What I had to do was simply change:-
OSCBundle to OSCMessage
and now the SerialOscRead now worked with the PD patch.

I hope it will be useful to someone else in the future.

Headroom

Yup. I've come across the same problem when trying to connect TouchOSC to an Arduino ( well actually it was a Teensy3).
TouchOSC only receives and sends OSC messages and not OSC bundles.

Also, the library had a memory leak that had me scratch my head for a while but has been fixed in the meantime. You may want to download a fresh copy from The OSCuino GitHub site.
http://trippylighting.com

http://ledshield.wordpress.com/

GoodVibrations

I route the OSC from the serial to the network stack using Python.
There is a script for this availabe at http://cnmat.berkeley.edu/system/files/attachments/uosc-1.04_0.zip
Currently I am thinking of using netcat in Linux, which would probably reduce the latency introduced by running through Python. I think it should be possible.

Go Up