Importing Music: Unreal/Unreal Tournament

Between each Unreal Engine 1 game a vast majority, if not all, share the same music system which means this tutorial should apply to any of them. The one disadvantage musicians may face is the software used. In this day and age I can't imagine many musicians in the mod community have ever used a Tracker. Not Buzz or Milky which only have interfaces inspired by trackers, but the real McCoy. No synthesis, VST/DX or wavform manipulation effects. Trackers are a small step up from general midi editors responsible for the tunes that many websites used in the early nineties that was all the rave. Unlike general midi that depends on the computers midi synth to render the audio, trackers use a small library of wav samples which are rendered with a descending piano roll style sequencer. While some of the general concepts are still used by more modern software, composing music in a tracker is a world apart.

While games of the time were moving away from midi based music and using more streaming audio from CD or waves, Epic chose to adapt a mod format for it's music system. The advantages it had over streaming music were huge. By design most mods were very small in filesize yet when compared with other software of the time, were capable of producing music with equal complexity and quality. Another advantage would be more specific to the nature of the game Epic was designing, Unreal. In it's time no other game was capable of crossfading music. This lent to the player's experience. Music could dynamically change based on location and the events taking place giving the game a more cinematic feel. Unique intros, a feature made possible by MODs native ability to loop back to any pattern the artist desired, also played a role. While the music itself is held more to personal taste, the music system was highly innovative. Deus Ex even expanded on this allowing music to pick up playing from where it left off when it was cross-faded to another song and back.

Learning to use a tracker is something beyond the scope of this article. There are many good tutorials on this subject already, many of which are specific to each type of tracker. However I would recommend using a tracker that exported one of the importable filetypes supported by Unreal Engine 1. Some trackers are easier to work with and can export multiple filetypes so a little research can go a long way. I'd recommend choosing a tracker that has an active community, is well documented, and can export into one of more of the following filetypes: Amiga Modules (.mod), Scream Tracker3 (.s3m), Scream Tracker2 (.stm), Impulse Tracker (.it), Fasttracker 2 (.ft2), Farandole (.far), CompasD (.669).

Once you've gotten some experience with the tracker you'll see that conceptually it's not very different than modern software. While there may be some apparent limitations these can be bypassed to an extent with a little creativity. When saving your music you will want to choose a filename that has no spaces and no non-alphanumeric characters. Before you go about trying to import the music you'll want to copy it into the game's music folder. UnrealEd may sometimes have problems importing content from folders that contain spaces (such as \Documents and Settings\...).Understand that the music rendering system written for Unreal Engine 1 is very basic. It will play music but not always as you have written. This is largely effected by different types of flags that are available in a tracker. This is not the end of the world though. For every Volume Command in a tracker there is almost always an Effect Command that will perform a similar function. Some commands even produce unexpected results. This means that once you have written your song you will need to preview it in UnrealEd and possibly make adjustments for your music to be rendered the way you intended. The most effected features are those found in the Impulse Tracker format though MODPlug Tracker seems to make good use of alternatives (with many Volume Commands and Effect Commands serving the same purpose and creating samples of wavs imported as instruments). There is also a very brief and general article about the music system hosted on Epic Games' website here.

Protip: Adding the "Surround On" Effect Command (S91 for Impulse / MODPlug Tracker) to a channel will simulate a reverb type effect for samples in that channel in Unreal Engine 1 titles that use Galaxy to render audio.

Importing MODs

All the hard work is done in the tracker. Importing music into Unreal Engine 1 games is hardly any effort. Open UnrealEd and click the music note icon on the top toolbar. This will open a music browser window. In that click on File and Import then select your mod music. You will be asked to enter a name, just enter the name you've chosen for the mod. After it loads you can preview the music here by either clicking the play icon or double clicking the filename. Saving is as simple as clicking File and Save. It will be saved as *.umx. Technically there is not much difference in the filetype. UnrealEd rewrites the header information but the data stays the same. It's likely you can even open this file with your tracker.

It is important to note that the music will be downsampled during playback. The resample rate can be adjusted by editing one of the game's configuration files. While this will cause the engine to render the audio at a higher rate there will still be an audible degree of downsampling performed.

Overview

  • Click the music note icon.
  • Click file, import, and select your music mod.
  • Chose a name and click OK.
  • Click file and save.

Emerging Technologies

While Unreal Engine 1 games are quite old by industry standards there are still many people creating new content and tools for players and other developers to use. One such tool are new audio rendering devices for Windows, FMOD and OpenAL . While the original audio device will continue to downsample music, FMOD and OpenAL render all audio, music and sound effects, at the rate specified in the game's configuration file. Unfortunately there is nothing you can do other than suggest that people use these devices. In it's defense FMOD and OpenAL are relatively new drivers for Unreal and Unreal Tournament and the player's choice of using them or not will not create any incompatibilities. While these new devices are superior, not using them to render audio will not prevent the player from playing the game. Some people using onboard sound may even experience more problems using these new drivers. While they are not mandatory, FMOD and OpenAL do a much better job of rendering audio, offering a choice preserves compatibility with clients that continue to use the Galaxy audio system that comes with the game.

The newest audio component to enter the Unreal Engine 1 scene is the RMusicPlayer . It relies on FMOD to render streaming audio for music. The player is still in development but has seen several stable, functional builds. While it may not be considered complete, RMusicPlayer is feature rich and has many advantages over MOD music from a musician's and listener's perspective. The only disadvantage is it's propagation. Not many players have adopted it's use and may not even be aware such a thing exists. There are still musicians asking how to convert streaming audio to MOD format. RMusicPlayer and FMOD are being featured in several high profile projects in the Unreal singleplayer community which will hopefully aid in more players becoming aware of the new audio options that are available to them.

If you'd like to tell me how wrong I am or that by some mistake you actually found this tutorial useful, let me know here.