diff --git a/extensions/2.0/OMI_audio_emitter/README.md b/extensions/2.0/OMI_audio_emitter/README.md index 46ab409..cf84b71 100644 --- a/extensions/2.0/OMI_audio_emitter/README.md +++ b/extensions/2.0/OMI_audio_emitter/README.md @@ -3,6 +3,7 @@ ## Contributors * Robert Long, Element Inc. +* Anthony Burchell, Individual Contributor ## Status @@ -236,15 +237,27 @@ Audio emitters of type `positional` may be added to nodes using the following sy Note that multiple global audio emitters are allowed on the scene, but only a single audio emitter may be added to a node. - +### Audio Rolloff Formula +The Audio Rolloff range is (0, +∞). The default is 1. - +The rolloff formula is dependant on the distance model defined. The available distance models are `linear`, `inverse`, and `exponential`. - +- linear formula: `1 - rolloffFactor * (distance - refDistance) / (maxDistance - refDistance)` +- inverse formula: `refDistance / (refDistance + rolloffFactor * (Math.max(distance, refDistance) - refDistance))` +- exponential formula: `pow((Math.max(distance, refDistance) / refDistance, -rolloffFactor)` ### Audio Gain Units +The gain unit range is (0,+∞). The default is 1. +- gain formula: `originalVolume * gain` +### Audio Cone Vizualized +Audio cone showing how cone parameters impact volume based on relative distance to the source. +Figure 1. A modified graphic based on the W3C Web Audio API Audio cone Figure + +The cone properties relate to the `PannerNode` interface and determine the amount of volume relative to a listeners position within the defined cone area. + +The gain relative to cone properties is determined in a similar way as described in the web audio api with the difference that this audio emitter extension uses radians in place of degrees. [Cone Gain Algorithm Example](https://webaudio.github.io/web-audio-api/#Spatialization-sound-cones) ### Units for Rotations @@ -256,8 +269,7 @@ Radians are used for rotations matching glTF2. ## Known Implementations -* TODO: List of known implementations, with links to each if available. -* +* Third Room - https://github.com/thirdroom/thirdroom ## Resources diff --git a/extensions/2.0/OMI_audio_emitter/figures/cone-diagram.svg b/extensions/2.0/OMI_audio_emitter/figures/cone-diagram.svg new file mode 100644 index 0000000..5b74693 --- /dev/null +++ b/extensions/2.0/OMI_audio_emitter/figures/cone-diagram.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Listener + + + + + + + + + + + + + + + + + + + + + orientation + + + + + + + + forwar + + d + + + + + + + + + coneInnerAngle + + + + + + + coneOuterAngle + + + + + + + gain = 1 + + + + + + + gain = coneOuterGain + + + + + + + + V + + ariable gain + + + + + + + +