MIDI Data Management
MIDI data is transmitted by sending and receiving single byte pieces of information. MIDI commands are composed of one, two, or three bytes of data arranged and transmitted one after another. The first byte is called the status byte, the following one or two bytes represent which note to be played and at what velocity, respectively. A protocol at the heart of the MIDI structure facilitates writing software designed to handle MIDI data. In the protocol, the command byte's most significant bit is used to determine if that particular byte is a command byte (bit set to 1), or a data byte (bit set to 0). By interpreting the first bit, a MIDI device could continuously play a note (note on status), until a new command byte was encountered.