Alien Breed CMF Format

From ModdingWiki
Jump to navigation Jump to search
Alien Breed CMF Format
Format typeMusic
Notation typeMIDI-like
InstrumentsOPL2
Max channel countUnknown
Max track count1
Max pattern count0
Max order count0
Tags?None
Games

The five music resources in ADLIB/ start with CTMF and version bytes 01 01, identifying Creative Music File version 1.1. CMF packages FM instrument data with a MIDI-like music event stream. AdPlug's CMF player implements this format.

File format

All multibyte fields in this header are little-endian. Offsets are measured from the start of the file.

Offset Length Content measured here
0x00 4 CTMF
0x04 2 Version 0x0101
0x06 2 Instrument offset, 40
0x08 2 Music offset, varies by instrument count
0x0A 2 Ticks per quarter, 48
0x0C 2 Ticks per second, 96
0x0E 6 Title/composer/remarks offsets, all zero
0x14 16 Channel-use flags
0x24 2 Instrument count
0x26 2 Basic tempo, 120

Each observed instrument record occupies 16 bytes, including its FM register parameters and reserved bytes. Music starts at 40 + 16*instrument_count in every sample.

File Instruments Music offset
ALARMED.CMF 4 104
INGAME.CMF 4 104
INTEX.CMF 5 120
MONSTER.CMF 6 136
TITLE.CMF 7 152

Notes

Validate offsets against file size, load the FM instruments, and parse events from the music offset. This is not a full MThd/MTrk MIDI container; simply renaming it .mid is insufficient. CMF playback needs its instrument data and CMF controller interpretation.

Only header and instrument boundaries were validated locally. Event validity, custom controller use, and exact equivalence with Alien Breed's FM driver remain unverified.

Files

Paths are relative to game/.

File Stored bytes
ADLIB/ALARMED.CMF 898
ADLIB/INGAME.CMF 277
ADLIB/INTEX.CMF 1,116
ADLIB/MONSTER.CMF 408
ADLIB/TITLE.CMF 12,998

Source code

From re-alienbreed, the open-source browser port and asset viewer:

Credits

The Alien Breed-specific format research and parsers were prepared by VorticonCmdr. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)