Both direction midi to osc. Receive midi in Arduino converted to osc message ///// send midi to arduino converted to osc message
Sending / receiving midi on long distance using OSC.
For example, you need to send / receive midi from the theatre stage to the control booth.
-
Arduino I used the Arduino Uno.
-
Arduino ethernet shield I used the official Arduino ethernet shield
-
Arduino midi shield I used the Olimex midi shield : https://www.olimex.com/Products/Duino/Shields/SHIELD-MIDI/open-source-hardware
-
2 Midi cables and ethernet cable
-
Audio card or midi/usb with midi out and midi in (i use m-audio usb/midi)
MIDI.h / Ethernet.h / EthernetUdp.h
And also :
OSSmessage.h
add via in Arduino IDE with Library Manager (not working for me)
or download zip https://github.com/CNMAT/OSC
Then in Arduino IDE : Sketch/Include Library / Add .ZIP library
With Arduino IDE
!!! If you're using OLIMEX MIDI SHIELD, be sure to unplugged the TX/RX jumper on the shield before trying to upload the code on the arduino, then plug back the jumper on the shield.
Connect Arduino with ethernet cable and configure your computer ip's address on ethernet port (2.0.0.101 by default).
If you're using an apple computer
Go to Apple / System Preferences / Network
Connect midi cables, electric plug, ethernet ...
Midi to OSC
convert midi note to osc message /note i i i (note,velocity, channel)
convert midi control change to osc message /cc i i i (value, control change, number channel)
OSC to Midi convert osc message /note i i i (note, velocity, channel) to midi note
convert osc message /cc i i i (value, control change number, channel) to midi control change
To try the communication