I'm sorry, but the code you posted doesn't make any sense.
These aren't used anywhere.
Neither is this MIDI interface you're creating here.
These are not MIDI messages, they are readable text representations for humans, they will never compare equal to the actual binary MIDI messages you might receive from your keyboard.
You never call MIDI.read() so this will never return anything meaningful. On top of that, MIDI.getSysExArray() returns a pointer to an array of bytes, you cannot store that in any of the types you have in your code. The compiler should be complaining about that, please open the IDE preferences and turn up the warnings.
As mentioned earlier, this can never be true for actual MIDI messages.
Does your PC support 31250 baud? Did you select that baud rate in the serial monitor?
I would recommend taking a step back, before you start combining snippets of code, start with simple, small examples, and try to understand each line, each word, each character before combining it with other examples.
You'll also need to understand what “baud” rate means, how serial ports work, and how MIDI data is encoded.