Call of Duty 5: Custom Sound 2: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
This tutorial explains how to encode soundfiles for World at War. This CoD title does not support MP3, but different types of WAVE: uncompressed PCM, xWMA, ADPCM and WAVEbext. They all need a proprietary data block, called PRIV chunk. You can create it with the modtools' MODSound.exe as described below. | This tutorial explains how to encode soundfiles for World at War. | ||
This CoD title does not support MP3, but different types of WAVE: uncompressed PCM, xWMA, ADPCM and WAVEbext.<br> | |||
They all need a proprietary data block, called '''PRIV chunk'''. You can create it with the modtools' '''MODSound.exe''' as described below. | |||
__TOC__ | |||
== Setup sound encode environment (once) == | == Setup sound encode environment (once) == | ||
Line 50: | Line 56: | ||
</p> | </p> | ||
Read the above guide how to setup the sound encode environment! | Read the above guide how to setup the sound encode environment! | ||
</li><li> | |||
MODSound.exe choses xWMA or ADPCM compression automatically. It will encode sounds from <code>raw\sound\stream\</code> with ADPCM, as xWMA streaming isn't supported by the engine. So don't try to use an xWMA encoded wav as streamed music track, it will not work! | |||
</li></ul> | </li></ul> | ||
Latest revision as of 00:17, 26 April 2012
This tutorial explains how to encode soundfiles for World at War.
This CoD title does not support MP3, but different types of WAVE: uncompressed PCM, xWMA, ADPCM and WAVEbext.
They all need a proprietary data block, called PRIV chunk. You can create it with the modtools' MODSound.exe as described below.
Setup sound encode environment (once)
Sound encoding won't work if there are any spaces in the folder paths, special characters might also cause problems. As the default installation path of the game contains spaces and renaming the directories would potentially break the game, I suggest to set up a new folder structure for sound conversion.
- Create a folder on any drive, in any subfolders you want, but with no spaces in path!
For instanceD:\Games\ModSound\
(will be refered to as modsound dir)
Bad:D:\Games\sound path\
- Create these 8 subfolders:
ModSound\bin\
ModSound\raw\
ModSound\raw\soundaliases\
ModSound\sound_assets\
ModSound\sound_assets\raw\
ModSound\sound_assets\raw\sound\
ModSound\sound_assets\raw\sound\SFX\
ModSound\sound_assets\raw\sound\stream\
- Copy MODSound.exe from CoD modtools to your ModSound\bin\ folder (and keep explorer opened for later)
- Get Microsoft's DirectX SDK: Download SDK June 2010 (currently latest)
- Open the downloaded file (
DXSDK_Jun10.exe
) with 7-Zip, e.g. right-click in explorer on the file, 7-Zip > Open - Navigate to DXSDK\Utilities\bin\x86\
- Select AdpcmEncode.exe and xWMAEncode.exe, drag and drop them into your modsound's bin dir:
ModSound\bin\AdpcmEncode.exe
... - Rename xWMAEncode.exe to WMAEncode.exe (leading "x" stripped off)
- Get the zip-package of the latest SoX tool (Sound-Exchange): Download SoX v14.4.0
- Open it with 7-Zip or the like and extract the following files to your modsound folder's
bin\
directory:- libgomp-1.dll
- pthreadgc2.dll
- sox.exe
- zlib1.dll
- Done, your sound encoding environment is ready to go!
Convert sounds and soundaliases
- Copy your custom soundalias file(s) from
CoD5\raw\soundaliases\
toModSound\raw\soundaliases\
Soundalias CSV creation is not covered here, check other tutorials and stock CSVs (you may use Open Office to view them).
Note: Don't forget the column header line, which goes likename,platform,file,sequence,vol_min
... or it won't work at all! - Convert the sound files you wanna use to WAVE (Microsoft PCM 16-bit) using Audacity if they aren't already wav (e.g. mp3 to wav).
You may also re-export wav files with fancy sample rates (other than 11025, 22050, 44100, 48000, 96000) or if you experience problems with sound conversion later on. - Put them into subfolders of
ModSound\sound_assets\raw\sound\
, streamed audio goes intostream\...
and sound fx intoSFX\...
Create missing subfolders, like stream\music\ for streamed music tracks or e.g. SFX\weapon\MG\ if it's going to become a MG sound. - Sounds shouldn't be directly placed into
ModSound\sound_assets\raw\sound\
, they may not work! - Go to
ModSound\
in explorer, select bin folder, hold Shift and right-click on it. Context menu opens, click Open Command Window here (also see here)
Alternatively, hit Windows key, type cmd and hit enter to open a command prompt. If it says C:\... but your ModSound folder is on D:\..., typeD:
(drive letter and colon) and hit return. Change to ModSound\bin\ folder withcd the\path\ModSound\bin
(e.g. Games\ModSound\bin) and hit enter - Type
modsound -pc -verbose -aliasfiles your_aliasfile_name
If the soundalias CSV isModSound\raw\soundaliases\mp_yourmap.csv
, your_alias_name would bemp_yourmap
(Note: modsound is not the ModSound directory, but the executable modsound.exe) - If you wanna force it to encode all sounds even if they been already converted, add
-clean
, e.g.modsound -pc -clean -verbose ...
- As soon as you hit return, encoding will start and some info will be displayed. Hang on, especially ADPCM encoding can last quite a bit!
- When it's finished, copy the encoded sound files from
ModSound\raw\sound\
toCoD5\raw\sound\
- Add the soundalias CSV to your zone file:
sound,mp_yourmap,,all_mp
(for SP: all_sp at the end) - Add sound fx (from
SFX\
folder) as well.
Example forraw\sound\SFX\weapon\MG\shot.wav
sound,SFX/weapon/MG/shot
- Build fastfile with your zone file (either using Launcher or a batch script).
- Pack streamed audio as IWD (not covered here).
Example forraw\sound\stream\music\mytrack.wav
mp_yourmap.iwd\sound\stream\music\mytrack.wav
- The soundaliases defined in your soundalias CSV should now be available. Note: You may have to place fastfiles / IWDs into
%localappdata%\Activision\CoDWaW\usermaps\mp_yourmap\
!
Trouble shooting
-
ERROR: .../sound_assets/MODSound.hst : file not found
You can ignore this error message, MODSound.hst will be automatically created.
-
If there are spaces or special characters in the folder paths to your ModSound directory, the following errors will occur:
Converting D:\CoD5\path to space\sound_assets\raw\sound\SFX\test_raw.wav failed with
error ERROR_FILE_NOT_FOUND (The system cannot find the file specified)
ERROR: Couldn't open input file.Read the above guide how to setup the sound encode environment!
-
MODSound.exe choses xWMA or ADPCM compression automatically. It will encode sounds from
raw\sound\stream\
with ADPCM, as xWMA streaming isn't supported by the engine. So don't try to use an xWMA encoded wav as streamed music track, it will not work!
--CoDEmanX 22:03, 25 April 2012 (IST)