fordp wrote:Midi is very simple and has a note on message followed (hopefully) by a note off message when the key is released. These messages are three bytes long.
Yes, they are but a real MIDI keyboard or external sequencer can send other messages too. It looks like finding the start of the message is easy enough as the first byte, the "status" byte has bit 7 set and the data bytes have it clear.
Thinking about M2000 emulation, my guess is that to the 6502 it will appear as some kind serial controller as, on the wire, MIDI is a serial protocol.