Tutorials
Soundscapes Part 2 - Play Looping
Play Looping
The first thing you need to do is create the file where all your soundscape information will be stored.
Go to your equivalent of this directory C:\Program Files\Valve\Steam\SteamApps\your_account\half-life 2 deathmatch\hl2mp
Once there you want to create a new folder called “scripts”

Now open notepad and save a blank .txt document in your newly created scripts folder called “soundscapes”.

You have now created the file were all the information about your custom soundscapes will be stored.
Okay now its time to build your first soundscape.
We are going to create a “playlooping” soundscape. This soundscape loops a sound file until a new soundscape is triggered.
First we need to name the soundscape for the tutorial. Open up the soundscapes.txt document we created earlier in the scripts folder. To name you soundscape put “yoursoundscapesnamerhere” in your text file, don’t forget the brackets. Your soundscapes.txt document should look something like this now:
"soundscapes.playlooping"
{
Next we define what DSP effects we want the soundscape to have. If you set the DSP value to one the engine will automatically decipher the best effect. But you can choose your own DSP effect.
Here’s the list of avalible DSP effects:
"0 : "Normal (off)"
1 : "Generic"
2 : "Metal Small"
3 : "Metal Medium"
4 : "Metal Large"
5 : "Tunnel Small"
6 : "Tunnel Medium"
7 : "Tunnel Large"
8 : "Chamber Small"
9 : "Chamber Medium"
10: "Chamber Large"
11: "Bright Small"
12: "Bright Medium"
13: "Bright Large"
14: "Water 1"
15: "Water 2"
16: "Water 3"
17: "Concrete Small"
18: "Concrete Medium"
19: "Concrete Large"
20: "Big 1"
21: "Big 2"
22: "Big 3"
23: "Cavern Small"
24: "Cavern Medium"
25: "Cavern Large"
26: "Weirdo 1"
27: "Weirdo 2"
28: "Weirdo 3""
It’s best just to use 1 but its your call. Your soundscapes.txt document should look like this now:
"soundscapes.playlooping"
{
"dsp" "1"
Now its time to define what soundscape we want to make put in
"playlooping" underneath “dsp”. Your soundscapes.txt document should now look like this:
"soundscapes.playlooping"
{
"dsp" "1"
"playlooping"
Okay so now we have named our osundscape, given it its dsp effect and chosen which type of soundscape we want to use its now time to give our soundscape properties.
Here’s a list of keys we can use and their definitions:
" Wave - The name of the wave file.
Volume - Sets the wave's volume (0-1).
Pitch - Sets the pitch for the wave (100 is normal).
Attenuation - Sets the attenuation of the wave (only used if a "position" command follows).
NOTE: These can be random intervals - the random value will be chosen once each time the soundscape is triggered.
Position - References a position by index (0-7) that the level designer has pointed to in the env_soundscape entity. "
Taken from http://www.valve-erc.com/srcsdk/Sound/soundscapes.html
Definition of Attenuation is “The reduction in intensity of a sound signal.”
I will talk further about Position later on.
Okay it’s easier to show you how soundscapes properties look like than talk you through it. For the soundscape in the tutorial its properties look like this:
"soundscapes.playlooping"
{
"dsp" "1"
"playlooping"
{
"volume" "0.5"
"pitch" "100"
"wave" "ambient/atmosphere/city_beacon_loop1.wav"
}
}
You have now created a soundscape that will loop continulasly when triggered. You can add in more layers of sound simple by adding in another “playlooping” as shown in the example below:
"soundscapes.playlooping"
{
"dsp" "1"
"playlooping"
{
"volume" "0.5"
"pitch" "100"
"wave" "ambient/atmosphere/city_beacon_loop1.wav"
}
"playlooping"
{
"volume" "0.5"
"pitch" "100"
"wave" "ambient/alarms/apc_alarm_loop1.wav"
}
}
Okay so now we have created our soundscape its time to get it working in game. Place an “env_soundscape” entity in your map.
Select the entity, and then bring up the “Object Properties” window:

The two keys we are going to focus on are “radius” and “soundscape.”
The radius triggers the soundscape to start playing. You can type in the units you want the radius to cover, or use the red circle and four white squares to define the triggerable area. If you set the radius to -1 then the soundscape will be triggered just by looking a it.
In the key “soundscape” you need to define the name of the soundscape you want to use. Earlier I created a soundscape called "soundscapes.playlooping" in the txt document, so im going to use that one. To do this you simply put soundscapes.playlooping in the space provided:

There you have it compile and run your map and your sorted. Welcome to the world of soundscapes.
*NOTE* The easiest way to get the sound file names is to create an ambient generic, open up its object properties box click on the soundname key then browse. You can get all the paths of the sounds there and preview them.
Part two is coming soon and will cover “playrandom” soundscapes.
Happy mapping y’all
Signy
