Communication Arduino/MIDI Software

Hi everybody !

I would like to make an electronic drum kit but I have problems to send MIDI data from my Arduino Uno REV3 to some MIDI software like Ableton live, Fruity Loop or Guitar pro.
I tried to use Serial-midi converter and s2midi to convert serial data from my arduino to MIDI data with MidiYoke/Loopbe1 to create a virtual MIDI port.

I tried to configure different Baud Rate (31250, 57600), but my software does not receive data, except Fruity Loop which detect a MIDI input activity in green (unhandled). So it is impossible to get a drum sound :~

Here is my test sketch :

// *****************************************************************************************************************
// * *
// * SpikenzieLabs.com *
// * *
// * Very Simple Serial to MIDI DEMO *
// * *
// *****************************************************************************************************************
//
// BY: MARK DEMERS
// May 2009
// VERSION: 0.1
//
// DESCRIPTION:
// Demo sketch to play notes from middle C in the 4th octave up to B in the 5th octave and then back down.
//
//
// HOOK-UP:
// 1. Plug USB cable from Arduino into your computer.
//
//
// USAGE:
// 1. Install and Set-up Serial MIDI Converter from SpikenzieLabs
// 2. Open, compile, and upload this sketch into your Arduino.
// 3. Run Serial MIDI Converter in the background.
// 4. Launch your music software such as Garage Band or Ableton Live, choose a software instrument and listen to the music.
//
//
// LEGAL:
// This code is provided as is. No guaranties or warranties are given in any form. It is up to you to determine
// this codes suitability for your application.
//

int note = 0;

void setup()
{
Serial.begin(57600); // Default speed of the Serial to MIDI Converter serial port
}

void loop()
{

for(int note=60; note<=83; note++) // Going Up
{
MIDI_TX(144,note,127); // NOTE ON
delay(100);

MIDI_TX(128,note,127); // NOTE OFF
delay(100);
}

for(int note=82; note>=61; note--) // Coming Down
{
MIDI_TX(144,note,127); // NOTE ON
delay(250);

MIDI_TX(128,note,127); // NOTE OFF
delay(250);
}

}

void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)
{
Serial.write(MESSAGE);
Serial.write(PITCH);
Serial.write(VELOCITY);
}

I think I need some help :). Thanks in advance !

Hi! I have the same issue. I am a newbie with electronics and I depend on someone's shared project who's taking care of future update of code based on this latest update concerning MIDI Library...
http://arduino.cc/playground/Main/MIDILibrary

Please let us know if success.
Good luck

Try taking a look into Firmata for that kind of communication. Also for interfacing with Ableton Live Getting Started – Maxuino Maxuino is awesome. It does require Max for Live and Max MSP, but it works well.

You do not need Serial to MIDI converter. Arduino UNO can send MIDI via USB direct to your computer.
Or Arduino could be used as standalone MIDI device. Just build a MIDI OUT to your board. Then use MIDI to USB adapter to get MIDI into your computer. All apps should see this.
Google=arduino usb midi =plenty of info there.

Hello, sorry for the eternity to answer but I have a lot of projects in parallel.

First, I prefer a software solution even if I am sure that the hardware one works well.
I tried to use the Firmata protocol with the associated PureData patch : it works but I did'nt manage to send MIDI data because the patch is already complicated.

I have also tried with a simple PureData patch using "comport" to receive datas from arduino (Serial.print()), and which send MIDI datas : I receive an integer from the arduino which is translated in a velocity/note value, or both if some sort of coding is used. The patch works but there is some big latency.

When you're using MidiYoke you have to set it to 2 ports. You can find the settings in the control panel. After selecting the right ports in both the Midi-serial converter and whatever software you're using it should work. Also you need to use 57600 baud, otherwise it won't work. The MIDI library also needs to be altered to use 57600 baud too if you want to use it.
It's always kind of fidgety to get it up and running, so don't get frustrated if it doesn't work right away!

You might take a look at the Hairless MIDI Serial Bridge. This software is open source, does not require a USB reprogram effort and has an excellent latency reduction algorithm. The URL is:

http://projectgus.github.com/hairless-midiserial/