Sound: SoundShader – Arma 3
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix infobox) |
Lou Montana (talk | contribs) m (Fix sound → samples) |
||
Line 8: | Line 8: | ||
{{Feature | informative | For single SoundShader (SoundSet respectively), use sound files with the same sampling rate.}} | {{Feature | informative | For single SoundShader (SoundSet respectively), use sound files with the same sampling rate.}} | ||
{| class="wikitable | {| class="wikitable" | ||
|- | |- | ||
! | ! Parameter | ||
! | ! Unit/values | ||
! | ! Default | ||
! | ! Description | ||
|- | |- | ||
!'' | |||
|{["path/sound",p], ...} | !''samples'' | ||
|none | | { ["path/sound",p], ... } | ||
| none | |||
| | | | ||
* array containing sound file name with paths and probability values (p), wav, wss, ogg are accepted file types, 16bit/44.1KHz wav converted to wss should always work fine | * array containing sound file name with paths and probability values (p), wav, wss, ogg are accepted file types, 16bit/44.1KHz wav converted to wss should always work fine | ||
Line 26: | Line 27: | ||
|- | |- | ||
!''volume'' | ! ''volume'' | ||
|float (0..n) or [dBFS] | | float (0..n) or [dBFS] | ||
|1 (= db0) | | 1 (= db0) | ||
| | | | ||
* base volume value | * base volume value | ||
Line 35: | Line 36: | ||
|- | |- | ||
!''frequency'' | ! ''frequency'' | ||
|(0.5..2) | | (0.5..2) | ||
|1 | | 1 | ||
| | | | ||
* base pitch value, 1 = no change | * base pitch value, 1 = no change | ||
Line 43: | Line 44: | ||
|- | |- | ||
! ''range'' | |||
| (0..n) [m] | | (0..n) [m] | ||
| 0 | | 0 | ||
Line 50: | Line 51: | ||
|- | |- | ||
!''rangeCurve'' | ! ''rangeCurve'' | ||
| {{d0, v0}, {d1, v1}, ... } or Class name | | {{d0, v0}, {d1, v1}, ... } or Class name | ||
| none | | none | ||
Line 58: | Line 59: | ||
|- | |- | ||
!''limitation'' | ! ''limitation'' | ||
| bool | | bool | ||
| false | | false | ||
Line 66: | Line 67: | ||
|} | |} | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp">class CfgSoundShaders | ||
class CfgSoundShaders | |||
{ | { | ||
class ACPC2_closeShot_SoundShader | class ACPC2_closeShot_SoundShader |
Revision as of 09:59, 25 May 2021
SoundShader
SoundShader is the lowest level of sound configuration. It contains the definition of sound files and basic set of parameters.
All SoundShaders have to be defined in the base class CfgSoundShaders.
Parameter | Unit/values | Default | Description |
---|---|---|---|
samples | { ["path/sound",p], ... } | none |
|
volume | float (0..n) or [dBFS] | 1 (= db0) |
|
frequency | (0.5..2) | 1 |
|
range | (0..n) [m] | 0 |
|
rangeCurve | {{d0, v0}, {d1, v1}, ... } or Class name | none |
|
limitation | bool | false |
|
class CfgSoundShaders
{
class ACPC2_closeShot_SoundShader
{
samples[] =
{
{ "A3\Sounds_F\arsenal\weapons\Pistols\Acpc2\ACPC2_closeShot_01", 1 },
{ "A3\Sounds_F\arsenal\weapons\Pistols\Acpc2\ACPC2_closeShot_02", 1 },
{ "A3\Sounds_F\arsenal\weapons\Pistols\Acpc2\ACPC2_closeShot_03", 2 } // example: sample has a higher chance of being picked
};
volume = db3; // additional gain, +3dB
range = 50;
rangeCurve = closeShotCurve; //classname of a curve, defined in cfgSoundCurves
};