Pages: [1]   Go Down
Author Topic: serial to osc  (Read 1651 times)
0 Members and 1 Guest are viewing this topic.
Birmingham, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 29, 2013, 02:46:45 pm by Grumpy_Mike » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Jut look at that link.
Logged

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

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
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


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

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

Pages: [1]   Go Up
Jump to: