Resonance Audio Unity SDK API Reference
Utils
Constructor
Utils
new Utils()
A set of defaults, constants and utility functions.
Properties
ATTENUATION_ROLLOFFS
Array
Rolloff models (e.g. 'logarithmic', 'linear', or 'none').
DEFAULT_AMBISONIC_ORDER
Number
The default ambisonic order.
DEFAULT_ATTENUATION_ROLLOFF
string
Default rolloff model ('logarithmic').
DEFAULT_AZIMUTH
Number
Default azimuth (in degrees). Suitable range is 0 to 360.
DEFAULT_DIRECTIVITY_ALPHA
Number
The default alpha (i.e. microphone pattern).
DEFAULT_DIRECTIVITY_SHARPNESS
Number
The default pattern sharpness (i.e. pattern exponent).
DEFAULT_ELEVATION
Number
Default elevation (in degres). Suitable range is from -90 (below) to 90 (above).
DEFAULT_FORWARD
Float32Array
DEFAULT_MAX_DISTANCE
Number
DEFAULT_MIN_DISTANCE
Number
DEFAULT_POSITION
Float32Array
DEFAULT_REFLECTION_COEFFICIENTS
Object
The default reflection coefficients (where 0 = no reflection, 1 = perfect reflection, -1 = mirrored reflection (180-degrees out of phase)).
DEFAULT_REFLECTION_CUTOFF_FREQUENCY
Number
The -12dB cutoff frequency (in Hertz) for the lowpass filter applied to all reflections.
DEFAULT_REFLECTION_MAX_DURATION
Number
The maximum delay (in seconds) of a single wall reflection.
DEFAULT_REFLECTION_MIN_DISTANCE
Number
The minimum distance we consider the listener to be to any given wall.
DEFAULT_REFLECTION_MULTIPLIER
Number
The multiplier to apply to distances from the listener to each wall.
DEFAULT_REVERB_BANDWIDTH
Number
The default bandwidth (in octaves) of the center frequencies.
DEFAULT_REVERB_DURATION_MULTIPLIER
Number
The default multiplier applied when computing tail lengths.
DEFAULT_REVERB_DURATIONS
Float32Array
The default multiband RT60 durations (in seconds).
DEFAULT_REVERB_FREQUENCY_BANDS
Array
Center frequencies of the multiband late reflections. Nine bands are computed by: 31.25 * 2^(0:8).
DEFAULT_REVERB_GAIN
Number
The default gain (linear).
DEFAULT_REVERB_MAX_DURATION
Number
The maximum impulse response length (in seconds).
DEFAULT_REVERB_PREDELAY
Number
The late reflections pre-delay (in milliseconds).
DEFAULT_REVERB_TAIL_ONSET
Number
The length of the beginning of the impulse response to apply a half-Hann window to.
DEFAULT_RIGHT
Float32Array
DEFAULT_ROOM_DIMENSIONS
Object
Default room dimensions (in meters).
DEFAULT_ROOM_MATERIALS
Object
Default materials that use strings from
MATERIAL_COEFFICIENTS
DEFAULT_SOURCE_DISTANCE
Number
Default distance from listener when setting angle.
DEFAULT_SOURCE_GAIN
Number
Default input gain (linear).
DEFAULT_SOURCE_WIDTH
Number
The default source width.
DEFAULT_SPEED_OF_SOUND
Number
DEFAULT_UP
Float32Array
LISTENER_MAX_OUTSIDE_ROOM_DISTANCE
Number
Maximum outside-the-room distance to attenuate far-field listener by.
NUMBER_REFLECTION_AVERAGING_BANDS
Number
The number of bands to average over when computing reflection coefficients.
NUMBER_REVERB_FREQUENCY_BANDS
The number of frequency bands.
ROOM_AIR_ABSORPTION_COEFFICIENTS
Float32Array
Air absorption coefficients per frequency band.
ROOM_EYRING_CORRECTION_COEFFICIENT
Number
A scalar correction value to ensure Sabine and Eyring produce the same RT60 value at the cross-over threshold.
ROOM_MATERIAL_COEFFICIENTS
Object
Pre-defined frequency-dependent absorption coefficients for listed materials. Currently supported materials are:
- 'transparent'
- 'acoustic-ceiling-tiles'
- 'brick-bare'
- 'brick-painted'
- 'concrete-block-coarse'
- 'concrete-block-painted'
- 'curtain-heavy'
- 'fiber-glass-insulation'
- 'glass-thin'
- 'glass-thick'
- 'grass'
- 'linoleum-on-concrete'
- 'marble'
- 'metal'
- 'parquet-on-concrete'
- 'plaster-smooth'
- 'plywood-panel'
- 'polished-concrete-or-tile'
- 'sheetrock'
- 'water-or-ice-surface'
- 'wood-ceiling'
- 'wood-panel'
- 'uniform'
ROOM_MIN_VOLUME
Number
The minimum threshold for room volume. Room model is disabled if volume is below this value.
ROOM_STARTING_AVERAGING_BAND
Number
The starting band to average over when computing reflection coefficients.
SOURCE_MAX_OUTSIDE_ROOM_DISTANCE
Number
Maximum outside-the-room distance to attenuate far-field sources by.
Abstract types
RoomDimensions
Object
Properties describing the geometry of a room.
Properties
Parameter |
|
---|---|
width |
Number (in meters). |
height |
Number (in meters). |
depth |
Number (in meters). |
RoomMaterials
Object
Properties describing the wall materials (from
ROOM_MATERIAL_COEFFICIENTS
) of a room.
Properties
Parameter |
|
---|---|
left |
String Left-wall material name. |
right |
String Right-wall material name. |
front |
String Front-wall material name. |
back |
String Back-wall material name. |
up |
String Up-wall material name. |
down |
String Down-wall material name. |