Making A Sound File For Duke3D v9-18-2012 Release 1
© RTCM Corvin
Introduction | Sound Specifications | Opening Anm | Adding to CONs | Sounds In Build | Echo Bug Introduction
Note: This document was created several years before EDuke32 which now supports the higher quality snd type of OGG, in both the CON and DEF files. If you prefer to use OGG then see EDuke32.
Duke Nukem 3D has several definition types you may use in the game. One of these is defining new sounds you may use in your user created maps or game. All the sounds for Duke Nukem 3D are defined in the USER.CON file, however, you can put a definition in any of the CON files you like, as long as it is defined before you call it. See the USER.CON Document for all the details. Follow the steps below to totally incorporate your own sound into DN3D. If your looking to replace a midi/mid song, See the con-user-con Document. Also refer to it for the Sound table that describes existing game sounds. Sound Specifications
The program expects to find and use any sound file that is :
Duke uses mono snd files(VOC or WAV) and "adds" stereo during the game. Duke will not playback stereo created snds. Most internal snd files are created and played back at a rate of 11025. This would be the sampling rate in your Sound Creation Tool. You can sample all the way upto 22050 on most systems, and the snds can be 8-bit or 16-bit mono, This is important: However the game likes straight foreword snd formats, so upon saving use a more common type of compression, like straight forward PCM. Duke will not playback complicated snd formats. Remember that these snds won't play back at the quality you make them, unless your Duke setup is configured the same way. (I suggest editing the duke.cfg file to set Duke's Mixing rate precisely, See RTCMs related document.) For an example; If your snd is recorded at 11025 then you should set your duke.cfg file MixRate at 22050. Since the snds are mono and duke internally "adds" stereo spatial effects. The sound will playback at 11025 per speaker/channel. Thus a snd recorded at 22050 would require your duke mix rate to be 44100. It's preferable you don't sample snds higher than 11025 and duke mixrate at 22050, Unless of course the game performs smoothly on your system. High Mixrate can 'cause the game to freeze for a second or two, resulting in dropped frames. You can add Effects to your snds... If you use any reverb or echo, try the snd under water to see how the game handles it 'cause the game adds its own pitch and reverb/echo combinations. If the sound performs poorly, remove or reduce the effects used. Also clean your snd files up, remove hiss and unwanted static, and clean the ends of the files so there's no pops. This will reduce the snd file size and provide better overall performance when played back in the Apogee Sound Engine. Note: When sounds are played back in Duke they will sound slightly different then from your Sound editor or playback tools. The Apogee Sound Engine uses internal filters of its own. Don't forget to double check the sound playback. Opening animation for Duke 3D
Making sounds for the opening intro screens have to match the animation screens. Record your sounds to last the entire length of the Startup screen per display. Note: Changing the Explosion sound will alter the sound within the game as well. Sounds played(intro); 244 FLY_BY - Startup sound (at nuke symbol) Adding to CONs
Before we add your new sound files, you should move them to the games directory. Once you've done this, read RTCMs USER.CON Document, the section to look for is 'definesound' Using Sounds In Build
Note: The following is info related to playing the DOS game in DOS or a WinDOS-Box with newer PCI cards. This does not pertain to the new third party emulator DOSBox.
Newer PCI snd cards tend to crash most build games, if not all. This may occur in map
sectors where the Echo(reverb) settings are switched on Such as water, sewers, subways
etc... ). Test: To test your Game/Soundcard, first determine that your game runs and operates without any-errors. Next load and try to enter E1L4(the start of the level puts you directly in a nice "Ensoniq Bug" fallout) If the game crashes or freezes...this Bug may be your problem. Make sure you have the CD in the drive, so you don't mistake the normal "Put CD in Drive" game dropout with the Sound crash. Basic Help:
Workaround: Ken Silverman has released an Echo Snd patch/workaround for Duke3D and a couple of other BUILD Games, It patches the game.exe to switch off Echo playback. However Reverb through out the game is also switched off as a result. Download The patch from his Build Site
|