'midi in" project....

Here's the clearest explanation I was able to find in a quick search:

http://www.csie.ntu.edu.tw/~r92092/ref/midi/midi_messages.html