Musical Instrument Digital Interface is an American-Japanese technical standard that describes a communication protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and related audio devices for playing, editing, and recording music.
A single MIDI cable can carry up to sixteen channels of MIDI data, each of which can be routed to a separate device. Each interaction with a key, button, knob or slider is converted into a MIDI event, which specifies musical instructions, such as a note’s pitch, timing and velocity.
One common MIDI application is to play a MIDI keyboard or other controller and use it to trigger a digital sound module (which contains synthesized musical sounds) to generate sounds, which the audience hears produced by a keyboard amplifier. MIDI data can be transferred via MIDI or USB cable, or recorded to a sequencer or digital audio workstation for editing or playback.
MIDI Definitions
MIDI defines a total of 128 notes for the keyboard, with values ranging from 0 to 127. An overview can be found, for example, at Inspired Acoustics.
In addition, there are definitions for instruments and percussion.