Global Timbre Library

From ModdingWiki
Jump to navigation Jump to search
Global Timbre Library
Format typeMusical Instrument
HardwareOPL, MIDI
Number of instruments65535
Instruments named?No
Games

The Global Timbre Library is an instrument bank format used by the Miles Sound System developed by John Miles.

The file defines a number of "timbres" (instruments) in the form of OPL register values. The instruments are indexed by MIDI bank and patch numbers, and are intended to be used for the playback of XMI Format MIDI tracks.

File format

The file consists of two arrays:

  1. The header array
  2. The timbre (instrument) data array

Header array

The header array is a packed array of 6-octet header structs. There is one header per timbre (patch). Each header contains the following data:

Data type Name Description
INT8 patch MIDI Patch number
INT8 bank MIDI Bank number
[[UINT32LE][offset] offset The offset of the data for this instrument, relative to the start of the file.

The array is terminated by a 2-octet marker, 0xFFFF.

Timbre data

Immediately following the header array is the timbre data array. It has the same number of entries as the header array. Each timbre has the following structure (OPL2 format):

Data type Name OPL base register Description
UINT16LE length - Struct length, including the length field itself. Value is always 14 for OPL2 instruments, and 25(?) for OPL3.
U(?)INT8 transpose - ! Precise meaning unknown
UINT8 mod_AVEKM 0x20 Modulator characteristic (Mult, KSR, EG, VIB and AM flags)
UINT8 mod_KSLTL 0x40 Modulator key scaling/output level
UINT8 mod_AD 0x60 Modulator attack/decay level
UINT8 mod_SR 0x80 Modulator sustain/release level
UINT8 mod_WS 0xE0 Modulator wave select
UINT8 fb_c 0xC0 Feedback/connection
UINT8 car_AVEKM 0x23 Carrier characteristic (Mult, KSR, EG, VIB and AM flags)
UINT8 car_KSLTL 0x43 Carrier key scaling/output level
UINT8 car_AD 0x63 Carrier attack/decay level
UINT8 car_SR 0x83 Carrier sustain/release level
UINT8 car_WS 0xE4 Carrier wave select

References

Tools

The following tools are able to work with files in this format.

Name PlatformPlay? Create new? Modify? Convert/export to other? Import from other? Access hidden data? Edit metadata? Notes
XPLAY DOSYesNoNoNoNoNoNo Official example utility to play XMI files by using of GTL banks
OPL3 Bank Editor Linux, Windows, macOSYesYesYesYes; manyYes; manyNoYes