Pages: [1]   Go Down
Author Topic: Arduino MIDI to play Garage Band on the iPhone/iPAD  (Read 1235 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,
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?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34122
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm wondering why I shouldn't be able to do the same.
You can.  smiley
Quote
Do I need a MIDI Shield?
No.
Quote
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. 
Logged

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

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34122
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
#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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34122
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is that in 1.0.2,
No.
It is in code that you write or at least that other people write.
Logged

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

Quote
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 http://www.allpinouts.org/index.php/Apple_iPod,_iPad_and_iPhone_dock
I'll give a try.
Logged

Pages: [1]   Go Up
Jump to: