Call of Duty 5: Audio System Parameters

From COD Modding & Mapping Wiki
Jump to navigation Jump to search

Treyarch have added a lot of custom audio technology to the COD 4 engine that you should understand when designing your own custom sounds.
It is significantly different from COD 4 in terms of overall power and control of audio in game and should allow you to do some awesome things for your mods.
If you open a soundalias .csv file and scroll to the very top, you will see each of the following catagories that are outlined in this page.

These are not grouped in the same way as the csv table (which are set up for what you edit the most often), but in terms of how each of these catagories correspond to one another. Understanding how these parameters work together is essential to making your mod sound awesome.


Audio Control Overview

The basics

  • name - This is simply the sound alias name.
  • file - This is where you put the path to your raw sound file.
  • sequence - If you have several sounds that you wish to point to the same sound alias, you use the sequence catagory by putting 1, 2, 3, etc for every variant of this sound alias.
  • vol_min - This is the lowest maximum volume that the sound will be at dist_min. This works with vol_max as a randomizer. 0.0 - 1.0
  • vol_max - This is the highest maximum volume that the sound will be at dist_min. This works with vol_min as a randomizer. 0.0 - 1.0
  • pitch_min - This is the lowest starting random pitch for this sound alias. Works with pitch_max as a randomizer. 0.0 - 2.0
  • pitch_max - This is the lowest starting random pitch for this sound alias. Works with pitch_max as a randomizer. 0.0 - 2.0
  • dist_min - This is the distance from the origin of a 3d sound at which its volume will be "max" volume. in quake units
  • dist_max - This is the distance from the origin of a 3d sound at which its volume is 0. in quake units
  • volumefalloffcurve - This is the rate at which a sound gets more quiet between dist_min, and dist_max. Our default curve is quadratic in nature, keeping sounds at a louder volume over distance then dropping off quickly the sound gets nearer to dist_max. See creating custom curve files tutorial.
  • dist_reverb_max - This is how far away the reverb's wet volume can be heard from the point of origin. in quake units
  • reverb_falloff_curve - This is the rate at which the wet signal of the reverb drops to 0 from the point of origin of a 3d sound to the dist_reverb_max. See creating custom curve files tutorial.
  • loop - putting looping in this column tells the sound engine that this sound alias is a looping sound.
  • type - sets a sound as streamed by putting that value in the table. Defaults to non-streaming sound.
  • spatialized - sets a sound as 2d or 3d.
  • probability - defaults to 1. Putting anything lower than 1 in this column decreases the chance that it will play when the alias is called.
  • bus - This is essentially a way to group sounds by type and control volume parameters on them all simultaneously in script. Essential for mixing and special effects. Valid entries are located in globals\bus.csv (See busing tutorial).


Priority and Instance Limiting

Limiting and priority are the controls to ensure that you are not running out of valid channels and helps the engine decide how to manage channels without noticably dropping sounds. Limiting helps us keep the game souning clean by not allowing too many of a specifc sound to play at once (which reduces phasing).
Our priority system is fully realtime and dynamic...no static priority numbers exist in this engine. A sounds priority scales by its volume. This allows the engine to shut down only sounds that you cannot hear which reduces both noise and popping while you are playing. The system scales in a linear fashion between the calculated volumes of a sound in relation to the origin and the player.

  • limit_count - This is the total number of this alias that can play at once.
  • limit_type - This tells the engine what to do if there are more instances of this trying to play than you have slots allowed. reject,oldest,priority are valid entries.
  • entity_limit_count - This is the total number of this alias that can play on one entity simultaneously.
  • entity_limit_type - - This tells the engine what to do if there are more instances of this trying to play than you have slots allowed. reject,oldest,priority are valid entries.
  • min_priority - This is a sounds minimum priority. It will never drop below this number. 0 - 100
  • max_priority - This is a sounds maximum priority. It will never be above this number. 0 - 100
  • min_priority_threshold - This is the calcualted volume nubmer at which min_priority is reached.
  • max_priority_threshold - This is the calculated volume number at which max_priority is reached.


Advanced Sound Parameters

These parameters give you a lot of control over how a sound behaves once it is playing. The parameters interaction with the basic parameters give you a lot of control over how your mod is sounding.

Additionally, you will see some parameters for controlling Treyarch's Sound Occlusion System. This is a system whereby sounds are dynamically filetered based on level geometry and\or props. The occlusion system is fully dynamic and doesn't need anything in the alias table to function, however, we do have some control for tweaking to allow for more or less occlusion per alias. The LPF filter for occlusion is hardcoded and thus, cannot be modified (this time around, anyway)...

  • reverb_send - This is the amount of wet signal you will recieve from this sound alias in a reverberant space. Default value is 0.5. 0.0 - 1.0
  • randomize_type - This is a way to decrease phasing effects by having the audio engine pick variants and\or pitches that are far apart when playing this alias multiple times. pitch variant are valid entries. If you have a pitch range of 0.8 - 1.2 and the engine plays two instances of this alias, it will pick a random pitch for the first instance, and the farthest valid pitch away from the original roll for the second. (so if it was 0.8 the first time, it will 1.2 for the second alias).
  • masterslave - This column controls the auto-ducking system. If you put master in this column, it reduces the volume of any other sound playing that has a value of 0.0 - 1.0 in this column. (ie, it is a volume multiplier, designed to make the game slightly quieter when an important event goes off by multiplying a slave sounds current volume, by the value in the masterslave column).
  • compression - This allows you to specify some sounds as being PCM in case you want to make sure a sound is uncompressed.
  • secondaryaliasname - This allows you to chain alias' together. When an alias fires off and it has a secondary alias, that alias will fire off too. Its a good way to layer multiple sounds that have different parameters (ie, two sounds that are layered together with different pitch ranges and volumefalloff curves).
  • startdelay - This is a delay in milliseconds before the sound plays once its called. 2000 milliseconds = 2 seconds.
  • real_delay - When a sound is heard from a distance in real life, there is sometimes a slight delay as it travels from the source to you. This parameter allows you to simulate this effect in game. yes, no
  • distance_lpf - This is a low pass filter that is used on distant sounds to make them sound even more distant. yes, no
  • occlusion_level - This is the amount of low pass filter that is allowed when this alias is fully occluded.
  • IsBig - This is a global occlusion modifier for sounds that you are implying are very loud...what it does is lessen the amount a sound is occluded if it goes off near you but behind an obstacle...imagine a grenade going off just on the other side of a wall. You wouldn't want this sound to be as occluded as you would if it went off behind a wall 30 feet away. IsBig takes only yes, no


Flux System

The FLUX system is a Treyarch internal invention that simulates the dynamic nature of sound in the real world. For being a very simple system, it does some pretty crazy things. It is a system that's designed to allow sounds to have 'reflections' and 'shockwaves'.
To understand what this is doing, toss a grenade in the game. You'll hear the explosion, followed by a whooshing sound that flys right past you (especially noticable in surround). Another example is to grab a Thompson or other SMG, fire it and turn quickly...you'll hear the echo of your gun in the direction you shot (ie it does NOT stay with the camera like most games). The sniper rifles in the game are another example of FLUX in action. You'll hear the shot, followed by the long decay of the shot as it rolls through the environment.
You can orient FLUX sounds in two ways---towards the player or on the vector of a shot. These have two completely different effects in the game engine---one makes the sound go towards the player, the other in the direction of a gun shot. The system fires FLUX sounds out from the point of origin in a V pattern. You have control over the left part of the V and the right part of the V independantly. The V orients itself based on its move_type.

  • move_type - Orients the direction the sound will travel. Valid entries are left_shot, right_shot, left_player, right_player.
  • move_time - this is a value in seconds that it will take the sound to travel down its corresponding line in the V to its dist_max value.
 Hooking up a FLUX sound is pretty easy - you just secondary alias your FLUX alias to your primary alias and you'll be good to go.


Fun with Surround Sound

  • speakermap - This is a way to designate which speakers a 2d sound is panned to when it plays. Can also be used for interesting effects on 3D sounds. Speakermaps are located in globasl\speakermaps.csv.
  • lfe percentage - this is a value from 0 - 1 that controls how much signal is sent to the Subwoofer in a 5.1 or 7.1 setup.
  • center percentage - this is a value from 0 - 1 that controls how much signal is sent to the Center channel in a 5.1 or 7.1 setup.


Envelopes Zones

Envelop zones are simply dynamic pans (or bleeding) that send a sound to all speakers as one approaches a 3D sound. So if you are on top of a cricket sound with this on, it will be panned to all speakers (by the amount designated in envelop_percentage. The system take 3 parameters to get working.

  • envelop_min - this is the distance at which the sound is fully panned to all speakers.
  • envelop_max - this is where a sound will begin to pan to the other speakers.
  • envelop_percentage - this is how much 'bleed' occurs at envelop min.


Sources: Treyarch's Wiki