Organelle with Arduino?

Have anyone tried using Organelle with Arduino yet? I want to add an Arduino to get more screen feedback and essentially want to do this:

Connect a small nice screen and have extra information there for my patches.

I havenā€™t yet, but I am planning to have a Teensy connected to my Organelle. Still need to figure out exactly what I would want it to add that PD canā€™t do. Extra controls are a definite good + easy one to add.

I have done this successfully with Raspi it should work with a simple install --to use with pd you will need comport objects and others i will look up and share later

Id personally do the comms with Arduino straight over midi.
its personal not quite as fast as serial, due to a bit of protocol 'bagageā€™
but its easier to program, test, and more flexible (e.g. use other hosts)

( you can use sysex for bulk msgs, e.g. to drive lcds, as has been done on numerous devices include Push1/2)

do you have a specific reason to want to use serial over usb?
(id probably use serial if i had access to uart pins on the organelle, to save a usb port, but we donā€™t.)

Cool! What I would like to do is pass on messages to a screen and maybe read a controller or two from the Arduino.

To create sort of a extended Organelle if you want.
Say that I make a setup that consist of Organelle, Arduino and a Monome for example.
Then I could use the screen and knobs on the Organelle itself to control a part of my Pd patch, and another part controlled by Monome + Arduino with a small screen on the Arduino to show me information about that part of the patch.
Ultimatly I would love to do as much of the patching in the Organelle as possible and have the arduino be kind of a ā€œdumbā€ message viewer + controller. This way I could use the Arduino for many different patches without having to use different code on the Arduino pr patch.

The smartest way to do this I have no idea. The Push works really nicely!
It would also be great if the same Arduinocode that I use with PD and the Organelle could be used when plugging the Arduino into my Mac using it with Max for Live.

A screen like this: http://i.ebayimg.com/images/i/321923408888-0-1/s-l1000.jpg

it would beā€¦ thats the great thing, its just midiā€¦ so you can hit it from anything that can talk midi.

with arduino you use the standard arduino library

this has read() which gives you the 4 bytes of the midi messageā€¦ (midi over usb is always 4 bytes :slight_smile: )
sysex is slightly ā€˜differentā€™ in that they are split into 4 bytes messages, with special start and end identifiers, but this is all clearly explained in the USB midi protocol documentation.

you might even find, there are some wrappers around the arduino library to make it a bit simpler for you, e.g. with callbacks, where you get the message decoded as arguments.
(though its not hard to do it yourself)

MIDIUSB only works on a select few Arduino boards. Teensy has native support for USB MIDI on all Teensy boards. MIDI will be the easiest for sure, but you will have to lower resolution for analog inputs a good amount.

OSC is also a possibility and fairly easy to get working. The Organelle already has the OSC objects included (just needs comport from the pd-extended collection), and Arduino can use the OSC library. Here is an example that controls a neopixel shield from Pd. It includes a Pd patch and Arduino sketch.

OG_LEDs.zip (4.4 KB)

1 Like

Midi supports 14bit resolution, thatā€™s more than enough in most cases ā€¦ or if you want even higher use relative rather than absolute encoding.

how much accuracy does that give? I found i needed comport because i was bringing in CV and with comport i got 1024

1024 = 10 bit ,
so midi 14 bit is more than enough.

Osc can do 16 or 32bit , and is more efficient.
i actually prefer it to midi, but osc support can be patchy in some apps.
Itā€™s great if you write both ends of the wire, better namespacing and typing :slight_smile:

@oweno is slip serial over USB supported on OS X?
( which is I assume the proposal for transport)

Sure, I use this exact patch on a Mac. the [comport] object is just sending raw bytes (using usb serial driver), the SLIP framing is done in Pd. Just make sure the baud is a standard one and below 115200.

1 Like

i guess what i need to do is find a midi shield for the raspi then i can kill it with some midi then
Comport was basically copy/paste the code and attach 6 lines to a sig~ object though and the arduino minis were like 3$ each