arma2:sound
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
arma2:sound [2010/09/10 06:35] – added more details. snakeman | — | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ArmA 2 Sound ====== | ||
- | If there are 3 parameters, then from second (volume in dB) is used for maximum distance calculation, | ||
- | |||
- | When in cfg are four parameters, then 4 parameter is distance in meters, and second parameter (volume in dB) is ignored - is recalculated based on max distance. | ||
- | |||
- | 0dB == 1000m | ||
- | |||
- | is recalculated based on max distance | ||
- | |||
- | What max distance is this - related to view distance? | ||
- | |||
- | Sample volume is recalculated, | ||
- | |||
- | Distance == view distance. | ||
- | |||
- | Some more good information - details about new class Sounds of cfgVehicles. | ||
- | |||
- | * frequency range is [0.6, inf] but usable range is somewhere about 1 that's [0.8, 1.2] | ||
- | * randomizer = small random number unique for each vehicle, range [0, 1] | ||
- | * angular velocity - but this controller is not much usable, because values are discrete, not smooth, so in frame N it should be 0 and in frame N+1 it should be 2 | ||
- | * factor - linear interpolation between A and B based on x, value = A + (B - A) *x, trick to get peak is using min{ X factor [A, B], X factor [B, A] } | ||
- | |||
- | |||
- | ====== Example config ====== | ||
- | |||
- | Here is example helicopter engine / rotor sound config. | ||
- | <code cpp> | ||
- | class Sounds | ||
- | { | ||
- | class Engine | ||
- | { | ||
- | sound[] = {" | ||
- | frequency = " | ||
- | volume = " | ||
- | }; | ||
- | |||
- | class RotorLowOut | ||
- | { | ||
- | sound[] = {" | ||
- | frequency = " | ||
- | volume = " | ||
- | cone[] = {1.8, | ||
- | }; | ||
- | |||
- | class RotorHighOut | ||
- | { | ||
- | sound[] = {" | ||
- | frequency = " | ||
- | volume = " | ||
- | cone[] = {1.8, | ||
- | }; | ||
- | |||
- | class EngineIn | ||
- | { | ||
- | sound[] = {" | ||
- | frequency = " | ||
- | volume = " | ||
- | }; | ||
- | </ | ||
- | |||
- | CfgEnvSounds example | ||
- | <code cpp> | ||
- | class CfgEnvSounds | ||
- | { | ||
- | class Meadows | ||
- | { | ||
- | sound[] ={" | ||
- | volume = " | ||
- | randSamp1[] ={" | ||
- | randSamp2[] ={" | ||
- | randSamp3[] ={" | ||
- | randSamp4[] ={" | ||
- | randSamp5[] ={" | ||
- | randSamp6[] ={" | ||
- | random[] ={" | ||
- | }; | ||
- | |||
- | class Forest | ||
- | { | ||
- | sound[] ={" | ||
- | volume = " | ||
- | randSamp11[] ={" | ||
- | randSamp10[] ={" | ||
- | randSamp0[] ={" | ||
- | randSamp1[] ={" | ||
- | randSamp2[] ={" | ||
- | randSamp3[] ={" | ||
- | randSamp8[] ={" | ||
- | randSamp9[] ={" | ||
- | randSamp4[] ={" | ||
- | randSamp5[] ={" | ||
- | randSamp6[] ={" | ||
- | randSamp7[] ={" | ||
- | random[] ={" | ||
- | }; | ||
- | |||
- | class ForestNight | ||
- | { | ||
- | sound[] ={" | ||
- | volume = " | ||
- | randSamp1[] ={" | ||
- | randSamp2[] ={" | ||
- | randSamp3[] ={" | ||
- | randSamp4[] ={" | ||
- | randSamp5[] ={" | ||
- | randSamp6[] ={" | ||
- | randSamp7[] ={" | ||
- | randSamp8[] ={" | ||
- | random[] ={" | ||
- | }; | ||
- | |||
- | class Rain | ||
- | { | ||
- | sound[] ={" | ||
- | volume = " | ||
- | soundNight[] ={" | ||
- | }; | ||
- | </ | ||
- | |||
- | Solid insideSoundCoeff' | ||
- | <code cpp> | ||
- | // UH60 | ||
- | insideSoundCoef = 0.001; | ||
- | occludeSoundsWhenIn = 0.02; | ||
- | obstructSoundsWhenIn = 0.02; | ||
- | </ | ||
- | |||
- | EngineLowOut {" | ||
- | |||
- | This sound you should hear last, its the rumble or 'jet wash' you get when an aircraft makes as it gets closer to your position. | ||
- | |||
- | EngineHighOut {" | ||
- | |||
- | This is the ' | ||
- | |||
- | ForsageOut {" | ||
- | |||
- | This is the main engine sound, this kicks in as the the engine_start sound is fading out and plays a constant loop until you stop the engine or it gets destroyed. | ||
- | |||
- | {" | ||
- | 1.0 is volume at source\\ | ||
- | 0.5 is pitch 0.0 being same as orginal sample\\ | ||
- | 900 is volume over distance (how far it can be heard) | ||
- | |||
- | Check out basic [[sound_config_tutorial|Sound config tutorial]]. |
arma2/sound.txt · Last modified: 2024/08/02 12:36 by snakeman