Long before there was MP3, Ogg Vorbis, and Windows Media Audio, there was tracked music (see Figures 10.1 and 10.2). Tracked music blipped onto the game radar in the early nineties and has remained a very popular way to implement game music, especially for games distributed online. That's because it hits a sweet spot between quality of music and the size of that music on disk. Whereas a typical MP3 file will run you 3-4MB, tracked music requires usually one tenth that amount, and still sounds great.
Figure 10.1: A screenshot of Impulse Tracker, a popular tracked music editor written by Jeffrey Lim.
Figure 10.2: A screenshot of ScreamTracker, another popular tracked music editor, written by Sami Tammilehto.
In this chapter, you'll learn how tracked music works, and how to incorporate it into the audio engine using the MikMod API, a GNU GPL library that makes loading and playing tracked music easy.