A MIDI event that carries the MIDI note on message tells a MIDI device that at a certain time some note should be played and should start sounding.
This message belongs to the category of MIDI voice messages.
This message consists of three bytes of data. The first byte is the status byte and has hexadecimal values between 0x90 and 0x9F. The high nibble of the status byte is 9, which tells the MIDI device that this is a note on message. The low nibble of the status byte is between 0 and F (0 and 15 in decimal values) and points to one of the 16 MIDI channels. Two bytes follow the status byte. The first byte after the status byte is has values between 0x00 and 0x7F (0 and 127 in decimal values) and shows which note should be played. A value of 0x3C (60 decimal) signifies the note middle C. Higher values represent higher notes and lower values represent lower notes, where a change of 1 is a change of one semitone. The second byte after the status byte is the velocity with which the note should be played. The velocity can be interpreted by MIDI devices as the attack time or volume of the note, where 0 is the slowest (lowest) and 127 is the fastest (loudest).
The following is an example of a MIDI note on message.
0x92 0x3D 0x78
The status byte 0x92 shows that this is a note on message and that the note should be played on channel 2. The note is 0x3D (61 decimal), which is C# above middle C. The note should be played with velocity 0x78 (120 decimal).
When two note on messages for the same channel and the same note are sent one after the other, it is up to the device whether to stop the first note and play the second or whether to play both notes in unison (i.e., layer another voice on top of the first one). This is almost always true, except that a note on message with velocity of 0 should always be treated as a note off message and the same note on the same channel, if any, should be released. Sending a note on message with velocity of 0 takes advantage of the MIDI running status (see MIDI event), according to which the status byte of the second note on message can be omitted and smaller amounts of data can be sent through the MIDI bus.
Musical Instrument Digital Interface (MIDI)