Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
Thread Tools
Old 24-11-06, 14:46   #1
Titak's Avatar
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,798
Default Sound issues


The LE uses two different sound types: Audio and sound effects .

The audio files are located in the TRLE/Audio folder and they are in *.wav format.
The audio files are basically background music, like background ambience, thrill music, mysterious music and offcourse the well known secret tune.

The files are numbered 000 to 111. You can replace existing files with new ones or you can add files. TRLE only came with a couple of audiotracks, but the LE won't accept files with numbers higher than 111!
It simply won't recognise any numbers higher than 111.wav and the audio won't be played ingame even when it is triggered correctly in your project.

WAV Format:
Microsoft ADPCM
44100 kHz
4 Bit

The audio files need to be activated with a trigger.

Open the trigger type window and choose CD in the trigger box.
Put in the number of the audio file you want to be triggered in the box next to it.

Audio files can only be played once in a level.
Exceptions are 005.wav (secret tune) and the background audio loops.

Unless... you change the codebits of the trigger. You can trigger an audio track to play up to six times when you adjust the codebits of the first trigger for that particular audio track. The below images shows you how to set the codebits. The image is taken from the manual.

The numbers in the top row indicate how many times the track can be triggered.
For example: If you want to play the track 3 times during the level you will only need to click codebit 2 . (It turns black when clicked)

Note 1:
The above information applies to the original TRLE.
When you are using TRNG, you can trigger audio as many times as you want through flipeffect triggers. TRNG also allows for different audio formats, like all WAV formats and MP3 and OGG.
TRNG also allows for playing two different tracks at the same time, one on channel1 and one on channel2.
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 21-08-16 at 09:53.
Titak is offline  
Old 24-11-06, 14:47   #2
Titak's Avatar
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,798

Sound effects

Sound effects are the sounds Lara makes, like her footsteps, grunts, gunfire, etc. But also all other sounds an animating object, like a trapblade, or baddies make.

These so-called soundsamples are located in the TRLE/Sound/Samples folder.

22050 kHz
16 Bit

The game can crash if the format is wrong!

You can use Windows Sound Recorder to save a sample in the right format. But I've had problems with this myself (the sample seemed to have been saved in the right format but it still wouldn't play or the game crashed) and I now use Cool Edit 96. Works like a charm!

A soundeffect is activated by assigning the sound to the wad AND the object.
When you add a new object with sound to your wad using WADMerger the sound will usually automatically be added to your wad.
If this does not happen or if you have been creating your own objects you need to manually add the sound to the wad. To do so you need to edit the Sound.txt.

The sound.txt contains all sounds used by the LE and it is located in the TRLE/Sound/LevelSFX Creator folder.
I've coloured the text on the screenshot to make the columns I'm describing below more visible.

First column
(LARA_FIRE) is a description of the sound. This can be changed as you see fit.

Second column
(magnum) contains the name(s) of the associated samples. You can simply assign a new sound to an object by changing the name of the sample in this column.

Third column
(VOL75) indicates the volume of the sound. The higher the number, the louder the sound will be ingame. If the VOL is not set you won't be able to hear the sound ingame.

Fourth column
can contain the letters: P, V, R, L
- P = Pitch: A sound with V will have a random slight pitch change each time it is played.

- V = Volume: A sound with V will have a random slight volume change each time it is played. If you carefully listen to the shotgun sound ingame you will notice that not every shot sounds the same: the LARA_SHOTGUN line has V assigned to it.

P and V are used in cases where a sample tends to be repeated very often, which would sound too mechanical if it were repeated exactly the same way all the time.

- R Radius

- L Stands for looping . This needs to be assigned if you want a sample to play over and over again (=loop) The WATERFALL_LOOP line has an L assigned to it.

fifth column
can contain the letters CH followed by a two digit number.

- CH is the chance of the sound to be played when triggered. The smaller the CH number the less it will be played. If no CH is included in this column the sound will play every time it is triggered. Example: CH is assigned to Lara's climbing grunt: you don't hear it all the time when she is climbing.

Sixth column
contains the PIT of the sound, which stands for pitch.
PIT followed by a positive number raises the pitch, PIT followed by a negative number lowers the pitch. Leave the PIT out and no pitch change will occur.

Seventh column
contains the RAD values. RAD stand for radius/range . This value determines from how far away the sound can still be heard.
The higher the number the further away the sound can still be heard. The rollingball and spikes for example have a RAD of 26, which makes them heard from very far away. Normal sounds have RAD06.

eight and last column
contains a series of letters preceded by a #. These letters are associated with wads. The letters are case sensitive, so a is not the same as A.
Quoted from Skribbler from his tutorial on SFX Issues :
All sounds associated with the #g will be added to all *.sam and *.sfx files (except *.sam and *.sfx files associated with the #t), since they are considered vital to every wad. The #t is associated only with the Title Load Screen level, and only those sounds associated with the #t will be included with any *.sam and *.sfx files built with it. All other letters and combination of letters (except #G) may be used as associated with a level. These are the same as the sound code letters indicated on p. 65 of the Tutorial Manual (and also in the readme.txt file included with the New Wads download). The complete list is as follows:

g - General; all levels
t - Title Load Screen (title)
a - Angkor Wat (angkor, angkor1)
b - Race For The Iris (ang_race)
c - The Tomb Of Seth (settomb, settomb1)
d - Burial Chambers (settomb2)
e - Valley Of The Kings (jeepchas)
f - KV5 (jeepchs2)
h - Temple Of Karnak (karnak, karnak1)
i - The Great Hypostyle Hall (hall)
j - Sacred Lake (lake)
k - Lake 2 (Level associated with TR:TLR that was not released)
l - Tomb Of Semerkhet (semer)
m - Guardian Of Semerkhet (semer2)
n - Desert Railroad (train)
o - Alexandria (alexhub)
p - Coastal Ruins (coastal, alexhub2)
q - Pharos, Temple Of Isis (palaces)
r - Cleopatra’s Palaces (cleopal, palaces2)
s - Catacombs (catacomb, csplit1)
T - Temple Of Poseidon (csplit2)
u - The Lost Library (library)
v - Hall Of Demetrius (libend)
w - City Of The Dead (city, bikebit; also New City [newcity])
x - Trenches (nutrench)
y - Chambers Of Tulun (cortyard)
z - Street Bazaar (lowstrt)
A - Citadel Gate (highstrt)
B - Citadel (citnew)
C - The Sphinx Complex (joby1a)
D - The Valley Temple (joby 1b - Level associated with TR:TLR included on the CD, but not in the game)
E - Underneath The Sphinx (joby2)
F - Menkaure’s Pyramid (joby3a)
H - Inside Menkaure’s Pyramid (joby3b)
I - The Mastabas (joby4a)
J - The Great Pyramid (joby4b)
K - Khufu’s Queens Pyramids (joby4c)
L - Inside The Great Pyramid (joby5a)
M - Temple Of Horus (Part I, joby5b)
N - Temple Of Horus (Part II, joby5c)
Ti - The Times Exclusive (times)
Tu - Playable Tutorial Level (tut1)

Converting the oldfashioned way
Once you have edited the sound.txt you need to convert it into new .sfx and .sam files.

If you are running the LE on XP and if you are using one of the letters listed above you can do this by simply double clicking the SFX_Example.bat in the TRLE/Sound/LevelSFX Creator folder. The new files will automatically be placed in the Wads folder.

If you are using a custom letter sequence (eg I'm using hm for my levels) you need to use the DOS Prompt to convert the sound.txt file.
The manual says: "From the LevelSFX Creator directory type the following DOS command: pcwadsfx settomb c. Of course, use the WAD (along with its associated letter) you wish to change."
Settomb being the name of your wad, c being the letter or letter combination associated with your wad.
Once converted you need to put the new files into the Wads folder.

Convert the tom file of your wad and if all has been done correctly you will hear the changes you have made!

Many thanks to Idealist, Geckokid and Mulf for the info on sound samples!

Adding sounds using WADMerger
You can also add sounds to your wad by using WADmerger's Sound Manager.
- Open your wad and click the Sound Manager button. A small window will pop up with a list of the soundeffects.
- Scroll down to locate the sound effect you want to add and check it by clicking on the small white box in front of it.
- Save the wad.

Keep in mind that you can only ADD sounds to a wad with WADMerger. You can't remove them.
To remove sounds from you wad you need to edit the sounds.txt like described above.
Also, WADMerger Sound Editor tends to be buggy. So, use at your own risk.

Converting with Screamer:
You can use SCREAMER to open a sounds.txt file and you can then edit it like you would do the manual way.
So add sounds by assigning your level letter(s) to the sound, change the name of the sample it should use, change pitch, volume, etc.
Then save the sounds.txt and output the wad.
Screamer will then create new .SAM and .SFX files for your wad, which it places in the Screamer Output folder.
All you have to do then is move the new files to your wad folder and rename them if you haven't given the wad a name in Screamer.

Converting with TRLE Sound Editor:
Screamer does not always work on Windows8 but sapper made this great new sound editing tool called TRLE Sound Editor.
With it you can open the sounds.txt and edit it like you would do the manual way.
The converting is done by the program itself, just like with Screamer.

Converting with SFX Manager
Magplus also made a program with which you can edit and convert the sounds.txt file.

Note 1:
Remember that you do not have to use the letters mentioned in the list above.
You can use your own letter or letter combination. Just make sure you include/assign this letter or letter combo when converting and all lines with that letter(combo) will be added to your level wad.

Note 2:
If you are using a lot of custom sounds and if you are using a lot of different sounds per level, it can happen that you do not have enough slots/room for all levels in one sounds.txt.
Well, no problem, use one sounds.txt per level for example.
I'm not sure if the oldfashioned way of converting allows for different names for the sounds.txt, but Screamer, TRLE Sound Editor and SFX Manager surely can handle them.
Simply open the Sounds-06KA2.txt (This is what the sounds.txt for one of my MoA2 levels is called), edit it and convert.
In this case it is easiest to only assign "g" and your custom letter(combo) to the slots.

Here's an example of part of one of my sounds.txt files, Sounds-06KA2.txt, lines 60 to 82:
UNDERWATER:               undwatr                           VOL40          L        PIT00           #g 
UNDERWATER_SWITCH:        uw_swt                            VOL80  P                                #KA 
LARA_PICKUP:              lara_aha                          VOL40                            RAD13  #g 
PUSHABLE_SOUND:           l_pshst                           VOL35          L        PIT-20   RAD10  #KA 
DOOR_GENERAL:             gen_door                          VOL80  P V              PIT20           
HELICOPTER_LOOP:          l_moa_ratll                       VOL40          L                 RAD10  #KA 
ROCK_FALL_CRUMBLE:        sk_die_effect                     VOL50                            RAD10  #KA
ROCK_FALL_LAND:           sk_die_effect                     VOL70                   PIT10    RAD10  #KA
PENDULUM_BLADES:          polesrise                         VOL50                            RAD08
STALEGTITE:               splash2 splash3 splash4           VOL35                            RAD07  #KA 
LARA_THUD:                lar_th1 lar_th2                   VOL50  P V              PIT-10          #g 
GENERIC_SWOOSH:           swoosh1                           VOL45  P V                       RAD10  #g 
GENERIC_HEAVY_THUD:       gen_thud                          VOL80  P                PIT-50   RAD10  #g 
CROC_FEET:                fl_kick01 fl_kick02 fl_kick03     VOL40  P V              PIT-10   RAD10  #g 
SWINGING_FLAMES:          polesrise                         VOL40                            RAD08
STONE_SCRAPE:             spinhook                          VOL90                   PIT-50   RAD10
BLAST_CIRCLE:             hand_pl1 hand_pl2 hand_pl3        VOL20                            RAD08  #KA
BAZOOKA_FIRE:             polesrise                         VOL30                            RAD08
HECKLER&KOCH_FIRE:        d_eagle3                          VOL50                            RAD13  #KA 
WATERFALL_LOOP:           l_wfall                           VOL25          L                 RAD08  #g 
CROC_ATTACK:              landing2 landing3                 VOL55                   PIT00    RAD10  #g 
CROC_DEATH:               splash_waterfall                  VOL40  P                         RAD10  #KA 
PORTCULLIS_UP:            gate3                             VOL50                            RAD10
As you can see, only "g" and the lettercombo "KA" are assigned.
The purple entries are custom sounds.
TRLE Sound Editor marks custom sfx names in purple.
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 21-08-16 at 09:48.
Titak is offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 21:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.