Sound: cfgSound3DProcessors – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code> +" to "<code>")
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
What are '''Sound 3D Processors'''? How do I define them? How do I use them in my audio config?
What are '''Sound 3D Processors'''? How do I define them? How do I use them in my audio config?


==Sound 3D Processors==
== Sound 3D Processors ==


In the old audio engine any stereo file that was supposed to be positional in the 3D world (gunshots for example) was downmixed to mono. Using stereo sounds can enhance the soundscape tremendously which is why Sound 3D Processors were introduced. Here is an example configuration.
In the old audio engine any stereo file that was supposed to be positional in the 3D world (gunshots for example) was downmixed to mono. Using stereo sounds can enhance the soundscape tremendously which is why '''Sound 3D Processors''' were introduced. Here is an example configuration.
<code>class cfgSound3DProcessors
<code>class cfgSound3DProcessors
{
{
Line 9: Line 9:
{
{
type = emitter; // emitter or panner, chooses between the available processors
type = emitter; // emitter or panner, chooses between the available processors
innerRange = 0; // range at which the chosen processor is working at 100%, result depends on processor
innerRange = 0; // range at which certain behaviors of the chosen processor reach their limit, results depend on chosen processor
range = 50; // range at which the chosen processor starts turning 100% mono into ''"3D processed stereo sound"''
range = 50; // range at which the chosen processor starts turning 100% mono into ''"3D processed stereo sound"''
rangeCurve = LinearCurve; // normally the transition between 100% mono and 100% ''"3D processed"'' is linear, but you can use curves defined in [[CfgSoundCurves]] to change that behavior
rangeCurve = LinearCurve; // normally the transition between 100% mono and 100% ''"3D processed"'' is linear, but you can use curves defined in [[CfgSoundCurves]] to change that behavior
Line 16: Line 16:
};</code>
};</code>


===Stereo Emitter===
=== Stereo Emitter ===


The '''Stereo Emitter''' creates two virtual speakers in the 3D world, each speaker is playing back one channel of the stereo file. Only stereo files are supported at the moment. The position of the speakers depends on parameters in the configuration and the distance to the listener. When the listener is beyond the ''range'' distance both speakers are sitting on two opposite sides of a circle with the radius of 0 on the sound source. You could say they are in the same position. As the player crosses ''range'' the speakers start moving away from sound source as the radius of the circle increases to a maximum which you set with the ''radius'' parameter. Maximum radius is reached at ''innerRange''.
The '''Stereo Emitter''' creates two virtual speakers in the 3D world, each speaker is playing back one channel of the stereo file. Only stereo files are supported at the moment. The position of the speakers depends on parameters in the configuration and the distance to the listener. When the listener is beyond the ''range'' distance both speakers are sitting on two opposite sides of a circle with the radius of 0 on the sound source. You could say they are in the same position. As the player crosses ''range'' the speakers start moving away from sound source as the radius of the circle increases to a maximum which you set with the ''radius'' parameter. Maximum radius is reached at ''innerRange''.


The virtual speakers copy the cameras rotation, so if you are infront of the sound source and rotate yourself 90° to the left, your "ingame ears" and the virtual speakers will all line up. A small visual comparison: You might know particle effects in video games that seem to always ''look'' at you and ''rotate'' with you. The stereo emitter has the same behavior.
The virtual speakers copy the cameras rotation, so if you are infront of the sound source and rotate yourself 90° to the left, your "ingame ears" and the virtual speakers will all line up. A small visual comparison: You might know particle effects in video games that seem to always ''look'' at you and ''rotate'' with you, like billboards. The stereo emitter has the same behavior.


===Multichannel Panner===
=== Multichannel Panner ===
The '''Multichannel Panner''' does not create any virtual speakers.
The '''Multichannel Panner''' does not create any virtual speakers.


==Creating 3D Processors==
More info soon.
 
== Creating 3D Processors ==
'''3D Processors''' are defined ''ONLY'' in the cfgSound3DProcessors class. You can create your own versions of ''emitters'' and ''panners''. An example should be enough to explain:
'''3D Processors''' are defined ''ONLY'' in the cfgSound3DProcessors class. You can create your own versions of ''emitters'' and ''panners''. An example should be enough to explain:
<code>
<code>class cfgSound3DProcessors
class cfgSound3DProcessors
{
{
class myAwesomeExtremeEmitter
class myAwesomeExtremeEmitter
Line 38: Line 39:
radius = 50;
radius = 50;
};
};
class myAwesomeExtremePanner
class myAwesomeExtremePanner
{
{
Line 48: Line 48:
</code>
</code>


==Implementing 3D Processors in your config==
== Implementing 3D Processors in your config ==
In your [[Sound#SoundSet|SoundSets]] use the name of your 3D Processor, like this:
<code>sound3DProcessorType = myAwesomeExtremeEmitter;</code>

Revision as of 17:52, 7 February 2021

What are Sound 3D Processors? How do I define them? How do I use them in my audio config?

Sound 3D Processors

In the old audio engine any stereo file that was supposed to be positional in the 3D world (gunshots for example) was downmixed to mono. Using stereo sounds can enhance the soundscape tremendously which is why Sound 3D Processors were introduced. Here is an example configuration. class cfgSound3DProcessors { class default3DProcessingType { type = emitter; // emitter or panner, chooses between the available processors innerRange = 0; // range at which certain behaviors of the chosen processor reach their limit, results depend on chosen processor range = 50; // range at which the chosen processor starts turning 100% mono into "3D processed stereo sound" rangeCurve = LinearCurve; // normally the transition between 100% mono and 100% "3D processed" is linear, but you can use curves defined in CfgSoundCurves to change that behavior radius = 3; // ONLY FOR EMITTER maximum radius between the virtual speakers }; };

Stereo Emitter

The Stereo Emitter creates two virtual speakers in the 3D world, each speaker is playing back one channel of the stereo file. Only stereo files are supported at the moment. The position of the speakers depends on parameters in the configuration and the distance to the listener. When the listener is beyond the range distance both speakers are sitting on two opposite sides of a circle with the radius of 0 on the sound source. You could say they are in the same position. As the player crosses range the speakers start moving away from sound source as the radius of the circle increases to a maximum which you set with the radius parameter. Maximum radius is reached at innerRange.

The virtual speakers copy the cameras rotation, so if you are infront of the sound source and rotate yourself 90° to the left, your "ingame ears" and the virtual speakers will all line up. A small visual comparison: You might know particle effects in video games that seem to always look at you and rotate with you, like billboards. The stereo emitter has the same behavior.

Multichannel Panner

The Multichannel Panner does not create any virtual speakers.

More info soon.

Creating 3D Processors

3D Processors are defined ONLY in the cfgSound3DProcessors class. You can create your own versions of emitters and panners. An example should be enough to explain: class cfgSound3DProcessors { class myAwesomeExtremeEmitter { type = emitter; innerRange = 50; range = 200; rangeCurve = myAwesomeCurve; //OPTIONAL PARAMETER - you can use a curve defined in cfgSoundCurves, if you don't define a curve a linear transition curve will be used (it's fine for most cases) radius = 50; }; class myAwesomeExtremePanner { type = panner; innerRange = 100; range = 5000; }; };

Implementing 3D Processors in your config

In your SoundSets use the name of your 3D Processor, like this: sound3DProcessorType = myAwesomeExtremeEmitter;