Sound: Sound Curves – Arma 3
Jump to navigation
Jump to search
Dusa_bi_wiki (talk | contribs) (Created page with "== Sound Curves == Sound curve is a simple set of points on 2D graph, which define the relationship between two variables (usually distance and volume). All sound curves hav...") |
No edit summary |
||
Line 11: | Line 11: | ||
|} | |} | ||
< | <syntaxhighlight lang="cpp">class CfgSoundCurves | ||
class CfgSoundCurves | |||
{ | { | ||
class InverseSquare1Curve | |||
{ | |||
points[] = | |||
{ | |||
{0.0, 0.9751}, | |||
{0.1, 0.6332}, | |||
{0.2, 0.4307}, | |||
{0.3, 0.3009}, | |||
{0.4, 0.2128}, | |||
{0.5, 0.1503}, | |||
{0.6, 0.1043}, | |||
{0.7, 0.0695}, | |||
{0.8, 0.0426}, | |||
{0.9, 0.0213}, | |||
{1.0, 0.0041} | |||
}; | |||
}; | |||
}; | };</syntaxhighlight> | ||
</ | |||
'''Example of configuration using curve class''' | '''Example of configuration using curve class''' | ||
< | <syntaxhighlight lang="cpp">class CfgSoundSets | ||
class CfgSoundSets | |||
{ | { | ||
//volumeCurve parameter using curve class | //volumeCurve parameter using curve class | ||
Line 43: | Line 40: | ||
soundShaders[] = | soundShaders[] = | ||
{ | { | ||
MX_closeShot_SoundShader | MX_closeShot_SoundShader | ||
}; | }; | ||
volumeCurve = InverseSquare1Curve; | volumeCurve = InverseSquare1Curve; | ||
}; | }; | ||
}; | };</syntaxhighlight> | ||
</ | |||
'''Example of configuration using direct curve definition''' | '''Example of configuration using direct curve definition''' | ||
< | <syntaxhighlight lang="cpp">class CfgSoundSets | ||
class CfgSoundSets | |||
{ | { | ||
//volumeCurve direct definition | //volumeCurve direct definition | ||
Line 59: | Line 54: | ||
soundShaders[] = | soundShaders[] = | ||
{ | { | ||
MX_closeShot_SoundShader | MX_closeShot_SoundShader | ||
}; | }; | ||
volumeCurve[] = | volumeCurve[] = | ||
{ | |||
{0.0, 0.9751}, | |||
{0.1, 0.6332}, | |||
{0.2, 0.4307}, | |||
{0.3, 0.3009}, | |||
{0.4, 0.2128}, | |||
{0.5, 0.1503}, | |||
{0.6, 0.1043}, | |||
{0.7, 0.0695}, | |||
{0.8, 0.0426}, | |||
{0.9, 0.0213}, | |||
{1.0, 0.0041} | |||
}; | |||
}; | }; | ||
}; | };</syntaxhighlight> | ||
</ |
Revision as of 11:29, 24 September 2016
Sound Curves
Sound curve is a simple set of points on 2D graph, which define the relationship between two variables (usually distance and volume).
All sound curves have to be configured in the base class CfgSoundCurves (or directly in curve parameter)
|
class CfgSoundCurves
{
class InverseSquare1Curve
{
points[] =
{
{0.0, 0.9751},
{0.1, 0.6332},
{0.2, 0.4307},
{0.3, 0.3009},
{0.4, 0.2128},
{0.5, 0.1503},
{0.6, 0.1043},
{0.7, 0.0695},
{0.8, 0.0426},
{0.9, 0.0213},
{1.0, 0.0041}
};
};
};
Example of configuration using curve class
class CfgSoundSets
{
//volumeCurve parameter using curve class
class Rifle_Shot1_SoundSet
{
soundShaders[] =
{
MX_closeShot_SoundShader
};
volumeCurve = InverseSquare1Curve;
};
};
Example of configuration using direct curve definition
class CfgSoundSets
{
//volumeCurve direct definition
class Rifle_Shot1_SoundSet
{
soundShaders[] =
{
MX_closeShot_SoundShader
};
volumeCurve[] =
{
{0.0, 0.9751},
{0.1, 0.6332},
{0.2, 0.4307},
{0.3, 0.3009},
{0.4, 0.2128},
{0.5, 0.1503},
{0.6, 0.1043},
{0.7, 0.0695},
{0.8, 0.0426},
{0.9, 0.0213},
{1.0, 0.0041}
};
};
};