To be fair there is also USB-MIDI.h in which the 'AllEvents' example should be nearly self-explanatory. Although if listening on the Serial port for Midi,
static void OnControlChange(byte channel, byte number, byte value) {
Serial.print(F("ControlChange from channel: "));
Serial.print(channel);
Serial.print(F(", number: "));
Serial.print(number);
Serial.print(F(", value: "));
Serial.println(value);
}
It might not be practical to send the results found, back on that same port in a different format.
But you can confirm it's functionality by making the program do whatever you want.
I would try and receive a CC msg and send back a note on or off for instance.
static void OnControlChange(byte channel, byte number, byte value) {
if (number == 70) {
if (value > 63) MIDI.sendNoteOn(42, 100, 1);
else MIDI.sendNoteOff(42, 0, 1);
}
}