Arduino Due MIDI to keystroke project idea

Hi, I'm new to the Arduino community. I got an Arduino Due because I had a project idea. My idea is to take midi signals from a piano keyboard, then use the Arduino to convert those signals into different computer keyboard presses (ctrl, esc, 'a'...). I've been playing around with the Due and have easily emulated keyboard presses, but I've been having trouble getting MIDI input.

My initial idea was to connect my piano through a usb cable to the programming port of the due, read the midi signals, then use the native port to send keystrokes to my computer. Is this approach possible? I have tried different MIDI-USB libraries and haven't been able to get them work. I also can't see any serial information coming from my piano either.

If my approach is not possible, what is a good approach to this problem? Is connecting to an actual midi port the only way? Or should I not even be using the due for this, and instead be using something else, like the Leonardo?

Any tips/advice would be really helpful. Thanks :).

There is a USBHost Library for the DUE (with the Native USB Port).

There is a USB MIDI Library and a branch for the DUE

And this:

https://forum.arduino.cc/index.php?topic=367031.0

I did a midi project in the 90s. The baud rate must be correct to receive. The protocol is simple. I used an optó-isolator interface which was the standard circuit at that time.

I suggest starting with a simple sketch just to monitor the port and print what you get in hex code to your monitor. Get that working.
Write code to send keystrokes to your computer. Get that working.
Then write the code to decipher midi key messages and translate them into keystrokes. Then merge it all together.
Take bite sized steps within a general framework of your project. Good luck. Midi is fun to work with.