Music Files in the Unreal Engine

By: Tyler Boyd
[email protected]

I've seen so many questions about UMX files and how they work on forums, I've decided to release a tutorial about it. This is very broad, and has more to do with PC audio in general than with Unreal editing, but I think it will be a useful tutorial when thinking about importing new music.

I've written this in response to some of the posts on the forum about importing your own music. I'm going to try to make this as in-depth as I can, so I may go off-topic, but this is just to give you a better understanding of what I'm talking about.

From what I've found, there are 3 types of computer audio. These are known as WAV, MIDI, and MOD. WAV is pure audio: the actual waveform that describes any sound clip. A WAV could be a voice, a beep, a guitar, or even an entire song. WAVs are generally very versatile. They come in 8 or 16 bit, Mono or Stereo, and basically any kHz quality value you can think of. You can edit them to your heart's content, adding effects like echoes, cutting and pasting portions of them, anything. WAVs are the ideal file format for any small sound effect or one-hit pad or instrument, but if you have a 5-minute, perfect-quality WAV file, you get terrifying file sizes. WAVs' file sizes are directly proportionate to their quality and length. Now, there is an exception to this rule: MP3s. They are a kind of extremely compressed WAV file, and that's why a 4-minute MP3 song is normally about 4 or 5 MB.

MIDIs are a lot more complicated. A WAV could be compared to the sound of a violin or a trumpet playing one note, but a MIDI could be described as a musical score to conduct the entire orchestra. This is why they are much much smaller than WAV files. If your computer supports MIDIs, it contains a sound bank of tiny WAV files. These WAVs are single blasts of trumpets, flutes, guitars, drums, anything you could find in a normal orchestra with some extras. What a MIDI file does is tell the computer to play these WAV files in a sequence(MIDI files are also called sequences). A MIDI file is a set of directions- that's all. The size of a MIDI file is directly proportionate to the amount of complexity to the song. The Mission Impossible theme MIDI would be a larger file size than, say a single note held out for an hour.

Now, MODs- the focal point of this article. A MOD is basically a self-contained MIDI. In essence it is just like a MIDI- it tells the computer when and how to play certain WAV files. So why aren't MOD files as small as MIDIs? MOD files actually contain the WAV files, or samples, to be played. Aside from UMX, there are four general types of MODs: MOD, XM, S3M, and IT. WinAmp can play all of these but NOT PERFECTLY. The bulk of a MOD's file size lies in the WAV files it contains. If you have 40 megabytes of WAVs contained in MOD, it won't matter if it's a 2-minute or 2-hour song. You'll still end up with about a 40 MB file size.

Now for the part you can actually use: You shouldn't convert a WAV file to UMX unless it's short and of terrible quality. And converting MIDI files to UMX isn't such a bad idea provided you do it correctly and maybe enhance it a little bit. I suggest that if you want to use custom music, you create your own in with ModPlug or another tracker.