MIDI voice file format specification

The MIDI voice-file is a compact entity for saving detailed information on sets of MIDI voice specifications (MIDI patches). Voice files are used in software like KBD-Infinity to define melody voices to be used with styles for song performances.

MIDI voice files have names of the form FilePrefix.MDV. Following the philosophy of style files, voice files are standard Type 0 (single track) MIDI files that can be read by any MIDI device. The format is compact (the full set of voice specifications for a keyboard may occupy 10 kB) and simple. It is relatively easy to create software routines to transfer voice information to any MIDI device.

Figure 1 shows the screen display of MIDI Microscope with a voice file loaded. As with all MIDI files, the first section is the Header Chunk:

1) UInt8: &h4D &h54 &h68 &h64 to represent the characters MThd
2) UInt32: The number 6, always the length of data in the header chunk.
3) UInt16: The number 0, the MIDI file type
4) UInt16: The number 1, the number of tracks
5) UInt16: Pulses per quarter note, set to the arbitrary value of 100 (&h64)
Screenshot of Midi Microscope with voice file loaded

Figure 1. Screenshot of Midi Microscope with voice file loaded.

 

There is a single track section that begins with

1) UInt8: &h4D &h54 &h72 &h6B to represent the characters MTrk
2) UInt32: The number of bytes in the track.

The data that follows is a set of standard MIDI messages (with no System Exclusive messages). Each message is preceded by a timing byte, always &h00. The first message is must be a non-MIDI type text message that contains the name of the first voice:

&hFF &h01 StringLength VoiceNameString

StringLength is the length of the following string expressed as a variable-length quantity. The following StringLength bytes are Ascii values to define VoiceNameString. The voice designator is followed by any number of voice definition messages that a software program ports directly to the MIDI device. All messages are three bytes in length except Program change (2 bytes). All parameter values are in the range &h00 – &h7F. All messages are directed to MIDI channel 1 (&h00). The software is responsible for redirecting the information to other channels for multiple voices. Not all commands may be recognized by all MIDI devices. Unrecognized commands are ignored.┬áThe following messages are allowed:

XG parameters: 
  &hB0 &h00 BankMSB
  &hB0 &h20 BankLSB
General MIDI instrument (program change): &hC0 GMInst
Channel volume: &hB0 &h07 ChanVolume
Pan (left/right speakers): &hB0 &h0A Pan
Sound variation: &hB0 &h46 SoundVariation
Timbre (resonance):&hB0 &h47 Timbre
Release time: &hB0 &h48 ReleaseTime
Attack time: &hB0 &h49 AttackTime
Brightness (cutoff): &hB0 &h4A Brightness
Decay time: &hB0 &h4B DecayTime
Vibrato rate: &hB0 &h4C VibratoRate
Vibrato depth: &hB0 &h4D VibratoDepth
Vibrato delay: &hB0 &h4E VibratoDelay
Depth (reverb): &hB0 &h5B Depth
Tremolo depth: &hB0 &h5C TremoloDepth
Chorus: &hB0 &h5D Chorus

There is an additional non-MIDI message that does not directly affect the output MIDI device, but may be used by the software. The octave displacement parameter is defined by the proprietary message

&hFF &hF7 &h01 (OctaveDisp + 64)

The value &h01 is the length of the data (one byte). For an octave displacement of -1, the software should add or subtract 12*OctaveDisp from note values in NoteOn and NoteOff messages.

The end of data for one voice is signaled by the text message header for the next voice:

&hFF &h01 StringLength NextVoiceNameString

The end of data for the last voice is designated by a end-of-track message:

&hFF &h2F &h00

 

Comments are closed.