XMOD2

    Page Graphic

A MOD playback engine I wrote.

Home

   

Introduction

As part of a game engine project I began as early as 1998, I wrote a MOD playback engine, called xmod. The original xmod was not particularly well written. It used floating-point math for calculating instrument positions, it was hopelessly bound to the OSS sound interface, and many other such things.

About a year ago, I modernized xmod, adding a lot of missing functionality to it. It sounded much better, but still suffered many of the same limitations as the original. So I rewrote the whole thing, from scratch.

The result is xmod2. At first, the goals were simple: rewrite xmod, but using a fast, integer-based stretchblit algorithm for the audio playback instead of the old floating-point code. This time around, I used SDL for raw sound output. SDL has a very nice, minimal sound API, and it has the benefit of being cross-platform. In fact, xmod2 has run successfully on three operating systems: Linux, Windows, and Cy/VOS (although the Cy/VOS port didn't use SDL at all, and tied xmod2 directly into the SB16 driver in the kernel).

The current version of xmod2 (V2.3) has a few special features above and beyond basic playback. It supports inter-channel intermixing (where sound from the left channel is mixed into the right and vice versa), which drastically improves the stereo sound. It also has an IIR comb/allpass reverberator on the output, which adds a resonant quality similar to what would be found in a large, resonant room.

Download







All material on these pages is Copyright (c) Jennifer E. Elaan. Vim