What is MIME type "audio/xm"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

audio/xm marks files that contain module music data. These files combine sample data with sequencing instructions. They let tracker software read patterns and play sounds dynamically.
Common file formats using this MIME type include MOD, FAR, XM, IT, STM, AMF, MED, WOW, DMF, S3M, 669, MTM, MT2, ULT, and OKT.
This module format is valued for its compactness and versatility in music production. For more details, see Wikipedia: Module file.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: audio/xm    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="audio/xm">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'audio/xm');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

How do I open files with the audio/xm MIME type?

You need a specialized media player or tracker software to open these files. Popular options include VLC Media Player, Winamp, or dedicated tracker tools like OpenMPT and MilkyTracker. Standard audio players often require plugins to decode module formats like XM, MOD, and IT.

Why won't audio/xm files play directly in my web browser?

Modern browsers (Chrome, Firefox, Safari) do not have native built-in support for tracker module formats. To play these files on a website, developers must use JavaScript libraries that utilize the Web Audio API, such as libopenmpt (via WebAssembly) or cowbell.js.

How do I configure Apache to serve .xm and .mod files correctly?

You can add the MIME type definition to your .htaccess file or main configuration. Use the directive AddType audio/xm .xm .mod .it .s3m to ensure the server sends the correct Content-Type header instead of a generic binary type.

What is the difference between audio/xm and audio/mpeg (MP3)?

Files served as audio/xm contain sequencing data (notes, patterns) and instrument samples, acting like a digital sheet music file with embedded sounds. In contrast, audio/mpeg stores the final recorded waveform. This makes module files significantly smaller but requires specific software to synthesize the audio during playback.

Is audio/xm a standard IANA MIME type?

No, audio/xm is not officially registered with IANA, but it is a common convention used by web servers and the demoscene. You may also encounter vendor-specific variations like audio/x-xm, audio/x-mod, or audio/x-it for specific extensions like IT.

How do I add audio/xm support to Nginx?

Edit your mime.types file or the types block in your server configuration. Add the line audio/xm xm mod it s3m; to associate these extensions with the MIME type. This prevents the browser from treating the music files as generic downloads (application/octet-stream).

Why are audio/xm formats popular in the demoscene and retro gaming?

These formats allow for rich, multi-channel music with extremely small file sizes. Because the music is generated in real-time from patterns and samples rather than pre-recorded, a long song can fit into a few hundred kilobytes, which was essential for older hardware and floppy disks.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.