LUFA (Lightweight USB Framework for AVRs) is an open-source complete USB stack for the USB-enabled Atmel AT90USBxxxx and ATMEGAxxUx AVR microcontroller series, released under the MIT License.
Darran from Arduino Hacking has released the source, hex files, and sample sketches for his Arduino LUFA hacks for Keyboard HID, Mouse HID, and USB MIDI drivers for the UNO and Mega2560.
I’ve added MIDI IN support to the USB MIDI driver so now the UNO can send and receive MIDI messages from the host PC. The format of the data is the same as that described in the earlier post for the MIDI firmware.
Via Arduino blog.