Pages: [1] 2   Go Down
Author Topic: Leonardo direct MIDI USB  (Read 11809 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all!
I was using the hacked FTDI drivers / roland serial MIDI drivers to have old arduino (duemilanove) show up as MIDI port, and send/receive data directly from ableton withouth having further converters,
i saw that now Leonardo has been released! Would it be possible to use this board to have Arduino <=> Ableton Live communicate directly via MIDI over USB or i would need additional software converters ?
Thanks in advance!
Logged

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

Hi!

yes it is possible, and I am very interested in this topic also. Please read: http://hifiduino.wordpress.com/2011/09/30/arduino-leonardo/, you can see that the new Arduino supports USB-HID class (HID=Human Interface Device), and in this class cathegory you will not need any driver on your computer, it will use the default one for MIDI.

The big step ahead of leonardo is that the USB interface-protocol is fully programmable, hence your Leonardo can act as USB mouse, keyboard, MIDI, as well as USB storage or USB-serial converter.
The big problems is that you need to have a USB protocolstack running on Leonardo, and for me it is not yet clear how to do it. I have had a look at the following stacks:
- LUFA
- AVR USB Stack
- Teensy
- FreakUSB

but I wanted something where the source code is simple and clear to understand (I want to learn some USB internals). I am looking into this direction...

Best,
Y.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks a lot so it was like i was thinking, it could be done but no one has already come out with an easy to understand and working tutorial smiley
I will try to learn something from the stacks you have mentioned, and report here any news! thanks again and good luck !
Logged

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

Another interesting software is V-USB (http://www.obdev.at/products/vusb/index.html), which provides an USB stack and also an emulation of the USB physical layer using the old Arduino I/O ports.
Maybe the code can be changed so that instead of using the I/O ports, we configure directly the USB HW interface of Leonardo, in order to let Leonoardo to take care of the physical layer.

I am sorry if something is not precise, there is big confusion/lack of docs/explained code for the new USB capability of leonardo...

Y.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ones I would put my hope to are:

Moco: http://morecatlab.akiba.coocan.jp/lab/index.php/aruino/midi-firmware-for-arduino-uno-moco/?lang=en
and 
HIDUINO: http://dimitridiakopoulos.com/hiduino github: https://github.com/ddiakopoulos/hiduino

They are both based on LUFA.

.kris
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Rubble rubble rubble....
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

from morecatlab:
Quote
Moco firmware can use as USB-MIDI <-> USB-Serial bridge with a 8u2 or 32u4 board, like Adafruit’s 32u4 breakout board.

and:
Quote
The Arduino Leonardo is a microcontroller board based on the ATmega32u4


I tried the MocoLUFA on an Arduino UNO R1 and it worked well
While R3 has the Atmega16U2 chip, the Leonardo seems like the best solution for me.
I'll try in a few days and post my results.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino is power for the DIY projects
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi, I am also looking into using the leonardo to be a midi input for my ipad or a midi output using a custom drum kit.
So far no luck to get the usb midi code for the leonardo, any help would be appreciated.

Thanks
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Rubble rubble rubble....
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No luck over here as well...Flip doesn't recognize the 32u4 for some reason  smiley-confuse
I'm quite disappointed with the Leonardo, and would love to have my 8u2 uno back on stores.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Rubble rubble rubble....
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW you could always use this: http://projectgus.github.com/hairless-midiserial/#downloads

What's nice about it, is that its both for Windows and for mac, so you could develop your projects on windows, but run them on mac too.

And for now, Teensy has an onboard MIDI driverm which makes it better than the Leo. for this usage.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino is power for the DIY projects
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the hint I will try with a teensy 2.0
Logged

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

Unfortunately, to add support for MIDI you have to hack in the Arduino core files. I've hacked in a MIDI-USB implementation in an alternative set of core files, which is available at https://github.com/rkistner/arcore. The MIDI-USB protocol is fairly simple (once you get around the USB interface descriptors), and the implementation is quite similar to CDC (I based my implementation off that).

In the long run it might be better if we could use an existing stack with MIDI support, but it seemed complicated to replace Arduino's USB stack with another one.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Rubble rubble rubble....
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks interesting
Might try it sometime
Logged

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

interesting but i ask now,i know can do but how (im newbie)
leonardo or uno who have better thats ?
i need 32 button interface hid interface
8 analog inbut and 16 encoder inbut.
how make hid interface to have all thats ?
ino to in arduino, what more need ?
i understand leonardo have hid ready board no need change bootloader, and uno no have hid compatiple need bootloader new write.

and hid device can adding 32 button, 16 encoder,8 analog inbut.
but how smiley-sad
i need only buttons and encoders my computer.
analog can take old joystick.mean usb board if need,
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Rubble rubble rubble....
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This thread is about MIDI
Please don't add unrelevant information
Logged

Offline Offline
Sr. Member
****
Karma: 8
Posts: 250
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is interesting topic.

i have made a midi controller with Uno R3 about one year ago (http://popo.webatu.com/) and now i'm starting to think about building some kind of midi Foot Controller.
I don't know much about electronics or programming and i had A LOT of help here from the forum to complete this last project, but it was also a great way to learn by doing.

The thing is that needing a serial to midi converter is a little bit annoying. It works, but there are some inconveniences (like for instance, not everyone has Processing and a Serial do Medi Converter Sketch).

So, when i heard that Leonardo had native ubs hid i was excited about it.

But now when i have read your thread i was a little bit less enthusiastic.
Is it not so easy to use the Leonardo to create a "Plug and Play" device?
If i would wrote a sketch that works on Uno R3 would it also work on a Arduino Leonardo?

My idea is to create a foot controller with maybe 8+2 foot switches, maybe 4 "banks" and some LEDs to use with softwares like Ableton.
Would you say that Leonardo would be better than Uno R3?

Thank you!
Logged

Pages: [1] 2   Go Up
Jump to: