This tutorial will show you how to optimize your custom audio in your WAW Mod/Map. I will be showing you several ways to dramatically decrease file size and memory usage while maintaing good sound quality.
In this tutorial it is assumed you already know the basics of soundaliases and converting sound.
I'll break this down into a few parts:
You'll need Audacity. Here is a download link if you don't already have it.
Exporting your sound file correctly and efficiently
1.Import your sound file into Audacity. You can just drag and drop.
2. In the bottom left of the window you'll see a small tab that says 'Project Rate (Hz).' In the dropdown under that, change the number to 32000. This will lower the file size by decreasing the sample rate and therefore quality of the audio, however this difference in quality is typically very trivial, if even noticeable. Some sounds might suffer more than others though, and if your sound quality decreases too much, changing it back to 44100 isn't too big of a deal. 3.Press CTRL + A.
On the toolbar at the top of the window, go to Tracks > Resample. The number in the dropdown should be the same as the number you used in Step 2. Press OK.
4. On the tool-bar at the top of the window, go to File > Export > Export Audio. Save your sound file as WAV (Microsoft) signed 16-bit PCM
5. A window titled 'Edit Metadata Tags' will probably pop up. Near the center of this window you should a tab that says 'Clear.' Click that a couple times. Press OK.
Your sound file should now be exported to the correct format, with a good balance between file size and sound quality.
Stereo Sound vs. Mono Sound - which to use and when
When to use Stereo Sound: Stereo sound can only be used for 2d sounds in-game. Attempting to use stereo sound for 3d sound ingame will cause the audio to sound very glitchy and spam the console with errors.
STEREO PROS & CONS
+ sounds very nice when used correctly - cannot be used for 3d sound - larger file size
When to Use Mono Sound: Mono sound must be used for 3d sounds in-game. You can still use it for 2d sounds, however it will not sound quite as nice as Stereo.
MONO PROS & CONS
+ smaller file size + can be used for both 2d and 3d sound - when used for 2d sound, it doesn't sound as nice as stereo
HOW TO CHANGE A STEREO SOUND TO MONO
1. Open your sound file in Audacity
2. Press CTRL + A
3. On the tool-bar at the top of the window, go to Tracks > Mix > Mix Stereo Down to Mono
4. Export your sound in the correct format - WAV (Microsoft) signed 16-bit PCM
Changing Mono to rich Stereo is a bit more complicated so I won't demonstrate it here. Apologies.
Streamed Sound vs. Loaded Sound - which to use and when
People too often are loading their sounds very inefficiently and they often end up having each sound file be included in both their FF and in their IWD. Doing that just needlessly increase file size and memory usage.
HOW TO CHANGE WHETHER A SOUND FILE IS LOADED OR STREAMED
Open your soundalias(es), preferably with Microsoft Excel or a similar program. Under the header 'type' you need to put either 'streamed' or 'loaded' for each soundalias. Pretty simple.
WHEN TO USE STREAMED & WHEN TO USE LOADED
When to use Streamed: Streamed should be used for all 2d sounds. One exception to this is 2d weapon sfx (like reloading sounds, for example), which should be Loaded. Sound files that are Streamed must be included in your root/mods/mapname/sound.
When to use Loaded: Loaded should be used for all weapon sounds and all 3d sounds. Sound files that are Loaded must be included in root/raw/sound but MUST NOTbe included in root/mods/mapname/sound.
Last but certainly not least, converting your sound using ADPCM compression
The standard converter that comes with the modtools uses an uncompressed format, which results in huge file sizes. I'll show you how to convert your sounds using ADPCM compression. You should see a decrease in file size by ~75%!
I should note that this is a modified version of Megadeth9811's conversion_kit, however his used xWMA compression which is not as good as ADPCM.
Make sure you put your conversion_kit folder in a directory that has no spaces.
Bad Example:C:\Users\Blah\Desktop\Mod Tools\conversion_kit
Good Example: C:\Users\Blah\Desktop\Modtools\conversion_kit
HOW TO CONVERT YOUR SOUND USING ADPCM COMPRESSION
The steps that follow all take place in the conversion_kit folder, NOT in your WAW root.
1. Place your unconverted sounds into conversion_kit/sound_assets/raw/sound as you typically would.
2. Place your soundalias into conversion_kit/raw/soundaliases as you typically would.
3. Navigate to conversion_kit/bin and run convert.bat by just double-clicking it.
4. The converter will convert your sounds to Compressed ADPCM .WAV format, and your newly-converted sound files should show up in conversion_kit/raw/sound.
5. Your sounds are now converted in ADPCM format! You should notice a drastically lower file size compared to the standard uncompressed format. Now just remember to include your soundalias in a a zone_source file.
And that should be everything. If you have any suggestions or ideas please share!
Last Edit: March 13, 2022, 03:48:00 pm by jojo8624