MIDI File Dump Messages

Like any other System Exclusive message, the end of this message is indicated by the End of Exclusive message, or any MIDI message other than a System Real Time message

 

 

MIDI File Dump Messages

 
 
Status
Byte
Data
Bytes
Message Description
F0 7E dev 07 01 from_dev  type  length  name Header File Header information
 Value Description
dev Device ID of the device receiving the message. See MIDI Universal Sysex messages
from_dev Device ID of the device sending the message.
type 4 bytes, ASCII. Type of file.
MIDI MIDI file
MIEX MIDIEX file
ESEQ ESEQ file
TEXT 7-bit ascii text file
BIN<space> Binary file.
MAC<space> Macintosh file (with MacBinary file header).
length 4 bytes, 7-bits/byte binary. Length of file (LSB first). (Note 1)
name zero or more ASCII characters.
Any ASCII characters in the range 20-7E are valid. The file name can be any length, and is ended by the normal End-Of-Exclusive indicator.
Status
Byte
Data
Bytes
Message Description
F0 7E dev 07 02 pp bytes-- data csum Data Packet Data packet with 1-128 bytes of data (after encoding)
 Value Description
dev Device ID of the device receiving the message.
pp Packet number
bytes-- Number of bytes minus one, ie
0=one byte.
7F=128 bytes.
(Note 2)
data File data, encoded as 7-file bytes for every 8 bytes sent.
See Note 3 for encoding

This allows a maximum of 112 file-bytes to be sent in a single data packet of 128 bytes.

csum Logical XOR of all the data-bytes in the MIDI message, up to but not including csum.
ie all bytes except the leading F0 and csum itself.
Status
Byte
Data
Bytes
Message Description
F0 7E dev 07 03 from_dev  type  name Request Request a file dump (requested by file name)
 Value Description
dev As for the file dump Header message (above).
from_dev
type
name

Footnotes

Note 1 - File length
This is the length of the original file, before to encoding.
Note 2 - Packet length
This is the length of the packet (minus 1) after encoding. A length of zero is take to mean 128.
Note 3 - Encoding
File-data is encoded such that 7 bytes of file-data are transmitted as 8 bytes of MIDI-data in the range 00-7F (as is required for all MIDI data-bytes).

Each set of 7 file-bytes (represented in binary here) with the Most Significant Bits stripped off and sent seperately, packed into the first byte.

File data
(8-bit)
-> encoded MIDI
data-bytes
Aaaaaaaa -> 0ABCDEFG
Bbbbbbbb 0aaaaaaa
Cccccccc 0bbbbbbb
Dddddddd 0ccccccc
0ddddddd
Eeeeeeee 0eeeeeee
Ffffffff 0fffffff
Gggggggg 0ggggggg

In the case where there are less than 7 bytes to be encoded, the unused bits of the first byte are set to zero, eg

 

File data
(8-bit)
-> encoded MIDI
data-bytes
Aaaaaaaa -> 0AB00000
Bbbbbbbb 0aaaaaaa
0bbbbbbb

 

Previous midi_sysex_universal.html Up Contents Next midi_file_format.html