Pages: [1]   Go Down
Author Topic: Communication Arduino/MIDI Software  (Read 2287 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-confuse
 

  Here is my test sketch :

Quote
//  *****************************************************************************************************************
//  *                                                                                                               *
//  *                                         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  smiley. Thanks in advance !
Logged

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

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
http://sourceforge.net/projects/arduinomidilib/
http://sourceforge.net/projects/arduinomidilib/files/Releases/
Please let us know if success.
Good luck
Logged

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

Try taking a look into Firmata for that kind of communication. Also for interfacing with Ableton Live http://www.maxuino.org/getting-started Maxuino is awesome. It does require Max for Live and Max MSP, but it works well.
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 147
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
This couldn't be your ad.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

There is no blueprint for life, blueprints are for architects!

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

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

Pages: [1]   Go Up
Jump to: