Post

SpatialSound

Overview

The SpatialSound node controls the 3D spatialization of sound playback by a child AudioClip or MovieTexture node. Sound intensity includes stereo support, varying according to user location and view direction in the scene.

The SpatialSound node belongs to the Sound component and requires at least level 2, its default container field is children. It is available from X3D version 4.0 or higher.

Hierarchy

1
2
3
4
+ X3DNode
  + X3DChildNode
    + X3DSoundNode
      + SpatialSound

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

Hint

SFString [in, out] description “”

Author-provided prose that describes intended purpose of the url asset.

Hint

  • Many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for “ quotation-mark character).

SFBool [in, out] enabled TRUE

Enables/disables node operation.

SFBool [ ] spatialize TRUE

Whether to spatialize sound playback relative to viewer.

Hint

  • Only effective within the auralization volume.

SFFloat [in, out] intensity 1 [0,1]

Factor [0,1] adjusting loudness (decibels) of emitted sound.

SFVec3f [in, out] location 0 0 0 (-∞,∞)

Position of sound ellipsoid center, relative to local coordinate system.

Hint

  • Improve audibility by setting location=’0 1.6 0’ so that center height of sound ellipsoid matches typical NavigationInfo avatarSize height.

SFVec3f [in, out] direction 0 0 1 (-∞,∞)

direction of sound axis, relative to local coordinate system.

SFFloat [in, out] gain 1 (-∞,∞)

The gain field is a factor that represents the amount of linear amplification to apply to the output of the node.

Hint

  • Negative gain factors negate the input signal.

Warning

  • Decibel values shall not be used.

SFBool [in, out] enableHRTF FALSE

enableHRTF enables/disables Head Related Transfer Function (HRTF) auralization, if available. SpatialSound enabledHRTF=true corresponds to panningModelType HRTF, enabledHRTF=false corresponds to panningModelType equalpower.

Hints

SFBool [in, out] dopplerEnabled FALSE not supported

dopplerEnabled enables/disables whether real-time Doppler effects (due to relation motion between sources and listeners) are computed by browser between virtual sound sources and active listening locations, then applied to received frequency at active listening locations.

Hints

SFFloat [in, out] coneOuterGain 0 (-∞,∞)

coneOuterGain is minimum gain value found outside coneOuterAngle.

SFFloat [in, out] coneInnerAngle 6.2832 [0,2π]

coneInnerAngle is centered along direction and defines the inner conical volume, inside of which no source gain reduction occurs.

Hints

SFFloat [in, out] coneOuterAngle 6.2832 [0,2π]

coneOuterAngle is centered along direction and defines an outer conical volume, within which the sound gain decreases linearly from full gain to coneOuterGain. Outside of coneOuterAngle, gain equals coneOuterGain.

Hints

SFString [in, out] distanceModel “INVERSE” [“LINEAR” “INVERSE” “EXPONENTIAL”]

distanceModel determines how field specifies which algorithm to use for sound attenuation, corresponding to distance between an audio source and a listener, as it moves away from the listener.

Hint

SFFloat [in, out] maxDistance 10000 [0,∞)

maxDistance is the maximum distance where sound is renderable between source and listener, after which no reduction in sound volume occurs.

SFFloat [in, out] referenceDistance 1 [0,∞)

referenceDistance for reducing volume as source moves further from the listener. For distances less than this value, volume is not reduced.

Hint

SFFloat [in, out] rolloffFactor 1 [0,∞)

rolloffFactor indicates how quickly volume is reduced as source moves further from listener.

Hint

SFFloat [in, out] priority 0 [0,1]

Player hint [0,1] if needed to choose which sounds to play.

MFNode [in, out] children [ ] [X3DSoundChannelNode,X3DSoundProcessingNode,X3DSoundSourceNode]

The children field specifies audio-graph sound sources providing input signals for this node. If multiple input signals are provided by the inputs children field, all channels are mixed together and merged prior to presentation.

Hint

  • Can be original (DEF) or referenced (USE) nodes.

Warning

  • Contained AudioClip or MovieTexture nodes must have containerField='children' to override otherwise-incorrect defaults.

Advice

Hints

Warning

  • While providing sounds on the ground plane, ensure that the audible auralization volume is sufficiently elevated to match avatar height.

See Also

This post is licensed under CC BY 4.0 by the author.