MDI

From Video Game Music Preservation Foundation Wiki
Revision as of 19:57, 27 August 2014 by Binarymaster (talk | contribs) (Added converters)
Jump to: navigation, search
[[Category: Formats With {{{Header}}} Headers]] [[Category: Formats With {{{Content}}} Content]] [[Category: Formats With {{{Instruments}}} Instruments]]
MDI
MDI.png
Developer: Ad Lib, Inc.
Header: {{{Header}}}
Content: {{{Content}}}
Instruments: {{{Instruments}}}
Target Output
Output - Digital Audio - No.png Output - MIDI - No.png Output - FM Synthesis - No.png Output - PSG - No.png
Released: 1989/05/08
First Game: ?
Extensions
  • *.mdi

The MDI format uses the MIDI structure but incorporates OPL2 commands that allow it to store instrument data and change modes, similar to how CMF works. Because the format is so similar to MIDI, some MIDI players are able to play the files, though they won't utilize the instrument data or set the song into the correct mode, so the song won't sound correct.


Players

Converters

? to MDI

Games

Games That Use MDI


Technical

All MDI files begin with "MThd" MIDI header, contain "MTrk" at the start of the MIDI track, and the End Of Track "FF2F" event is located at the end of file, but not included in the track.

Some NoteOff events may have only Velocity parameter to trigger the note off.

Sequencer-specific event format

These events are used to control OPL-compatible chip.

Delta-ticks

Event

Length

Ad Lib ID

Opcode

Data

00 FF 7F XX 00 00 3F XX XX XX .. XX

Possible opcodes

Opcode

Meaning

Data

00 01 Patch (instrument change)

Byte #

Meaning

1 Voice number for instrument
2 - 29 28 byte array of parameters
00 02 Card mode

Byte #

Meaning

1 0 = melodic, 1 = percussive
00 03 Pitch bend interval

Byte #

Meaning

1 1 - 12 inclusive

Channels utilization

Hex channel

MIDI channel

Use in melodic mode

Use in percussive mode

0x00 1 Normal instrument Normal instrument
0x01 2 Normal instrument Normal instrument
0x02 3 Normal instrument Normal instrument
0x03 4 Normal instrument Normal instrument
0x04 5 Normal instrument Normal instrument
0x05 6 Normal instrument Normal instrument
0x06 7 Normal instrument Bass drum
0x07 8 Normal instrument Snare drum
0x08 9 Normal instrument Tom tom
0x09 10 Normal instrument Top cymbal
0x0A 11 Normal instrument Hi-hat cymbal
0x0B 12 Normal instrument Normal instrument
0x0C 13 Normal instrument Normal instrument
0x0D 14 Normal instrument Normal instrument
0x0E 15 Normal instrument Normal instrument
0x0F 16 Normal instrument Normal instrument

Links

  • [1] - Ad Lib software and sources.
  • [2] - The Ad Lib sequencer-specific event basic explaination.