The MIDI track name meta message defines either the name of a MIDI sequence (when in MIDI type 0 or MIDI type 2 files, or when in the first track of a MIDI type 1 file), or the name of a MIDI track (when in other tracks of a MIDI type 1 file).
This message belongs to the category of MIDI meta messages. Since this is a meta message the MIDI event that carries this message may exist in MIDI files, but it is never sent over MIDI ports to a MIDI device.
This message consists of a variable number of bytes of data. The first byte is the status byte and has a hexadecimal value of 0xFF, which means that this is a meta message. The second byte is the meta message type 0x03 and shows that this is a track name meta message. The third byte carries the length of the text to follow. The remaining bytes carry the text of the message in ASCII.
The following is an example of a MIDI track name meta message.
0xFF 0x03 0x04 0x42 0x61 0x73 0x73
The status byte 0xFF shows that this is a meta message. The second byte is the meta type 0x03 and signifies that this is a track name meta message. The third byte is 4, which means that the text to follow has 4 characters. The four characters are 0x42 0x61 0x73 0x73, which in ASCII translates to "Bass" (without the quotes).
This message has a delta time of 0 and occurs before any nonzero delta time messages.
Musical Instrument Digital Interface (MIDI)