Difference between revisions of "MDI"
Binarymaster (talk | contribs) (Uses standard MIDI events) |
(Gear Works (AMI+DOS) is just the US title of Clik Clak (AMI+DOS)... do both titles need their own page?) |
||
(26 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
| OutputPSG = No | | OutputPSG = No | ||
| Released = 1989-05-08 | | Released = 1989-05-08 | ||
− | | FirstGame = | + | | FirstGame = [[AdLib (DOS)]] |
| Extension01 = *.mdi | | Extension01 = *.mdi | ||
}} | }} | ||
− | The '''''MDI''''' format was created by Ad Lib, Inc. to upgrade from [[ | + | The '''''MDI''''' format was created by Ad Lib, Inc. to upgrade from [[MUS (AdLib)]] format. It uses the [[MIDI]] structure but designed to work with [[OPL2]] sound chip that allow it to store instrument data and change modes. |
+ | 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. The players which can play MDI files correctly are listed below. | ||
+ | |||
+ | There don't appear to be any MDI players that support looping. This is needed to make proper recordings. | ||
==Players== | ==Players== | ||
<div style="float:right;">([[:Category: MDI Players|Category]])</div> | <div style="float:right;">([[:Category: MDI Players|Category]])</div> | ||
+ | * [[AdPlug]] - DOS, foobar2000, UNIX, Winamp, XMMS | ||
* [[MIDI Play]] - DOS | * [[MIDI Play]] - DOS | ||
* [[Multi Media Machine]] - DOS | * [[Multi Media Machine]] - DOS | ||
+ | ==Editors== | ||
+ | <div style="float:right;">([[:Category: MDI Editors|Category]])</div> | ||
+ | |||
+ | * [[MIDIPLEX]] - Windows 32 | ||
==Converters== | ==Converters== | ||
Line 29: | Line 37: | ||
===MDI to ?=== | ===MDI to ?=== | ||
+ | * [[MIDIPLEX]] - Windows 32 - [[CMF]], [[MIDI]], [[MUS (AdLib)]], [[SND (AdLib)]] | ||
===? to MDI=== | ===? to MDI=== | ||
+ | * [[MIDIPLEX]] - Windows 32 - [[CMF]], [[MUS (AdLib)]], [[SND (AdLib)]] | ||
* [[ROL to MIDI]] - DOS - [[ROL]] | * [[ROL to MIDI]] - DOS - [[ROL]] | ||
− | |||
==Games== | ==Games== | ||
<div style="float:right;">([[:Category: Games That Use MDI|Category]])</div> | <div style="float:right;">([[:Category: Games That Use MDI|Category]])</div> | ||
− | { | + | {| class="wikitable" | |
− | | | + | ! Released |
− | | | + | ! Title |
− | | | + | ! Sample |
− | | | + | |- |
− | }} | + | | 1990-09-20 |
+ | | [[AdLib (DOS)]] | ||
+ | | {{Song-Box|18 - AdLib - DOS - AdLib Test Program.ogg}} | ||
+ | |- | ||
| 1990-??-?? | | 1990-??-?? | ||
| [[Golden Axe (DOS)]] | | [[Golden Axe (DOS)]] | ||
Line 50: | Line 62: | ||
| [[Dark Ages (DOS)]] | | [[Dark Ages (DOS)]] | ||
| {{Song-Box|01 - Dark Ages - DOS - Dark Ages.ogg}} | | {{Song-Box|01 - Dark Ages - DOS - Dark Ages.ogg}} | ||
+ | |- | ||
+ | | 1991-??-?? | ||
+ | | [[Dragonflight (DOS)]] | ||
+ | | | ||
|- | |- | ||
| 1991-??-?? | | 1991-??-?? | ||
| [[Prehistorik (DOS)]] | | [[Prehistorik (DOS)]] | ||
− | | | + | | {{Song-Box|202 - Prehistorik - DOS - Prehistorik 1.ogg}} |
+ | |- | ||
+ | | 1992-0?-?? | ||
+ | | [[Clik Clak (DOS)]] | ||
+ | | {{Song-Box|01 - Clik Clak - DOS - Intro 2.ogg}} | ||
|- | |- | ||
| 1992-??-?? | | 1992-??-?? | ||
Line 60: | Line 80: | ||
|- | |- | ||
| 1992-??-?? | | 1992-??-?? | ||
− | | [[ | + | | [[Galactix (DOS)]] |
− | | | + | | {{Song-Box|03 - Galactix - DOS - Galactix.ogg}} |
|- | |- | ||
| 1992-??-?? | | 1992-??-?? | ||
Line 70: | Line 90: | ||
| [[Ultimuh MCMLXVII (DOS)]] | | [[Ultimuh MCMLXVII (DOS)]] | ||
| | | | ||
+ | |- | ||
+ | | 1994-08-23 | ||
+ | | [[Microsoft Space Simulator (DOS)]] | ||
+ | | | ||
|} | |} | ||
+ | ==How to Obtain== | ||
+ | MDI files usually have to be manually extracted from game files, a process that is different for pretty much every game that uses them. | ||
==Technical== | ==Technical== | ||
* All MDI files begin with "MThd" MIDI header and contain "MTrk" at the start of the MIDI track. | * All MDI files begin with "MThd" MIDI header and contain "MTrk" at the start of the MIDI track. | ||
* The End Of Track "FF 2F 00" event is located at the end of file, but not included in the track. | * The End Of Track "FF 2F 00" event is located at the end of file, but not included in the track. | ||
− | * Some Note Off events may have | + | * Events 0xD# (channel aftertouch) are used to control channel volume. |
+ | * Velocity parameter (with Note On and Note Off events) is also used to change current channel volume. It actually doesn't belong to the specified note. | ||
+ | * Some Note Off events may have note parameter equal to 0 (see [[Prehistorik (DOS)#Game Rip|example]]). This event just stops last played note on specified channel. Even if there is no played note on channel, it used to change channel volume. | ||
* Program Change events are not used in the track. | * Program Change events are not used in the track. | ||
− | |||
===Sequencer-Specific Event Format=== | ===Sequencer-Specific Event Format=== | ||
These events are used to control OPL-compatible chip. | These events are used to control OPL-compatible chip. | ||
− | { | + | {| class="wikitable" |
− | | | + | ! Delta-ticks |
− | + | ! Event | |
− | + | ! Length | |
− | + | ! AdLib ID | |
− | + | ! Opcode | |
− | + | ! Data | |
− | + | |- | |
| 00 | | 00 | ||
| FF 7F | | FF 7F | ||
Line 97: | Line 124: | ||
| XX .. XX | | XX .. XX | ||
|} | |} | ||
− | |||
===Possible Opcodes=== | ===Possible Opcodes=== | ||
− | { | + | {| class="wikitable" |
− | | | + | ! Opcode |
− | + | ! Meaning | |
− | + | ! Byte # | |
− | + | ! Description | |
− | + | |- | |
|rowspan="2" | 00 01 | |rowspan="2" | 00 01 | ||
|rowspan="2" | Patch (instrument change) | |rowspan="2" | Patch (instrument change) | ||
Line 124: | Line 150: | ||
| 1 - 12 inclusive | | 1 - 12 inclusive | ||
|} | |} | ||
− | |||
===Instrument Structure=== | ===Instrument Structure=== | ||
− | Instrument parameters are expressed with | + | Instrument parameters are expressed with the structure, which is identical to the structure for an instrument inside a [[BNK]] file: |
− | { | + | {| class="wikitable" |
− | | | + | ! Data type |
− | + | ! Name | |
− | + | ! Description | |
− | + | |- | |
− | |||
| <tt>MDI_OPLREGS</tt> || <tt>oplModulator</tt> || Register values for the Modulator operator (op 0) | | <tt>MDI_OPLREGS</tt> || <tt>oplModulator</tt> || Register values for the Modulator operator (op 0) | ||
|- | |- | ||
Line 147: | Line 171: | ||
The ''MDI_OPLREGS'' structure is defined as: | The ''MDI_OPLREGS'' structure is defined as: | ||
− | { | + | {| class="wikitable" |
− | | | + | ! Data type |
− | + | ! Name | |
− | + | ! Description | |
− | + | ! OPL base register | |
− | + | |- | |
− | |||
| <tt>UINT8</tt> || <tt>ksl</tt> || Key scaling level || 0x40 (bits 6-7) | | <tt>UINT8</tt> || <tt>ksl</tt> || Key scaling level || 0x40 (bits 6-7) | ||
|- | |- | ||
Line 182: | Line 205: | ||
===Channel Utilization=== | ===Channel Utilization=== | ||
− | The channel utilization is the same as in the [[MUS (AdLib)]] format | + | The channel utilization is the same as in the [[MUS (AdLib)#Channel Utilization|MUS]] format, except the music can be composed in both melodic and percussive modes, since the format supports mode switching during playback. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Default Timbre=== | ===Default Timbre=== | ||
− | Player should load | + | Player should load [[MUS (AdLib)#Default Timbre|default timbre]] if it isn't loaded by sequencer-specific event before. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Links== | ==Links== | ||
− | * [http://cd.textfiles.com/soundsensations/MISCPROG/AD-PROG | + | * [http://www.shikadi.net/moddingwiki/MDI_Format shikadi.net/moddingwiki/MDI_Format] - ModdingWiki. |
+ | * [http://cd.textfiles.com/soundsensations/MISCPROG/ZIPFILES/AD-PROG.ZIP cd.textfiles.com/soundsensations/MISCPROG/ZIPFILES/AD-PROG.ZIP] - Source code (part of the Ad Lib Programmer's Manual). | ||
* [http://swag.outpostbbs.net/SOUND/0066.PAS swag.outpostbbs.net/SOUND/0066.PAS] - MDI2MUS by Colin Buckley (incomplete program source). | * [http://swag.outpostbbs.net/SOUND/0066.PAS swag.outpostbbs.net/SOUND/0066.PAS] - MDI2MUS by Colin Buckley (incomplete program source). | ||
[[Category: MIDI]] | [[Category: MIDI]] |
Revision as of 22:42, 29 December 2018
Ad Lib MIDI | |||||
Developer: | Ad Lib, Inc. | ||||
Header: | SMF | ||||
Content: | Notational | ||||
Instruments: | Internal | ||||
Target Output
| |||||
Released: | 1989-05-08 | ||||
First Game: | AdLib (DOS) | ||||
Extensions |
|
The MDI format was created by Ad Lib, Inc. to upgrade from MUS (AdLib) format. It uses the MIDI structure but designed to work with OPL2 sound chip that allow it to store instrument data and change modes.
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. The players which can play MDI files correctly are listed below.
There don't appear to be any MDI players that support looping. This is needed to make proper recordings.
Contents
Players
- AdPlug - DOS, foobar2000, UNIX, Winamp, XMMS
- MIDI Play - DOS
- Multi Media Machine - DOS
Editors
- MIDIPLEX - Windows 32
Converters
MDI to ?
- MIDIPLEX - Windows 32 - CMF, MIDI, MUS (AdLib), SND (AdLib)
? to MDI
- MIDIPLEX - Windows 32 - CMF, MUS (AdLib), SND (AdLib)
- ROL to MIDI - DOS - ROL
Games
Released | Title | Sample |
---|---|---|
1990-09-20 | AdLib (DOS) | |
1990-??-?? | Golden Axe (DOS) | |
1991-??-?? | Dark Ages (DOS) | |
1991-??-?? | Dragonflight (DOS) | |
1991-??-?? | Prehistorik (DOS) | |
1992-0?-?? | Clik Clak (DOS) | |
1992-??-?? | Amberstar (DOS) | |
1992-??-?? | Galactix (DOS) | |
1992-??-?? | Starfire (DOS) | |
1993-??-?? | Ultimuh MCMLXVII (DOS) | |
1994-08-23 | Microsoft Space Simulator (DOS) |
How to Obtain
MDI files usually have to be manually extracted from game files, a process that is different for pretty much every game that uses them.
Technical
- All MDI files begin with "MThd" MIDI header and contain "MTrk" at the start of the MIDI track.
- The End Of Track "FF 2F 00" event is located at the end of file, but not included in the track.
- Events 0xD# (channel aftertouch) are used to control channel volume.
- Velocity parameter (with Note On and Note Off events) is also used to change current channel volume. It actually doesn't belong to the specified note.
- Some Note Off events may have note parameter equal to 0 (see example). This event just stops last played note on specified channel. Even if there is no played note on channel, it used to change channel volume.
- Program Change events are not used in the track.
Sequencer-Specific Event Format
These events are used to control OPL-compatible chip.
Delta-ticks | Event | Length | AdLib ID | Opcode | Data |
---|---|---|---|---|---|
00 | FF 7F | XX | 00 00 3F | XX XX | XX .. XX |
Possible Opcodes
Opcode | Meaning | Byte # | Description |
---|---|---|---|
00 01 | Patch (instrument change) | 1 | Voice / channel number for instrument |
2 - 29 | 28 byte array of parameters (see structure below) | ||
00 02 | Card mode | 1 | 0 = melodic, 1 = percussive |
00 03 | Pitch bend sensitivity | 1 | 1 - 12 inclusive |
Instrument Structure
Instrument parameters are expressed with the structure, which is identical to the structure for an instrument inside a BNK file:
Data type | Name | Description |
---|---|---|
MDI_OPLREGS | oplModulator | Register values for the Modulator operator (op 0) |
MDI_OPLREGS | oplCarrier | Register values for the Carrier operator (op 1) |
UINT8 | iModWaveSel | Modulator wave select (OPL base register 0xE0) |
UINT8 | iCarWaveSel | Carrier wave select (OPL base register 0xE0) |
The MDI_OPLREGS structure is defined as:
Data type | Name | Description | OPL base register |
---|---|---|---|
UINT8 | ksl | Key scaling level | 0x40 (bits 6-7) |
UINT8 | multiple | Frequency multiplier | 0x20 (bits 0-3) |
UINT8 | feedback | Feedback [op 0 only, op 1 ignored] | 0xC0 (bits 1-3) |
UINT8 | attack | Attack rate | 0x60 (upper four bits) |
UINT8 | sustain | Sustain level | 0x80 (upper four bits) |
UINT8 | eg | Envelope gain (nonzero value is on) | 0x20 (bit 5) |
UINT8 | decay | Decay rate | 0x60 (lower four bits) |
UINT8 | releaseRate | Release rate | 0x80 (lower four bits) |
UINT8 | totalLevel | Total output level | 0x40 (bit 0-5) |
UINT8 | am | Amplitude modulation (Tremolo) | 0x20 (bit 7) |
UINT8 | vib | Frequency Vibrato | 0x20 (bit 6) |
UINT8 | ksr | Key scaling/envelope rate | 0x20 (bit 4) |
UINT8 | con | Connector [op 0 only, op 1 ignored] | 0xC0 (bit 0, inverted) |
Channel Utilization
The channel utilization is the same as in the MUS format, except the music can be composed in both melodic and percussive modes, since the format supports mode switching during playback.
Default Timbre
Player should load default timbre if it isn't loaded by sequencer-specific event before.
Links
- shikadi.net/moddingwiki/MDI_Format - ModdingWiki.
- cd.textfiles.com/soundsensations/MISCPROG/ZIPFILES/AD-PROG.ZIP - Source code (part of the Ad Lib Programmer's Manual).
- swag.outpostbbs.net/SOUND/0066.PAS - MDI2MUS by Colin Buckley (incomplete program source).