USBMIDIKliK : dual mode USB MIDI converter based on the last LUFA library

Hi Arduino freaks,

Around many MIDI projects, i have built a MIDI USB converter on top of the last 2017 LUFA library from Dean Camera.

Again, you think ? Yes for sure. But It uses interrupts and ring buffers to ensure that (fast) USB to (slow) midi transfers are reliable, plus a "more transparent as possible" midi parser.
MIDI device name is integrated in the makefile, so easy to change.

First inspiration came from HIDUINO and MOCOLUFA projects. Thanks to them.
Despite the very good work done on these projects, i was facing some issues...
An heavy MIDI traffic was blocking the serial, and some MIDI messages were purely ignored by the parser, like the song pointer position for example... more, these projects rely on a quite old version of the LUFA library.

You can check, download and test here : GitHub - TheKikGen/USBMidiKliK: A robust USB MIDI Arduino firmware, with a dual bootloader, based on the LUFA library
An HEX file is available on the root dir waiting your upload...
Have fun !

Hi again,
I have posted a new topic "Arduino midi musical instrument has volume problem in midi editing software".

Could the problem I have outlined in my post be a case of as you say " Heavy traffic blocking the serial".
If so do you think your MIDI USB converter could cure this problem?

Cheers

HI. Maybe that could solve your issue. My converter uses ring buffers and the 2017 version of the LUFA library. Traffic issues are more often from USB to serial direction...

The best way is to test it...You can download the hex file on the Gigthub repository.

:astonished: :astonished: :astonished:
GREAT !!!
Perfect work!!! all included in atmega16u2...and now is a normal Midi Interface....if any want, inside the default sketch, can put controllers or key and expand interface.

I have tested with Cubase, Midi-OX (send sysex patch/banks), Midi Quest Pro for Roland D-10 bank editor(not need because i use all VST plugins actually, but ok).

I dont know what made with Midi Library, i can send notes/messages from Roland to PC , but none go back from PC to Roland...documentation is very poor about MIDI_CREATE_CUSTOM_INSTANCE...so i see RX led flash on arduino when a note/message incoming from PC, but mesage dont reach Roland keyboard.

So thanks very much TheKikGen for the work !!!

I have already created a Midi controller for Guitar Rig 5 a few years ago using Hiduino. That thing worked great, I even included a whammy pedal to it using a proximity sensor if I remember correctly. Now I want to use your firmware. I compiled and uploaded it to my 16u2 Arduino Mega. But from that point on, I am clueless of where to dig next... I mean, as far as I recall, Hiduino simply took care the communication but I was using the Midi Library in my sketch to tell it what to do. Is it still the case with USBMidiKlik? How about the parser? Can you please provide any more info or a sketch to get me going?

Thanks in advance.

The_Greek:
I have already created a Midi controller for Guitar Rig 5 a few years ago using Hiduino. That thing worked great, I even included a whammy pedal to it using a proximity sensor if I remember correctly. Now I want to use your firmware. I compiled and uploaded it to my 16u2 Arduino Mega. But from that point on, I am clueless of where to dig next... I mean, as far as I recall, Hiduino simply took care the communication but I was using the Midi Library in my sketch to tell it what to do. Is it still the case with USBMidiKlik? How about the parser? Can you please provide any more info or a sketch to get me going?

Thanks in advance.

I am replying to my self just in case someone else stumbles on something similar. In deed, this firmware makes Arduinos appear as HID Midi devices. And using the MIDI Library I managed to send midi notes to my DAW. So far so good, still no clue though on the parser.

Hi.

The UsbMidiKlik firmware maps USB Midi to midi serial (bi-directional).

You can then use you own serial midi parser (or Midi Library) in a classical Arduino sketch with the benefit of having a HID USB Midi compliant device. Don't forget however that you have only one serial IN and one serial OUT with an Arduino Uno. The uC managing USB (AT 16u2 ) is connected directly to the serial I/o pin of the Arduino : you can't mix signal from serial midi and USB...

If you need a small footprint midi parser, look at the midiXparser at the Github. It is the one used in the USBMidiklik firmware.