A collection of useful constants used throughout the library. These can be overridden at runtime.
- Source:
Members
(static) acousticShadowFrequency :Number
Lowpass frequency of the acoustic shadow, in Hertz. Typically this value is the speed of sound divided by the width of the head.
Type:
- Number
- Source:
- To Do:
-
- Move to syngen.audio.binaural.model
(static) audioLookaheadTime :Number
Latency added to calculated times, in seconds.
Type:
- Number
- Source:
- To Do:
-
- Improve support for nonzero values
(static) binauralHeadWidth :Number
Width of head, in meters.
Type:
- Number
- Source:
- To Do:
-
- Move to syngen.audio.binaural.model
(static) binauralShadowOffset :Number
Offset that ears point away from +/- 90 degrees, in radians.
Type:
- Number
- Source:
- To Do:
-
- Move to syngen.audio.binaural.model
(static) binauralShadowRolloff :Number
Upper bound where acoustic shadow gradually increases in strength, in meters.
Type:
- Number
- Source:
- To Do:
-
- Move to syngen.audio.binaural.model
(static) distancePower :Number
The rolloff applied to Typically in physical space this value is derived from the distance-square law and is exactly two.
Type:
- Number
- Source:
- To Do:
-
- Move to dedicated distance models
(static) distancePowerHorizon :Boolean
Whether to multiply calculated gains by the ratio between distance and the horizon defined by syngen.streamer. This allows sounds to gradually fade out around the edges of the streamed area.
Type:
- Boolean
- Source:
- To Do:
-
- Move to dedicated distance models
(static) distancePowerHorizonExponent :Number
Speed of the gain dropoff applied when the horizon is enabled.
Type:
- Number
- Source:
- To Do:
-
- Move to dedicated distance models
(static) eulerToQuaternion :String
Rotation sequence when converting Euler angles to quaternions. Valid values include:
- XYZ
- XZY
- YXZ
- YZX
- ZXY
- ZYX
Type:
- String
- Source:
(static) gravity :Number
Acceleration due to gravity, in meters per second per second.
Type:
- Number
- Source:
(static) idleDelta :Number
Duration that the loop should ideally run when the window is blurred, in seconds.
Type:
- Number
- Source:
- To Do:
-
- Move to syngen.loop
(static) maxFrequency :Number
Upper bound of perceptible frequencies, in Hertz.
Type:
- Number
- Source:
(static) maxSafeFloat :Number
The largest float before precision loss becomes problematic.
This value is derived from Number.MAX_SAFE_INTEGER / (2 ** 10)
to deliver about three decimal places of precision, which is suitable for most purposes.
Type:
- Number
- Source:
(static) midiReferenceFrequency :Number
Frequency of the MIDI reference note, in Hertz.
Type:
- Number
- Source:
(static) midiReferenceNote :Number
Reference note number used when converting MIDI notes to frequencies.
Type:
- Number
- Source:
(static) minFrequency :Number
Lower bound of perceptible frequencies, in Hertz.
Type:
- Number
- Source:
(static) positionRadius :Number
Radius of the observer, in meters.
Type:
- Number
- Source:
- To Do:
-
- Move into syngen.position
(static) speedOfSound :Number
The speed of sound, in meters per second.
Type:
- Number
- Source:
(static) subFrequency :Number
Upper bound for sub-bass frequencies, in Hertz.
Type:
- Number
- Source:
(static) tau :Number
The circle constant, i.e. 2π.
Type:
- Number
- Source:
(static) unit2 :Number
Length that satisfies x=y
for a 2D unit circle.
Type:
- Number
- Source:
(static) unit3 :Number
Length that satisfies x=y=z
for a 3D unit sphere.
Type:
- Number
- Source:
(static) unit4 :Number
Length that satisfies w=x=y=z
for a 4D unit hypersphere.
Type:
- Number
- Source:
(static) zero :Number
Close enough to zero for most calculations that can't use zero, like ramping AudioParam
s exponentially to zero.
Type:
- Number
- Source:
(static) zeroDb :Number
Value in decibels that, for most purposes, is perceptibly silent.
Type:
- Number
- Source:
(static) zeroGain :Number
Value in gain that, for most purposes, is perceptibly silent.
Type:
- Number
- Source:
(static) zeroTime :Number
Length of time that, for most purposes, is perceptibly instantaneous.
Type:
- Number
- Source: