The radical music of SlipSpeed

By Martijn Frazer

Chiptunes for DOS

SlipSpeed is an upcoming top-down racing game for DOS and Windows 95/98 PCs, made in the tradition of early 90s shareware. It's a project by Tom "voxel" Purnell, who is doing all the coding and graphics and whatnot. For some reason I was put in charge of the music, and as a fan of both DOS and racing games, I'm more than happy to contribute.

I feel that everything involved with creating chiptunes for DOS is a bit of a murky world to outsiders. Although a lot of people are aware of for example the SID chip inside a Commodore 64, I get the impression the OPL chip found on AdLib and SoundBlaster cards is a lot less embraced by both people inside and outside of the scene. Maybe I'm wrong, but when I visisted a demo party in Germany last year, I think I was just about the only one with an OPL3 / DOS music entry. So I thought I'd take this opportunity of working on an actual DOS game to share some of the background, explain the technology a bit and hopefully demystify the whole thing.

You can listen to the music at the bottom of the page, in case you want to jump straight to that.

A soundtrack in less than half a megabyte

Now because SlipSpeed is running in DOS, one of our goals was to make sure the game fits on a floppy disk. A 3.5" high density diskette has a capacity of 1.44 MB. With the game taking up about 0.9 MB, that leaves about half a megabyte of disk space for the whole soundtrack.

A floppy disk which is divided into two parts. One part is about 2/3 of the total and says '900 KB Game'. The remaining 1/3 says '500 KB Music'.

For comparison, an MP3 file that takes up 0.5 MB can fit about 30 seconds' worth of music when encoded at 128 kbps. That's a bit short for a whole game's soundtrack, so this approach is not really the way to go ahead.

We did consider forgetting about floppy disks and using CD instead. A standard CD-ROM has a capacity of 650 MB and since the game is still only 900 KB, that leaves loads of space for music. We could even use actual "Red Book" CD audio, so the music could play in any CD player. It's a neat idea, but doesn't really work with the whole "shareware" concept. It also just doesn't feel right to have the music take up so much more space than the entirety of the game itself. So we decided to do what the demoscene people do, and use a tracker.

Trackers: what do they do? Do they do things?? Let's find out!

Trackers originated in the late 80s on the Amiga, but quickly found their way to other systems. It became a popular way to make interesting-sounding music that takes up very little disk space and has been used in tons of demos and games over the years.

Ultimate Tracker for the Amiga is the original tracker software that started it all
Ultimate Tracker for the Amiga is the original tracker software that started it all.

There are a lot of different tracker programs available, but what they all have in common is that they offer a bunch of channels which hold information on what note to play at what time, typically presented next to each other in columns. The music is then played from top to bottom, triggering notes and effects in each of the channels as the playhead moves down.

The reason why music produced using a tracker is so small in filesize compared to digital audio files, is that a tracker file only contains the information stored in the channels. It can be compared to how MIDI files work, which also only store which note to play at what time and using what instrument, but not the actual sound that is produced as a result.

With MIDI, the note information is typically sent to a MIDI-compatible sound device, such as a synthesizer or a sampler which contains a set of sounds known as General MIDI. This acts as a "standard library" for music, including such things as various "pianos", "guitars", "basses" and so forth. The composer simply selects which of the 128 available sounds they want to be used with what channel, and the MIDI sound device will do the rest. And while this is pretty convenient, there is little extra what the composer can do to spice things up a bit. There are no real effects which can be used, and sounds can only be manipulated in very limited ways. This is why MIDI music often feels a bit basic, because in all honesty - despite some commendable efforts - it just kind of is.

Things are very different however over in the world of trackers, where there isn't such a "standard library" of instruments at all. In fact, the way sound is produced between different trackers can vary wildly. The oldest trackers started by using audio samples, which are simply very short sound clips. By pitching these short clips up and down, you can make a single sample play all the different notes found on a piano, while still only occupying minimal disk space. On top of pitching, most trackers offer a wild array of features to further control and enhance the sounds that are played back, from varying the start and end positions of the sample to all sorts of effects.

Some systems are very capable at playing audio samples, such as the Amiga with its 4-channel built-in hardware mixer. But other systems have very different audio hardware capabilities and thus require a different approach in how to generate sounds. Some systems have a built-in synthesizer chip, which can produce various sounds in real-time by adjusting a bunch of parameters. Examples of these are the Commodore 64 with its SID chip, or the NES/Famicon with its own weird 5-channel audio system. There are all sorts of trackers available which support all kinds of different systems. Including ones that work for DOS games.

A typical mid-90s DOS machine is probably more than capable of playing Amiga-style sample-based tracker music. But there is also a popular synthesizer chip available in one form or another in a lot of PCs: the OPL3. And that's what we decided to use for SlipSpeed.

Getting RAD

There are various trackers available to create OPL3 music with, but the one we went with is RAD Tracker v2. It's the same tracker I used to create my entry for Revision 2019, so I was already a little familiar with it. Trackers can have quite steep learning curves, because each one has their own unique idea of what makes a good user experience and workflow, so knowing how to work with a particular one is a big timesaver.

Originally RAD Tracker was released in 1995 by a demo group called Reality. RAD Tracker stands for Reality ADlib Tracker, as it only supported the OPL2 chip as found on AdLib cards at first. Bizarrely however, Reality released an update of their app in the year of our lord 2018 (!), adding OPL3 support among other improvements.

The opening screen of RAD Tracker v2, copyright 1994-2018

The download on their website says it runs on Windows & Mac, but the package actually also includes an executable which runs in MS-DOS (and by extension, DOSBox, so you can run it in Linux just fine). That is not the only goody present in the download however; it also comes with code examples of how to implement a RAD file player. This made it relatively easy to include OPL3 playback from RAD files into our game.

Enough with the text already, what does it sound like?

I'm honestly impressed you've made it this far into the article. I didn't have a real plan when I started writing this and it's gotten a lot longer than I ever thought possible. So let's take a quick break and do some listening.

These are the seven songs that are included with the shareware release of SlipSpeed, playing inside RAD Tracker v2 in DOSBox:

I started by making the racing songs, which are played in the background during the actual gameplay. Each course has its own song (which means I've got quite a few songs yet to make for the full game, welp). The main idea was to make thumping beats, because I feel that sort of music just works well with racing games. Some are based on a basic four-to-the-floor pattern, while others are venturing more into the realm of drum & bass, but my goal was always to make them fun and danceable. As WipeOut proved in the 90s, there's a surprising overlap between what you want to hear while racing virtual pods and what you want to hear at a rave.

One of the difficulties with the OPL3 synth is to make good drum sounds. I often ended up stacking multiple drum hits on top of each other to make them sound loud enough. The other sounds were much less of a problem to create and I feel the end results for most instruments are not bad at all, even though most of the available waveforms in OPL3 are a bit avant-garde.

With the theme song I tried to include more melodic lines and catchy hooks to make the whole thing more memorable. The end song is basically a reprise of the theme song, preceded by an epic "guitar" solo. All in all I'm pretty happy with how everything turned out; I hope you can agree!

Conclusion

The question left unanswered so far is, of course: did it work? Did we manage to make a whole game's worth of music in less than the 500 KB of disk space we had available? Can we fit this game on a floppy disk now? These RAD files might be small, but how small are they really? Well let's have a look, shall we.

A file browser showing the .RAD files created for SlipSpeed, with a filesize between 7 KB for the largest and 593 bytes for the smallest one.

Turns out RAD files are really quite small indeed. This makes sense of course, as they don't actually contain any audio at all. They consist only of instructions for the OPL chip: when to play what note with which parameters.

All of the music I've made for this game so far combined are about 41 KB. Of course I still have some more tracks to make, so we might end up more in the region of 80 or 90 KB, but even so we'll easily stay well within our 0.5 MB budget. And that of course means we'll be able to put the game on a floppy disk, which was our goal from the start.

If you want to check out the results, head over to itch.io where the shareware version of SlipSpeed is available for free. From there you can also buy the full version of the game. And last but not least you can order the whole thing on an actual floppy disk too!