Pages: [1]   Go Down
Author Topic: MIDI to USB interface  (Read 3009 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

Hello everyone,
How can a MIDI to USB interface (for a keyboard) be made using Arduino ATMEGA 8 board?
Logged

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

Teensy 2.0 uses ATMEGA32U4 and has a reconfigurable native USB port which can be set to be USB-MIDI. Add two DIN sockets, an optocoupler and some resistors for MIDI In and Out, connect these to its USART serial (which is not shared with the USB, unlike official Arduino boards) and you are all set.
Logged

Offline Offline
Edison Member
*
Karma: 33
Posts: 1470
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While it might be fun to make your own, it is probably cheaper to just buy one:
http://www.bulletsandbones.com/GB/Interfaces.html

(Click the "midi only" on the right sidebar.)

Logged

Dublin, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A related question...

I have a relatively new Uno (Rev 3 with Mega 16u2)...
In order to use as a usb device (midi) I need to reprogram the 16u2 yes?

Then, if I want to modify the sketch and want to upload changes, I need to reset the 16u2 code first?

Would this alternative work: (using two unos)
I could program uno A as the usb midi device and use uno B as the programmer for the AMEGA328.. that is upload the new/editerd sketch?

Also...
I just need the new HID library, I don't need a shield of any type?

« Last Edit: November 05, 2012, 06:59:58 pm by MikeOToole » Logged

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

In order to use as a usb device (midi) I need to reprogram the 16u2 yes?
Yes.
Then, if I want to modify the sketch and want to upload changes, I need to reset the 16u2 code first?
Yes, if you want to upload code over USB. Or you could program the Uno using an ISPprogrammer (as you mention, that could be another Arduino). Or you could use an Arduino-compatible that doesn't require you to flash and reflash a USB controller chip all the time, because you simply select the type of native USB device you want from the IDE. (Hence my suggestion of a Teensy, in the post above).
I just need the new HID library, I don't need a shield of any type?
Yes.
Logged

Dublin, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Nantonos... Don't have a credit card so I need to buy everything locally... haven't found a supplier for the Teensy in Ireland... ;(
Logged

0
Offline Offline
God Member
*****
Karma: 26
Posts: 625
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get a Teensy from the Netherlands, using Paypal.

http://www.pieterfloris.nl/shop/category.php?id_category=45

Programming the 16u2 chip is possible, but quite difficult.  With the 16u2, you need to work with non-Arduino software that's quite complex (eg, LUFA) and you can't use Serial.print().

With Teensy, you just select MIDI from the Tools > USB Type menu.  It's just like use an Arduino, except it's a USB MIDI device.  While working on your sketch, Serial.print() still works perfectly fine to the Arduino Serial Monitor, because it emulates a serial channel for you to make things as easy as you'd expect using the Arduino software.
Logged

Berlin / Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"Franky" is currently working on Version 4.0 of his great Midi Library : https://github.com/FortySevenEffects/arduino_midi_library/tree/release/4.0 ... This will enable SoftSerial (so you can use almost any digital pin for Midi on all Arduino Boards) and also USB/Midi is planned / in development ...

greets,
Bruce
Logged

Pages: [1]   Go Up
Jump to: