A MIDI file stores sheet music in digital form. It records which notes are played, when, and for how long — but it holds no recorded audio. Instead it sends a stream of messages to a compatible device — synthesizer, sound module, software — which produces the sound.
That is the whole difference with an MP3. A recording is fixed. A MIDI file can be changed: tempo, key, instruments, the volume of each part — with no loss of quality.
MIDI stands for Musical Instrument Digital Interface. It is a standard protocol, established in 1983, that lets electronic instruments, computers and other devices talk to each other. It is also used to drive and synchronise lighting and video systems.
Seven families of information, each answering one question.
Who is playing?
Channels
16 distinct channels
One instrument or source per channel
Several instruments driven at once
At what tempo?
Timing
Tempo in beats per minute
Time signature (4/4, 3/4…)
MIDI clock for synchronisation
Resolution in ticks per quarter note
With which sound?
Voices
Program change
Bank select
Standardised General MIDI numbers
Settings via control change messages
When?
Placement
Absolute position of every event
Quantisation
SMPTE time code
Markers and cue points
Which notes, and how?
Performance
Pitch from 0 to 127 (60 = middle C)
Velocity, how hard a note is struck
Articulation
Pitch bend
For how long?
Duration
Note-on and note-off events
Sustain pedal
Release velocity
Legato and staccato
And what else?
Controls
Modulation wheel, expression
Effects: reverb, chorus
Aftertouch
Device-specific SysEx messages
Mixer automation, loop points
How it is interpreted
It is a sequence of instructions read line by line by any compatible hardware or software: Cubase, Logic, Ableton Live, Reason, MuseScore, Guitar Pro, and Korg, Yamaha, Roland or Arturia keyboards. A single piece can hold thousands of instructions, from a plain note to effect settings specific to your machine.
A compact, durable format for carrying a performance without the audio: ideal for editing, arranging, and moving a musical idea from one system to another.