Hubbry Logo
XM (file format)XM (file format)Main
Open search
XM (file format)
Community hub
XM (file format)
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
XM (file format)
XM (file format)
from Wikipedia
XM
Filename extension
.xm
Internet media type
audio/xm
Magic number0x1A at offset 37[1]
Developed byFredrik Huss (Mr.H of Triton)
Initial release1994[1]
Type of formatModule file format
Extended fromMOD

XM, standing for "extended module", is an audio file type introduced by Triton's FastTracker 2.[2] XM introduced multisampling-capable[3] instruments with volume and panning envelopes,[4] sample looping[5] and basic pattern compression. It also expanded the available effect commands and channels, added 16-bit sample support, and offered an alternative frequency table for portamentos.

XM is a common format for many module files.

The file format has been initially documented by its creator in the file XM.TXT, which accompanied the 2.08 release of FastTracker 2, as well as its latest known beta version: 2.09b. The file, written in 1994 and attributed to Mr.H of Triton (Fredrik Huss), bears the header "The XM module format description for XM files version $0104." The contents of the file have been posted on this article's Talk subpage for reference.

This documentation is however said to be incomplete and insufficient to properly recreate the behaviour of the original program. The MilkyTracker project has expanded the documentation of the XM file format, in an attempt to replicate not only the behaviour of the original software but also its quirks. Their documentation of the XM file format is available on the project's GitHub repository.

OXM (oggmod) is a subformat, which compresses the XM samples using Vorbis.[6]

Supporting media players

[edit]
  • Windows Media Player – supports .XM files as long as the player version is x86 (32-bit). The UWP version dropped support for .XM files.
  • Cowon jetAudio – A freeware audio player for Windows which supports .XM files
  • Xmplay – A freeware audio player for Windows which supports .XM files
  • Foobar2000 – A freeware audio player for Windows that supports .XM files through a plugin.
  • VLC Media Player – An open-source media player for Windows, Linux, & macOS which supports .XM files
  • MusicBee – A freeware audio player for Windows which supports .XM files
  • OpenMPT – An open-source audio module tracker for Windows which supports .XM files and others, such as .MOD and .S3M.
  • Audacious – an open-source audio player focused on low resource usage.
  • Winamp - A proprietary audio player for Microsoft which supports .XM files

References

[edit]

See also

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The XM file format, short for eXtended Module, is a digital music container format designed for tracker-based composition, bundling sampled audio waveforms with playback instructions such as patterns, orders, and effects to enable efficient, hardware-independent music production. Introduced in 1994 by the Triton demoscene group alongside their FastTracker 2 (FT2) software, it builds upon earlier MOD formats by incorporating advanced features like multi-sample instruments, volume and panning envelopes, and linear frequency tables for precise pitch control. At its core, XM files store up to 256 patterns across a maximum of 32 channels, supporting 128 instruments where each can include multiple looped or non-looped samples with individual attributes like fine-tuning and relative . The format employs packed pattern data for compression, using a mask-based packing scheme to represent , instruments, volumes, and effects in 1 to 5 bytes per row, which facilitates complex arrangements while keeping file sizes manageable for the era's storage limitations. Effects commands extend beyond basic MOD capabilities, including to , waveforms, and arpeggios, with compatibility options for Amiga-style tables to ensure playback fidelity across tools. The file begins with a 60-byte header identifying the module (e.g., via the "Extended Module" ) and specifying version 1.04 (hex 0x0104), followed by song metadata like length, restart position, and channel panning; this leads into packed headers and data, instrument definitions with points, and raw or compressed sample chunks. XM gained widespread adoption in the and communities due to FT2's popularity, and it remains supported by modern libraries like libmodplug and players such as and , though some extensions (e.g., stereo samples or ADPCM compression) introduced by later tools like ModPlug Tracker are non-standard and may cause compatibility issues.

History and Development

Origins and Creation

The XM file format, standing for eXtended Module, was created in 1994 by Fredrik Huss, known as Mr. H, a member of the Triton, specifically for use with the tracker software FastTracker II, which he co-developed with Magnus Högdahl (Vogue). This development occurred within the context of the burgeoning PC , where Triton sought to advance music composition tools beyond the limitations of earlier formats. XM emerged as an extension of the earlier MOD format, originally popularized on the , by incorporating more advanced features such as multisampling-capable instruments and support for higher channel counts to enable richer, more complex compositions on evolving PC hardware. The format was designed from the ground up rather than as a mere variation of ProTracker-style modules, allowing for greater flexibility in sample manipulation and sequencing. The initial release of XM accompanied a pre-release version of FastTracker II in 1994, supporting up to 32 channels and 16-bit sample depths, which significantly expanded creative possibilities compared to the 8-bit, 4-channel constraints of prior standards. In the , where trackers like FastTracker II were essential for composing music on resource-limited PCs and Amigas, XM quickly gained traction among musicians for its efficiency in producing high-quality chiptunes and demos.

Evolution and Extensions

The original documentation for the XM format, provided in the XM.TXT file bundled with FastTracker II version 2.04, was authored by Mr. H of the Triton group in 1994 and released into the public domain. This document described the core structure for XM version $0104 but contained notable incompletenesses, such as unclear details on instrument autovibrato sweep types and flawed notes on linear period tables for playback interpolation. Subsequent updates in a 1995 revision by Guru and Alfred of the Sahara Surfers group added corrections, such as adjusting the note range to 1-96 (with 97 for key-off) and fixing the version identifier to $0104, yet gaps persisted in areas like envelope behavior and certain effect implementations. In the early 2000s, community efforts addressed these deficiencies through corrections and extensions to the specification. ByteRaven and Wodan of the TNT/NO-ID group revised the original document, clarifying ambiguities in pattern compression and instrument envelopes based on reverse-engineering FastTracker II behavior. Further detailing emerged from developers associated with , including a comprehensive guide compiled by Matti "ccr" Hamalainen (TNSP) between 2000 and 2001, which incorporated real-world testing and prior modifications to fill gaps in loader implementation details like sample looping and effect chaining. Unofficial extensions to the XM format have since introduced non-standard features while preserving much of the original structure. The ADPCM-compressed XM subformat, pioneered by ModPlug Tracker in the early , enables 4-bit ADPCM compression of samples to reduce file sizes by approximately a factor of two, though it applies a effect that slightly degrades audio quality. In 2006, the μFMOD library introduced the Stripped XM subformat, which omits redundant header fields like song and instrument names to further minimize file sizes for embedded applications, supported by tools such as XMStrip for conversion. Another extension, OXM, compresses instrument samples using Ogg while retaining the XM framework, achieving significant size reductions for distribution; it originated around 2003 and is playable in compatible engines like . A more exhaustive unofficial specification was published in 2021 by Vladimir Kameñar, titled The Unofficial XM File Format Specification, which comprehensively documents the original FastTracker II structure alongside the ADPCM and Stripped subformats at the bit-and-byte level, drawing on prior community work to resolve remaining ambiguities.

File Format Specification

Overall Structure

The XM file format employs a sequential layout that commences with the XM header, which provides essential metadata about the module, followed immediately by the headers for each along with their corresponding packed . Subsequent sections include the headers for each instrument, each potentially containing up to 16 sample headers, and concluding with the raw sample blocks themselves. This organization supports a variable number of patterns (up to 256) and instruments (up to 128), enabling flexible module sizes while maintaining a linear reading order for playback engines. Identification of XM files relies on the magic byte 0x1A positioned at offset 37, directly after the fixed identification string "Extended Module: " (17 bytes) and the module name (20 bytes padded with spaces). The conventional is .xm, and the assigned to XM files is audio/xm, facilitating recognition by media players and libraries. The field at offset 60 specifies the of header from that offset, typically 276 bytes for standard modules (total header 336 bytes), but variable and as low as 21 bytes for stripped variants (total 81 bytes). This accommodates different levels of metadata, such as a shortened order table in stripped modules while retaining core structural . The total is not fixed but calculated dynamically as the sum of the XM header , the aggregate sizes of all headers and , all instrument and sample headers, and the raw sample lengths, allowing for efficient storage without padding. To optimize storage, pattern data utilizes a form of run-length encoding-like compression, where note, instrument, volume, and effect events are packed into compact binary representations, with the most significant bit signaling compression flags for efficient unpacking during playback. Sample data, stored as raw PCM, incorporates delta encoding for 8-bit and 16-bit signed integers, representing each value as the difference from the previous sample to reduce redundancy in waveforms with gradual changes. The format originated as an extension for the FastTracker II tracker software developed by Triton in 1994.

Module Header

The module header is the foundational component of an XM file, occupying the initial bytes and providing critical global metadata for module playback and . It begins with an identifier to confirm the file type, followed by descriptive fields that outline the song's , audio configuration, and default parameters. This header ensures compatibility across trackers and players by specifying details such as the creating software and version adherence. The header's fields are structured as follows, with offsets relative to the file start:
OffsetSize (bytes)Field NameDescription
017ID TextFixed string "Extended Module: " (ASCII, ending with space $20), identifying the file as a standard XM module. In stripped variants, it may use null bytes instead.
1720Module NameASCII string for the module's title, padded with spaces or nulls; often up to 20 characters.
371SeparatorFixed byte $1A in standard XM files; $00 in stripped modules.
3820Tracker NameASCII string naming the creating software, such as "FastTracker v2.00", padded with spaces or nulls. In stripped modules, it uses null bytes.
582Version NumberWord (little-endian) indicating format version; high byte for major, low for minor (e.g., 0x0104 for version 1.04). Stripped modules use 0x0000.
604Header SizeDword (little-endian) specifying the total size of the header in bytes, starting from this field; typically 276 bytes for full order lists, but variable and shorter in stripped modules (minimum 21 bytes). This allows parsers to locate subsequent data.
642Song LengthWord (little-endian) defining the number of entries in the pattern order table (1-256); represents the song's total order count.
662Restart PositionWord (little-endian) indicating the pattern order index (0-255) for playback restart on loop; 0 often denotes no restart.
682Number of ChannelsWord (little-endian) specifying audio mixing channels (typically 1-32, though up to 64 supported in extensions). Common values include even numbers like 2, 4, 8, 16, or 32.
702Number of PatternsWord (little-endian) indicating stored patterns (1-256); defines the module's pattern table size.
722Number of InstrumentsWord (little-endian) specifying instruments (0-128); 0 indicates sample-only mode.
742FlagsWord (little-endian); bit 0 (1 = linear frequency tables, 0 = Amiga-style); other bits reserved (typically 0). This affects pitch calculation during playback.
762Default TempoWord (little-endian) setting initial ticks per row (typically 80-200); controls row advance speed.
782Default BPMWord (little-endian) for initial beats per minute (32-255); influences overall playback tempo alongside ticks.
80256 (variable)Pattern Order TableArray of 256 bytes (or fewer in stripped modules, per header size); each byte indexes a pattern (0-255, or 0xFF for skips) to define song sequence. Full 256 bytes ensures broad compatibility.
These fields collectively establish the module's playback framework, with the pattern order table dictating song progression and initial /BPM values setting the rhythmic foundation. The header size field facilitates flexible parsing, accommodating both full-featured and compact "stripped" XM variants for optimized storage.

Patterns

In the XM file format, patterns represent the core musical sequences, defining events such as notes, instruments, volumes, and effects across multiple channels over a series of rows, which collectively form the song's arrangement when referenced by the module's order table. The number of patterns in a module is specified in the module header, with each pattern's position determined by the order table for playback sequencing. Each pattern begins with a fixed 9-byte header that provides essential metadata for unpacking and interpreting the following . The header is as follows:
OffsetSize (bytes)TypeDescription
04DWORDHeader length (always 9)
41BYTEPacking type (0 for unpacked, though rarely used otherwise)
52WORDNumber of rows (1–256)
72WORDSize of packed data in bytes (0 indicates an empty )
This header is immediately followed by the variable-length packed data, which encodes the content for all channels across the specified number of rows. The packed data consists of a compressed representation of pattern lines, where each line corresponds to a single row across all channels in the module. Unpacked, each channel's entry in a row comprises five bytes: a note byte (1 byte, values 0–97, where 0 denotes no note, 1–96 represent notes from C-0 to B-7, and 97 indicates key-off), an instrument byte (1 byte, 0–128, where 0 means no instrument), a volume column byte (1 byte, 0–64 for standard volume or up to 255 for extended commands), an effect type byte (1 byte, 0–26, where 0 means no effect), and an effect parameter byte (1 byte, 0–255). To optimize file size, XM employs a bit-packed compression scheme within the data. The most significant bit (bit 7) of the note byte serves as a flag byte, with its lower bits (0–3) acting as indicators for the presence of subsequent fields: bit 0 for the , bit 1 for the instrument, bit 2 for the volume column, and bit 3 for the effect (which includes the parameter if present). If a bit is not set, the corresponding field is omitted and assumed to carry over from the previous row or default to zero, allowing sparse events to be stored efficiently without redundant empty bytes. This packing method significantly reduces the size of patterns with many empty rows or channels, a common occurrence in tracker compositions.

Instruments

In the XM file format, instruments serve as organizational units that associate musical notes with specific samples, enabling multisampling and automated parameter control during playback. Each instrument begins with a header that defines its properties and links to up to 16 samples, allowing for more sophisticated compared to earlier formats like MOD. The header's variable size is specified by a 4-byte unsigned (dword) at offset 0, with a minimum of 29 bytes for a standard empty instrument or 4 bytes in stripped variants where extraneous fields are omitted. The instrument name follows at offset 4 as a 22-byte ASCII string, typically zero- or space-padded, providing a human-readable identifier. A single byte at offset 26 denotes the instrument type, which is usually set to 0 and holds no functional significance in standard implementations. The number of associated samples is indicated by a 2-byte unsigned (word) at offset 27, limited to 0-16 in but extensible up to 128 in some players. If samples are present, a 4-byte dword at offset 29 specifies the size of each sample header, ensuring proper parsing of linked sample data. Additionally, a 96-byte at offset 33 maps samples to specific notes across 96 semitones (from C-0 to B-7), where each byte indexes the assigned sample number (0 for no sample, 1 to the number of samples in the instrument). Envelopes provide time-based for and panning, defined within the instrument header to control how these parameters evolve over the course of a note. The envelope consists of 48 bytes (24 words) at offset 129, accommodating up to 12 points where each point is a pair of 2-byte unsigned integers: the first for the frame position (0-65535, representing ticks) and the second for the value (0-64, scaled to volume levels). Similarly, the panning envelope occupies 48 bytes at offset 177, using identical structure but with values from 0-64 mapped to -64 to +63 for left-right positioning. Envelope configuration is handled by subsequent bytes: offset 225 (1 byte) sets the number of active volume points (0-12), offset 226 does the same for panning; sustain points are 1-byte indices at offsets 227 and 230, while loop start and end points (0-11) are at offsets 228-229 and 231-232. Flags at offsets 233 and 234 (1 byte each) enable envelopes (bit 0), sustain (bit 1), and looping (bit 2), with applied between points during playback. Further instrument parameters include a 2-byte word at offset 239 for volume fadeout (0-65535), which gradually reduces volume after the sustain point until silence. Vibrato effects are configured with four 1-byte fields at offsets 235-238: type (0=sine, 1=ramp down, 2=square, 3=random), sweep (initial depth ramp-up in ticks), depth ( 0-15 semitones), and rate (speed in Hz/12). These elements collectively allow instruments to emulate dynamic instrument behaviors, such as swells or stereo movement, by mapping notes to samples and automating their playback characteristics. Sample headers, referenced but not stored within the instrument section, provide per-sample details like length and tuning that integrate with these mappings.

Samples

Samples in the XM file format store raw audio waveforms that can be assigned to instruments, enabling multisampling where different samples are used for various pitches to create more realistic or varied sounds. Each instrument can reference up to 16 samples, with the instrument header containing an of indices pointing to these samples in the file's sample section. The samples support both 8-bit and 16-bit audio depths and include provisions for looping to sustain notes indefinitely. The sample header is a fixed 40-byte structure that defines properties for each sample. It begins with a 4-byte unsigned integer for the sample length, specified in number of samples (not bytes), determining how many audio points the sample contains. Following this are two 4-byte unsigned integers for the loop start position and loop length, also in number of samples; a loop length of 0 indicates no looping. The header then includes a 1-byte unsigned integer for the default volume (range 0-64, where 64 is maximum), a 1-byte signed integer for finetune adjustment (range -128 to +127 in 1/8 semitone units, equivalent to -16 to nearly +16 semitones; FastTracker 2 uses -8 to +7), and a 1-byte flags field for the sample type: bit 0 enables forward looping, bit 1 enables bidirectional (ping-pong) looping, and bit 4 indicates 16-bit samples (otherwise 8-bit). A 1-byte unsigned integer specifies panning (0-255, with 128 as center), followed by a 1-byte signed integer for the relative note number (-128 to +127, used as a semitone offset from the mapped note to set the base pitch for transposition). The next 1-byte field is reserved in standard XM files (value 0 for delta encoding), though some extensions use it to indicate compression types like 0 for none or 8-bit delta; non-standard implementations may include 4-bit ADPCM compression here, preceded by a 16-byte lookup table for decoding. The header concludes with a 22-byte null-padded ASCII name for the sample. Sample data immediately follows the sample headers in the file, with each sample's data allocated contiguously based on its header. Data consists of signed integers in the specified depth: 8-bit as single bytes (-128 to +127) or 16-bit as little-endian words (-32768 to +32767). All samples use delta encoding for storage efficiency, where each value represents the difference from the previous sample point (starting from 0); during playback, values are reconstructed by cumulatively summing the deltas. For 16-bit samples, the data length in bytes is twice the sample length field value, while for 8-bit it matches directly. Looping operates on the decoded waveform: forward loops play from the start position to the end and repeat, while ping-pong loops reverse direction at the end point for seamless sustain. ADPCM compression, when present in extended files, packs 4-bit indices into bytes (two per byte), referencing the table for delta values before summing, reducing size by approximately 50% but potentially introducing artifacts.

Effects and Playback

Effect Commands

In XM files, effect commands are used within pattern data to manipulate sound during module playback, such as altering pitch, , panning, and playback flow on a per-channel, per-row basis. Each pattern event includes a dedicated byte for the effect type (values 0 to 26 , corresponding to 0-9 and A-Z) followed by a byte (0 to 255 ), allowing precise control over audio . These commands are executed tick-by-tick within each row, with many effects retaining their last non-zero if the current one is zero, enabling continuous application without repetition. Effects are processed after note and instrument triggers but before column commands in compatible players. The following table summarizes the primary effect commands available in XM, including their type values, parameters, and behaviors. Descriptions focus on FastTracker II compatibility, noting that some extended effects fall under type 14 (E), where the parameter's high nibble selects the subtype (e.g., E1x for fine portamento up).
TypeHex DisplayNameDescription and Parameters
00xyArpeggioCycles the note's pitch through the base note, base + x semitones, and base + y semitones every tick within the row; x and y are 0-15 (0 skips the step). Parameter 00 stops the effect.
11xxPortamento UpIncreases the period by xx units per tick (except the first tick of the row), raising the pitch; xx is the speed (1-FF). Retains last non-zero parameter.
22xxPortamento DownDecreases the period by xx units per tick (except the first tick of the row), lowering the pitch; xx is the speed (1-FF). Retains last non-zero parameter, separate from type 1.
33xxTone PortamentoSlides the frequency toward a new note's target by xx units per row (applied per tick except the first), without changing the sample; xx is speed (1-FF). Ignores new notes if parameter is 00; retains last non-zero.
44xyVibratoModulates the frequency sinusoidally (or per waveform) with speed x (0-F, ticks per cycle/32) and depth y (0-F, amplitude/2); applied every tick. Retains last non-zero parameters; uses default sine waveform unless changed.
55xyTone Portamento + Volume SlideCombines tone portamento (using speed from last 3xx) with volume slide (up by x if y=0, down by y if x=0, or both); x and y are nibbles (0-F), volume changes every tick except first. Retains parameters independently.
66xyVibrato + Volume SlideCombines vibrato (using parameters from last 4xy) with volume slide (up by x if y=0, down by y if x=0, or both); x and y nibbles (0-F), volume changes every tick except first. Retains parameters.
77xyTremoloModulates the channel volume sinusoidally (or per waveform) with speed x (0-F, ticks per cycle/32) and depth y (0-F, amplitude); applied every tick, clamped to 0-64. Retains last non-zero parameters.
88xxSet PanningSets the channel's panning position to xx (00 left, 80 center, FF right); takes effect next row. Reset by new instruments.
99xxSample OffsetStarts playback from position xx * 256 bytes into the sample (high byte offset); requires a note trigger. Retains last non-zero xx.
10AxyVolume SlideSlides channel volume up by x (if y=0) or down by y (if x=0), or both; amount 1-0F per row (applied per tick except first), clamped to 0-64. Retains last non-zero. Separate from volume column slides.
11BxxPosition JumpJumps playback to pattern order position xx (00 restarts from beginning); takes effect after current row. Only rightmost per row applies.
12CxxSet VolumeSets channel volume to xx (00 silent, 40 max, >40 ignored); takes effect immediately. Clamped in some players.
13DxxPattern BreakBreaks to row (x*10 + y) in the next pattern order; x and y from low/high nibbles of xx. Only rightmost per row applies.
14 (with param subtypes)ExxExtended EffectsSubtype selected by high nibble of xx; includes fine portamento (E1x up by x units on first tick, E2x down), glissando control (E30 off, E31 on for tone porta), vibrato waveform (E4x, x=0-7 types like sine=0), finetune (E5x sets temporary finetune -8 to +7), pattern loop (E60 start, E6x loop x times from start), tremolo waveform (E7x like E4), retrigger (E9x every x ticks), fine vol slide (EAx up x, EBx down), note cut (ECx volume=0 after x ticks), note delay (EDx trigger after x ticks), pattern delay (EEx repeat row x extra times). Retains where applicable; some buggy in original FastTracker II.
15FxxSet Speed/TempoIf xx < 20 (32 decimal), sets ticks per row (speed, 01-1F); if >=20, sets BPM (tempo, 20-FF). F00 sets infinite speed in XM (buggy). Affects all channels.
16GxxSet Global VolumeSets master volume to xx (00 silent, 40 max); affects all channels immediately.
17HxyGlobal Volume SlideSlides master volume up by x (if y=0) or down by y (if x=0), or both; 1-0F per row (per tick except first), clamped to 0-64. Retains last non-zero.
20KxxKey OffTriggers note release (envelope off) after xx ticks (00 immediate, but avoid); parameter often ignored beyond that. Used for cutting sustains.
21LxxSet Envelope PositionAdvances volume or panning envelope to frame xx (00-FF, but limited by envelope length); takes effect next tick.
25PxyPanning SlideSlides panning left by y (if x=0) or right by x (if y=0), or both; 1-0F units per row (first tick only for fine). Retains last non-zero; units are 1/256 of range.
27RxyMulti Retrig NoteRetriggers the note every y+1 ticks, adjusting volume by x (e.g., x=1 decreases by 1, x=9 increases by 1; see FastTracker table for exact); retains parameters. Buggy with portamento.
18Sxx? (Unused in standard XM)Not implemented in FastTracker II; some players ignore or treat as no-op.
29TxyTremorSets volume on for x+1 ticks, off for y+1 ticks per row; cycles until 00. Retains last non-zero; used for stuttering effects.
33XxxExtra Fine Portamento (extension)Non-standard ModPlug extension: X1x increases frequency by 4x units on first tick; X2x decreases by 4x units. Retains. Other X subtypes (e.g., X5 panbrello) are extensions in modern players, not original XM.
35ZxxExtended (Rare/Unused)Not standard in FastTracker II; some players use for MIDI macros or hacks, but original XM ignores or treats as no-op. Sub-effects like extra fine slides may appear in variants.
Note that types I (18), J (19), M (22), N (23), O (24), Q-Z (except listed) are either unused or reserved in core XM, with behaviors varying by player; compatible playback prioritizes FastTracker II emulation to avoid glitches. Volume column effects (e.g., fine slides, panning) complement these but are processed separately.

Envelopes and Automation

In the XM file format, envelopes provide a mechanism for automating parameters such as volume and panning over the duration of a note, enabling smooth transitions and dynamic control in tracker compositions. Each instrument can define up to two envelopes: a volume envelope and a panning envelope, each supporting a maximum of 12 points. These points are stored as pairs of 16-bit values, where the first value represents the frame number (ranging from 0 to 255, interpreted as ticks in the playback timeline) and the second the parameter value (0 to 64 for volume, scaling from silence to full amplitude, or 0 to 64 for panning, representing an offset from -32 to +32 relative to the channel's base position). Envelope configuration includes several key settings to control behavior during playback. A sustain point is specified by a single byte index (0 to 11), indicating the point at which the holds during a sustained note. Loop functionality is defined by separate byte indices for the start and end points (also 0 to 11), allowing the envelope to cycle between these points if enabled. Flags are encoded in a single byte for each envelope type: bit 0 enables the envelope, bit 1 activates sustain, and bit 2 enables looping. Between points, is applied to generate intermediate values every , ensuring smooth curves rather than abrupt changes. Envelopes are triggered upon the start of a note or when a new instrument is selected, resetting the frame counter to 0 and applying the envelope's progression to the affected channel throughout the note's duration. The envelope modulates the instrument's output , while the panning envelope adjusts the position; both interact multiplicatively with other factors, such as global and pattern-based adjustments. For note termination, a 16-bit fadeout counter (initialized to 65536) is decremented by the instrument's fadeout value per tick after key-off, scaling the channel multiplicatively until it reaches zero. Pattern effects like slides (e.g., commands in the volume column) operate alongside envelopes, adding discrete changes that are combined with the envelope's continuous modulation to the final channel , thus allowing hybrid control for greater musical expressiveness. This extends beyond row-by-row effects, facilitating automated swells, fades, and spatial movements that enhance the artistic depth of XM modules.

Software and Compatibility

Tracker Software

FastTracker II, released in 1994 for by the Triton group, is the original tracker that introduced the XM format. Developed by Fredrik "Mr. H" Huss and Magnus "Vogue" Högdahl, it supports up to 32 channels and 128 instruments, each capable of containing up to 16 samples with volume and panning envelopes. The software allows editing of patterns, instruments, and samples, with export directly to XM files, and it laid the foundation for subsequent trackers by emphasizing mouse-driven interfaces and multi-sampled instruments. Historical trackers related to XM include , which primarily uses the S3M format but influenced XM through shared effect commands and pattern-based composition; derivatives and modern emulations of S3M tools offer partial XM import and editing support. , focused on the IT format, provides XM compatibility via import, enabling users to load and edit XM files while adding features like per-sample envelopes not native to XM. These tools support core XM editing tasks such as pattern manipulation and sample adjustment, though with limitations in full spec adherence compared to dedicated XM editors. Among modern and open-source options, offers cross-platform support (Windows, macOS, , and others) and expands on FastTracker II's design with full XM specification compatibility, including accurate playback emulation and features for editing patterns, instruments, and samples. , the successor to ModPlug Tracker, is available for Windows and , providing advanced editing tools like VST integration while maintaining high compatibility for XM creation and . , a commercial tracker, supports XM and with extensions beyond the original spec, such as enhanced , allowing comprehensive pattern and instrument editing. Schism Tracker, an open-source reimplementation with an interface reminiscent of classic trackers, enables XM editing including patterns, samples, and instruments, with support for extensions like ADPCM compression. These tools collectively facilitate XM file creation by focusing on pattern-based sequencing, sample manipulation, and , often with improved user interfaces and broader hardware compatibility.

Media Players

Several desktop media players offer support for XM file playback, typically through dedicated plugins or built-in decoders that handle the format's module structure. , a popular Windows audio player, supports XM files via the DEAF Module Decoder component, which replaced the older foo_dumb plugin in versions 2.0 and later, ensuring accurate rendering of patterns, instruments, and effects. provides full native support for XM across Windows, , macOS, and other platforms, allowing seamless integration into playlists without additional setup. Audacious, a lightweight player for and systems, handles XM playback through the xmp plugin, which leverages the Extended Module Player library for high-fidelity reproduction. XMPlay serves as a dedicated, resource-efficient Windows player optimized for tracker formats like XM, supporting direct loading and playback with minimal overhead. achieves XM compatibility via the in_mod input plugin, which decodes the format's multichannel audio and effects commands effectively. Cross-platform options extend XM playback to broader environments, though support levels vary. MusicBee, primarily for Windows, incorporates XM via a dedicated chiptunes/tracker module plugin that enables library integration and playback of XM alongside other module formats. For Linux and macOS users, players like Audacious and VLC offer robust cross-platform access, while web-based tools provide basic browser playback without installation. Developer libraries and engines facilitate XM integration in custom applications. LibOpenMPT, the playback library from the project, supports full XM decoding for embedded use across platforms, emphasizing compatibility with behaviors. The BASS audio library includes native XM support, allowing efficient streaming and rendering in games and software, with options for MO3-compressed variants. μFMOD, an assembly-language library designed for resource-constrained environments, focuses on stripped XM files, enabling lightweight playback in demos and embedded systems. Certain limitations affect XM compatibility in mainstream players. offers support only on x86 architectures via optional filters, excluding the Universal Windows Platform (UWP) version. Some players fail to recognize variants like OXM files, which compress XM samples using while retaining the module structure, requiring conversion to standard XM for playback. Hardware emulation environments, such as systems via plugins like XMP-DELIX in XMPlay, can extend support to XM through wrapper decoders, though native hardware is limited to earlier formats like MOD. Online archives like ModArchive.org host extensive XM collections and provide integrated web playback, allowing users to stream modules directly in browsers without downloading. Many tracker software packages also include built-in XM playback engines for previewing compositions.

Comparison to MOD

The MOD format, originating on the computer in 1987 with early trackers like , served as the foundational standard for tracker music in the , constrained by the platform's hardware limitations. In contrast, the XM format emerged in 1994 as a PC-centric evolution developed by the Triton group for , enabling greater complexity to meet the demands of advanced productions. One key advancement in XM over MOD lies in channel capacity: MOD files are typically limited to 4 channels, with some variants supporting up to 8, reflecting Amiga's Paula constraints, whereas XM supports up to 32 channels (extendable to 64 in modern implementations), allowing for richer . Regarding sample support, MOD relies on 8-bit mono samples with a maximum of 31 instruments, each consisting of a single sample without dynamic control features, while XM accommodates 16-bit mono samples and up to 128 instruments, each bundling up to 16 samples with volume and panning envelopes for nuanced sound shaping. XM expands capabilities beyond MOD's basic command set (0–F hex codes) and Amiga-specific period table, introducing extended commands (e.g., E1x for fine ), a linear table option for precise pitch control, and compression to reduce . In terms of file structure, MOD employs a rigid layout with fixed-size , no dedicated instrument headers, and interleaved sample data following a simple table, whereas XM features a modular header system, packed for efficient storage, and distinct sections for instrument definitions and sample headers, facilitating more organized and extensible modules.

Comparison to S3M and IT

The XM and S3M formats both emerged in the 1990s as PC-based extensions of the MOD format for tracker music composition in the . S3M, developed for Scream Tracker 3, supports a maximum of 32 channels (with original software limited to 16 digital channels plus FM synthesis), features packed for efficient storage, and includes per-sample envelopes. In contrast, XM, created for , allows up to 32 channels in standard files (with some implementations supporting more), features packed for efficient storage, and uses instrument-level envelopes for and panning that apply across multiple samples. XM lacks per-pattern effects storage, relying instead on a dedicated restart position in the song header for looping structures, while S3M handles loops primarily through its order list mechanism. Compared to the IT format introduced in 1995 by , XM represents a more constrained but balanced approach within the tracker paradigm. IT supports unlimited channels and samples (practically up to 256), integrates samples directly into instruments with advanced features like New Note Actions (NNAs) for polyphonic handling, and includes sophisticated effects such as resonant filters and enhanced . XM maintains a fixed 32-channel limit, treats samples and instruments as linked but distinct entities (with instruments mapping up to 16 samples), and offers simpler effects without IT's filter controls or MIDI-like transposition per instrument. While IT diverges toward greater complexity with pitch envelopes and combined sample-instrument structures, XM prioritizes straightforward playback fidelity to the original engine. In terms of compatibility, XM enjoys broader support in media players and game engines due to its relative simplicity and widespread adoption, often requiring no specialized loaders beyond basic MOD compatibility layers. S3M and IT, while also extending MOD principles, demand more specific loaders for their packed patterns and advanced features, with IT being the most feature-rich but least universally replayed without extensions. Usage patterns reflect their originating software: XM dominated the scene for its user-friendly multichannel composition, S3M was prevalent in early communities emphasizing FM integration, and IT became a staple in the demoscene for its expressive depth.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.