Distance-attenuation Extension¶
Review of concepts for simulating distance attenuation of sound sources.
MIDI Manufacturers Association, Interactive Audio Special Interest Group 3D Level 1 Guideline¶
source: http://www.midi.org/techspecs/rp49public.pdf
4 parameter defining the distance attenuation model:
- Maximum Distance
- the distance at which no additional distance based attenuation is applied when the sound moves further away
- Gain at Maximum Distance
- the maximum distance based attenuation applied to the sound. It is applied when the sound is at Maximum Distance
- Reference Distance Ratio
- the distance beyond which distance based attenuation is applied, and below which no distance based attenuation is applied
- Distance Ratio
- the normalized distance (0..1). the actual distance is computed by
distanceRatio
*maximumDistance
- the normalized distance (0..1). the actual distance is computed by
The actual attenuation due to distance is computed according to the following model and is the same than the IA-SIG has chosen for the 3D Audio Rendering and Evaluation guidelines Level 2 (I3DL2) and is also used in OpenAL and Microsoft’s DirectSound3D.
attenuation
= 20*log10(referenceDistance
/ (referenceDistance
+ ROF
(distance
- referenceDistance
)))
ROF
, the roll-off factor is defined as:
ROF
= (referenceDistance
* 10^(- maxAttenuation
* 0.05) - referenceDistance
) / (maxDistance
- referenceDistance
)
Another model is proposed as an alternative at the end of the specs:
attenuation
= 20*log10(referenceDistance
/ distance
)^a
a
can be found with:
a
= maxAttenuation
/ 20*log10(referenceDistance
/ maxDistance
)