Sound: SoundSet – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "== SoundSet == SoundSet is second level of sound configuration. It contains array of SoundShaders to be submixed and parameters for advanced features and options. All SoundS...")
 
No edit summary
Line 154: Line 154:
|}
|}


<code>class CfgSoundSets
<syntaxhighlight lang="cpp">class CfgSoundSets
{
{
class Rifle_Shot_Base_SoundSet
class Rifle_Shot_Base_SoundSet
Line 170: Line 170:
sound3DProcessingType = WeaponMediumShot3DProcessingType;
sound3DProcessingType = WeaponMediumShot3DProcessingType;
distanceFilter = weaponShotDistanceFreqAttenuationFilter;
distanceFilter = weaponShotDistanceFreqAttenuationFilter;
spatial = true;
spatial = 1;
doppler = false;
doppler = 0;
loop = false;
loop = 0;
};
};
};</code>
};</syntaxhighlight>

Revision as of 11:26, 24 September 2016

SoundSet

SoundSet is second level of sound configuration. It contains array of SoundShaders to be submixed and parameters for advanced features and options.

All SoundSets have to be configured in the base class CfgSoundSets.

  • SoundSet in fact represents one single submixed sound, with the length of the longest sample used in the submix.
  • Actual range of SoundSet is the highest range parameter value of all SoundShaders used within SoundSet and SoundSet's volumeCurve is applied (scaled) to that range.
  • Use the same frequency wave files defined within single SoundSet (SoundShader respectively).
parameter unit/values default descriptions
soundShaders

{SoundShader1, ...}

none

  • array of SoundShader names to be submixed
soundShadersLimit (0..n) 0 (no limit)
  • number of SoundShaders (with parameter limitation set to true) to be submixed in order from the highest volume. Volume here is ment to be output volume value after it's expression evaluation and applied rangeCurve
  • SoundShaders with limitation parameter set to false will be processed always
volumeFactor float (0..1) 1
  • multiplication factor for volume
volumeCurve {{d0, v0}, {d1, v1}, ... } or Class name defaultVolumeCurve

defined in CfgSoundGlobals

  • array of points or class name defined in CfgSoundCurves
  • generally the same as rangeCurve, but applied on submix output sample and scaled to the highest range value of all SoundShaders defined within soundShaders array parameter (literally "defined", not actually playing)
volumeRandomizer (0..6dB) [dB] 0
  • random multiplication factor for volume, calculated during each playback of SoundSet
  • (volume = volume + random(-volumeRandomizer, volumeRandomizer))
volumeRandomizerMin (0..6dB) [dB] 0
  • the lowest possible generated value of volumeRandomizer
frequencyFactor (0..n) 1
  • multiplication factor for frequency
frequencyRandomizer (0..12) [semitones] 0
  • random multiplication factor for frequency, calculated during each playback of SoundSet
  • frequency = frequency * pow(2, frequencyRandomizer/12)
frequencyRandomizerMin (0..12) [semitones] 0
  • the lowest possible generated value of frequencyRandomizer
loop {0, 1} or boolean 0
  • defines looping of SoundSet
  • play/stop of loop is handled by gameplay feature (engine)
delay [s] 0
  • time before next SoundSet is played (triggers feature of repeating playback of SoundSet)
  • if set to nonzero value, loop parameter is automatically set to false
delayRandomizer [s] 0
  • defines random time range <delay-delayRandomizer; delay+delayRandomizer> for repeating playback (normal distribution)
distanceFilter Class name / "none" defaultDistanceFilter

defined in CfgSoundGlobals

  • distance frequency attenuation filter
sound3DProcessingType Class name / "none" defaultSound3DProcessingType

defined in CfgSoundGlobals

  • sound processing type
spatial {0, 1} or boolean
  • switch for sound spatialization (positional vs ambient sound)
doppler {0, 1} or boolean
  • switch for Doppler Effect filter
speedOfSound {0, 1} or boolean
  • switch for simulation of delay based on distance
class CfgSoundSets
{
	class Rifle_Shot_Base_SoundSet
	{
		soundShaders[] = 
		{
			MX_Closure_SoundShader,
			MX_closeShot_SoundShader,
			MX_midShot_SoundShader,
			MX_distShot_SoundShader,
			MX_tailInterior_SoundShader
		};
		volumeFactor = 1.6;
		volumeCurve = InverseSquare2Curve;
		sound3DProcessingType = WeaponMediumShot3DProcessingType;
		distanceFilter = weaponShotDistanceFreqAttenuationFilter;
		spatial = 1;
		doppler = 0;
		loop = 0;
	};
};