Official MIDI Specifications

Standard MIDI Files

The purpose of MIDI Files is to provide a way of interchanging time-stamped MIDI data between different programs on the same or different computers. One of the primary design goals is compact representation, which makes it very appropriate for a disk-based file format, but which might make it inappropriate for storing in memory for quick access by a sequencer program. (It can be easily converted to a quickly-accessible format on the fly as files are read in or written out.) It is not intended to replace the normal file format of any program, though it could be used for this purpose if desired.

MIDI Files contain one or more MIDI streams, with time information for each event. Song, sequence, and track structures, tempo and time signature information, are all supported. Track names and other descriptive information may be stored with the MIDI data. This format supports multiple tracks and multiple sequences so that if the user of a program which supports multiple tracks intends to move a file to another one, this format can allow that to happen.
RP-001_v1-0_Standard_MIDI_Files_Specification_96-1-4.pdf
rp17 SMF Lyric Events Definition.pdf
This is a recommended practice (RP) defining a common implementation for the use of Lyric Meta Events within a Standard MIDI File. The Standard MIDI Files 1.0 document does not clearly define how to place text within the Lyric Meta Events, with the result that several companies have implemented lyric events in incompatible ways. 

This RP meets the requirement that Lyric Meta Events contain only ASCII characters, but defines the use and meaning of certain characters as well as how to implement the placement of text in the Lyric Meta Event in a manner suitable for both "Notation" and "Karaoke" applications.
rp19 SMF Device & Program Name Meta-events.pdf
These two new Meta Events can be used to allow a single Standard MIDI File to address multiple devices, enabling more than 16 MIDI Channels of playback. The use of device names instead of cable numbers allows free relocation of devices. Also, if the MIDI File were used in a completely different context, having the device name would provide a valuable hint in reorchestration.

rp26 SMF Language and Display Extensions.pdf
This Recommended Practice establishes 5 Reserved Characters for use in Lyric Meta Events to establish Command Codes used for Text Display, allow for Multi-byte Character Code Sets, and include Song Information in Standard MIDI Files. The Lyric Meta Events are renamed Lyric/Display Meta Events.

Prior to this practice, lyrics could be described in Standard MIDI Files by using Lyric Meta Events, but the only character code defined for SMF was ASCII. Also, display formatting for Karaoke (including common Far East practices such as "Ruby" display) was not considered. This new recommended practice ensures compatibility among Standard MIDI files by defining the rules for (and usage of) alternate character codes for multi-language support. The text includes rules for adding display formatting and song information to a MIDI file, which is typically needed for Karaoke applications, but might also be useful in any MIDI file player.
rp32 XMF Patch Prefix Meta Event.pdf
XMF Type 0 and Type 1 files contain Standard MIDI Files (SMF). Each SMF Track in such XMF files may be designated to use either standard General MIDI 1 or General MIDI 2 instruments supplied by the player, or custom DLS instruments supplied via the XMF file. This document defines a new SMF Meta-Event to be used for this purpose.