Arduino MIDI to play Garage Band on the iPhone/iPAD

Hi,
I'm building a drum kit and I'm now able to play the sounds on my Windows PC through the Serial to MIDI converter running on the PC.
I would like now to do the same using my iPhone 4 with Garage Band instead of a PC.

Garage Band accepts MIDI-in, and devices like the iRIG Keys mini keyboard is provided with a simple cable to connect the keyboard to the iPhone to play the sounds of any MIDI compatible iPhone app.

I'm wondering why I shouldn't be able to do the same.
I can probably use something like Sparkfun iPOD 30 pins male connector (which pin??), but I don't know what to do on the Arduino side.

Do I need a MIDI Shield?
Is my Arduino UNO USB connector enough?

I'm wondering why I shouldn't be able to do the same.

You can. :slight_smile:

Do I need a MIDI Shield?

No.

s my Arduino UNO USB connector enough?

No the Arduino's USB port is a USB client, that is it will only look like a serial port to any device connected to it.

However the Arduino Leonardo can be made to look like a MIDI port, I would use that along with a Camera interface connector to the iPhone.

Thanks. I'll take a look at Leonardo.
Also, is there a way to avoid even the camera connector and plug directly into the iphone with the 30 pins connector?
I would prefer to build my own interface to the iphone even if that means additional components for Arduino.

I'll take a look at Leonardo

Be sure to check how to make it into a MIDI device, it is possible but I think it might be a bit new at the moment.

is there a way to avoid even the camera connector and plug directly into the iphone with the 30 pins connector?

I would have thought so, yes.
You will need to make up a special lead from the arduino's USB to the right pins on the connector. I don't know off hand what these are numbered.

Grumpy_Mike:
However the Arduino Leonardo can be made to look like a MIDI port, I would use that along with a Camera interface connector to the iPhone.

Is that in 1.0.2, or some newer testing version?

Looking in USBCore.h from Arduino 1.0.2 I see

#define USB_DEVICE_CLASS_COMMUNICATIONS        0x02
#define USB_DEVICE_CLASS_HUMAN_INTERFACE       0x03
#define USB_DEVICE_CLASS_STORAGE               0x08
#define USB_DEVICE_CLASS_VENDOR_SPECIFIC       0xFF

Notice that the Audio class (0x01) is missing. USB MIDI is subclass 0x03 of the Audio class.

Is that in 1.0.2,

No.
It is in code that you write or at least that other people write.

You will need to make up a special lead from the arduino's USB to the right pins on the connector. I don't know off hand what these are numbered.

I found the 30 pins connector map here AllPinouts
I'll give a try.