Plugging MIDI keyboard to USB port in Due

Hi, I've spent several hours trying to figure out how to recieve MIDI events from controller keyboard connected to Arduino Due with Native USB Port but nothing seems to work.
I'm using USBMIDI library and MidiUSB.read(); returns zero header. Has anyone had any luck with this?

I was trying to find something in the internet but most of people seem to use Arduino Due as MIDI event generator and send them to PC. I want to use Arduino Due as MIDI event reciever and generate sound on it.

Did you try this Library:

This library seems to be developed for USB host shield which I don't have. I also tried USB with mouse using the following code:

#include <MouseController.h>

// Initialize USB Controller
USBHost usb;

// Attach mouse controller to USB
MouseController mouse(usb);

// This function intercepts mouse button press
void mousePressed()
{
if (mouse.getButton(LEFT_BUTTON))
Serial.print("L");
if (mouse.getButton(MIDDLE_BUTTON))
Serial.print("M");
if (mouse.getButton(RIGHT_BUTTON))
Serial.print("R");
}

void setup(){
Serial.begin(9600);
}

void loop(){
usb.Task();
mousePressed();
}

It sends nothing through serial port. I tried with 2 different USB to micro USB adapters. I simply can't get it working. Has anyone got mouse to work with arduino Due?

I solved the issue with the mouse - turns out there was not enough power for Arduino to power the mouse through USB while it was also being powered from PC USB. When I connected 12V supply to Arduino, mouse started working but still no luck with MIDI...

The earlier poster who suggested GitHub - bbx10/USBH_MIDI at due looks spot on to me.

This is a port of a project designed for the USB shield. Did you actually try the ported version?