Are you still struggling with this problem?
This is what you are looking for: https://github.com/MicrochipTech/mla_usb
. Take a look at the the inc/ directory.
Well, I'm actually trying to do the exact same thing as you, which is getting midi info from a midi keyboard (mine is an akai mpk mini mk2) and output a gate from the PIC, to trigger anything that needs gate (like an envelope for a synth).
I've been searching for a long time example of how to use that code to make a ush midi host that actually works but there's no way I can find an existing example.
I'm new to microcontroller programming so this task is actually a huge challenge to me. What about sharing our progress in this journey?
My roadmap to reach the goal "Parsing midi data from usb midi keyboard" is the following:
1. [OK] Blink LEDs with a PIC
2. [WIP] Connecting an HID mouse to the PIC and blink an LED when pressing the left button.
3. [NOK] Connecting a midi keyboard to the PIC and blink an LED when pressing a pad of the keyboard.
I'm trying to understand if there's some kind of midi parser within the usb_host_midi.c file but no result yet.
Cheers and hope you've not abandoned this project. If the two of us work on it, we could get this thing done.