DANCING ABOUT ARCHITECTURE #2
STUCK IN THE MIDI WITH YOU


I'd like to apologize for the lame pun in the title. I'm in a very strange and wacky mood as I write this :)

So, you've got yourself hooked up with a programmer who's working on the RPG that will take the indie game dev scene by storm when it's finished... There's one major question you need to ask yourself. Do you feel lucky? Well, do ya punk? The other question is what kind of format will you be using for the game? For this question you need to ask the programmer of the game. If you are the programmer then ask yourself, but make sure nobody's looking or they'll think you're kooky. The almighty and wise programmer will inform you what kind of musical formats the game's engine will support. If he doesn't know, smack him around a bit until he talks. If you have a choice between formats, they all have different advantages and disadvantages:

MIDI

MIDI songs have incredibly small file size, since only the note data is stored, and no sample data. It's also the most widely supported music file format, especially on the indie scene. It's usually your best bet, although it has a major disadvantage that it sounds different between computer systems, since the user's sound card supplies the samples. Anyone without a wavetable card (such as SB Live) will be subjected to music similar to the NES square wave symphonies, but without the nostalgic feeling. In Summary, MIDI is the "safe" choice.

MOD

There are many different variations and improvements on the MOD format, but MOD is the grandaddy of them all (I think). It's a rather old format, from the Amiga I think, but it has stood the test of time pretty well. Even the Unreal engine-based games (like... uh... Unreal) use a MOD-ish format. It is essentially a MIDI file that you provide your own samples for, so it sounds the same on any computer. This is probably your best bet for indie games because the file size is still relatively small and there are many libraries available for indie developers that support MODs.

XM/IT/S3M/etc...

These are the other MOD-ish formats that I warned you about a paragraph ago. They are based on the MOD format but have all sorts of neat bells and whistles such as MIDI-style volume envelopes, 16-bit sample support, more simultaneous tracks, more effects, and a free potato peeler! (A $20 value! But only if you order within the next five minutes!) Be warned, though. They aren't as widely supported, and some libraries may not play them the right way. You should test how your songs sound from the game's engine to make sure people hear what you want them to hear.

WAV

Don't use WAV. Files too big. Waaay too big. WAV bad!

MP3

Ah, much better. At about a megabyte of HD space per minute at CD quality, you may want to consider using MP3. You have complete control over exactly how you want your music to sound and everyone who plays will hear it that way. However, technically you need to purchase a license to use MP3 compression in any project. Before you fall on your knees and scream "NOOOOOO!" up at the sky while rain begins to spontaneously fall onto you, MP3 is not our last hope... there is another!

OGG

Ogg Vorbis is the latest in super duper audio compression. Better quality, variable bitrate, and smaller filesizes make this a superior format to MP3. And to make things even better, it's completely free to use and open source. Of course, Beta was better than VHS and look what happened there. Same thing with Ogg. It's better, but MP3 has all of the fame attached with its name already. But who knows? Ogg might take MP3's place one day. Support for Ogg is already included in the latest version of WinAmp so there may be A New Hope! (heh, that makes two Star Wars references in one column. It must be because I'm going to see Episode II tonight. Hope it's good. Now, where was I?)

So, there's your options. I don't think I missed anything there. If I did, I will smack myself in the face out of sheer embarassment and grovel for forgiveness.

XMark