Interface SpatialSound
- All Superinterfaces:
X3DChildNode
,X3DNode
,X3DSoundNode
- All Known Implementing Classes:
SpatialSound
The SpatialSound node controls the 3D spatialization of sound playback by a child AudioClip or MovieTexture node.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
org.web3d.x3d.jsail
classes.
SpatialSound node tooltip: [X3DSoundNode] 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.
- Hint: if the audio source is stereo or multi-channel, channel separation is retained during playback.
- Warning: while providing sounds on the ground plane, ensure that the audible auralization volume is sufficiently elevated to match avatar height.
- Hint: X3D Sound component Figure 16.2 Sound Node Geometry, https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/sound.html#f-Soundnodegeometry
- Hint: W3C Web Audio API, PannerNode Interface https://www.w3.org/TR/webaudio/#pannernode
- Hint: X3D Scene Authoring Hints:Audio https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Audio
- Hint: Wikipedia 3D sound localization https://en.wikipedia.org/wiki/3D_sound_localization
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildren
(X3DNode[] newValue) Add array of children nodes to array of existing nodes (if any).X3DNode[]
Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) with acceptable node types limited to Analyser|AudioClip|AudioDestination|BiquadFilter|BufferAudioSource|ChannelMerger|ChannelSelector|ChannelSplitter|Convolver|Delay|DynamicsCompressor|Gain|ListenerPointSource|MicrophoneSource|MovieTexture|OscillatorSource|Sound|SpatialSound|StreamAudioDestination|StreamAudioSource|WaveShaper, from inputOutput MFNode field children.float
Provide float value unit axis, angle (in radians) within allowed range of [0,6.2832] from inputOutput SFFloat field named coneInnerAngle.float
Provide float value unit axis, angle (in radians) within allowed range of [0,6.2832] from inputOutput SFFloat field named coneOuterAngle.float
Provide float value from inputOutput SFFloat field named coneOuterGain.Provide String value from inputOutput SFString field named description.float[]
Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.Provide String enumeration value (baseType SFString) ["LINEAR" | "INVERSE" | "EXPONENTIAL"] from inputOutput SFString field named distanceModel.boolean
Provide boolean value from inputOutput SFBool field named dopplerEnabled.boolean
Provide boolean value from inputOutput SFBool field named enabled.boolean
Provide boolean value from inputOutput SFBool field named enableHRTF.float
getGain()
Provide float value from inputOutput SFFloat field named gain.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named intensity.float[]
Provide array of 3-tuple float results from inputOutput SFVec3f field named location.float
Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxDistance.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named priority.float
Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named referenceDistance.float
Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named rolloffFactor.boolean
Provide boolean value from initializeOnly SFBool field named spatialize.void
setChildren
(X3DNode newValue) Set single children node, replacing prior array of existing nodes (if any).setChildren
(X3DNode[] newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field children.setConeInnerAngle
(float newValue) Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named coneInnerAngle.setConeOuterAngle
(float newValue) Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named coneOuterAngle.setConeOuterGain
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named coneOuterGain.setDescription
(String newValue) Accessor method to assign String value to inputOutput SFString field named description.setDirection
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.setDistanceModel
(String newValue) Accessor method to assign String enumeration value ("LINEAR" | "INVERSE" | "EXPONENTIAL") to inputOutput SFString field named distanceModel.setDopplerEnabled
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named dopplerEnabled.setEnabled
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named enabled.setEnableHRTF
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named enableHRTF.setGain
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named gain.setIntensity
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named intensity.setLocation
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named location.setMaxDistance
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named maxDistance.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setPriority
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named priority.setReferenceDistance
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named referenceDistance.setRolloffFactor
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named rolloffFactor.setSpatialize
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named spatialize.
-
Method Details
-
getChildren
X3DNode[] getChildren()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) with acceptable node types limited to Analyser|AudioClip|AudioDestination|BiquadFilter|BufferAudioSource|ChannelMerger|ChannelSelector|ChannelSplitter|Convolver|Delay|DynamicsCompressor|Gain|ListenerPointSource|MicrophoneSource|MovieTexture|OscillatorSource|Sound|SpatialSound|StreamAudioDestination|StreamAudioSource|WaveShaper, from inputOutput MFNode field children.
Tooltip: [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.- Warning: contained AudioClip or MovieTexture nodes must have containerField='children' to override otherwise-incorrect defaults.
- Hint: can be original (DEF) or referenced (USE) nodes.
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to Analyser|AudioClip|AudioDestination|BiquadFilter|BufferAudioSource|ChannelMerger|ChannelSelector|ChannelSplitter|Convolver|Delay|DynamicsCompressor|Gain|ListenerPointSource|MicrophoneSource|MovieTexture|OscillatorSource|Sound|SpatialSound|StreamAudioDestination|StreamAudioSource|WaveShaper.- Returns:
- value of children field
- See Also:
-
setChildren
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field children.
Tooltip: [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.- Warning: contained AudioClip or MovieTexture nodes must have containerField='children' to override otherwise-incorrect defaults.
- Hint: can be original (DEF) or referenced (USE) nodes.
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to Analyser|AudioClip|AudioDestination|BiquadFilter|BufferAudioSource|ChannelMerger|ChannelSelector|ChannelSplitter|Convolver|Delay|DynamicsCompressor|Gain|ListenerPointSource|MicrophoneSource|MovieTexture|OscillatorSource|Sound|SpatialSound|StreamAudioDestination|StreamAudioSource|WaveShaper.- Parameters:
newValue
- is new value for the children field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addChildren
Add array of children nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to Analyser|AudioClip|AudioDestination|BiquadFilter|BufferAudioSource|ChannelMerger|ChannelSelector|ChannelSplitter|Convolver|Delay|DynamicsCompressor|Gain|ListenerPointSource|MicrophoneSource|MovieTexture|OscillatorSource|Sound|SpatialSound|StreamAudioDestination|StreamAudioSource|WaveShaper.- Parameters:
newValue
- is new value array to be appended the children field.
-
setChildren
Set single children node, replacing prior array of existing nodes (if any).- Parameters:
newValue
- is new node for the children field
-
getConeInnerAngle
float getConeInnerAngle()Provide float value unit axis, angle (in radians) within allowed range of [0,6.2832] from inputOutput SFFloat field named coneInnerAngle.
Tooltip: [0,2pi] coneInnerAngle is centered along direction and defines the inner conical volume, inside of which no source gain reduction occurs.- Hint: coneOuterAngle value is greater than or equal to coneInnerAngle.
- Hint: X3D4 Architecture Figure 16.3, SpatialSound Panning Gain Relationships https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/sound.html#f-AudioPannerListenerRelationships
- Returns:
- value of coneInnerAngle field
-
setConeInnerAngle
Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named coneInnerAngle.
Tooltip: [0,2pi] coneInnerAngle is centered along direction and defines the inner conical volume, inside of which no source gain reduction occurs.- Hint: coneOuterAngle value is greater than or equal to coneInnerAngle.
- Hint: X3D4 Architecture Figure 16.3, SpatialSound Panning Gain Relationships https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/sound.html#f-AudioPannerListenerRelationships
- Parameters:
newValue
- is new value for the coneInnerAngle field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getConeOuterAngle
float getConeOuterAngle()Provide float value unit axis, angle (in radians) within allowed range of [0,6.2832] from inputOutput SFFloat field named coneOuterAngle.
Tooltip: [0,2pi] 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.- Hint: coneOuterAngle value is greater than or equal to coneInnerAngle.
- Hint: X3D4 Architecture Figure 16.3, SpatialSound Panning Gain Relationships https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/sound.html#f-AudioPannerListenerRelationships
- Returns:
- value of coneOuterAngle field
-
setConeOuterAngle
Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named coneOuterAngle.
Tooltip: [0,2pi] 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.- Hint: coneOuterAngle value is greater than or equal to coneInnerAngle.
- Hint: X3D4 Architecture Figure 16.3, SpatialSound Panning Gain Relationships https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/sound.html#f-AudioPannerListenerRelationships
- Parameters:
newValue
- is new value for the coneOuterAngle field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getConeOuterGain
float getConeOuterGain()Provide float value from inputOutput SFFloat field named coneOuterGain.
Tooltip: (-infinity,+infinity) coneOuterGain is minimum gain value found outside coneOuterAngle. *- Returns:
- value of coneOuterGain field
-
setConeOuterGain
Accessor method to assign float value to inputOutput SFFloat field named coneOuterGain.
Tooltip: (-infinity,+infinity) coneOuterGain is minimum gain value found outside coneOuterAngle. *- Parameters:
newValue
- is new value for the coneOuterGain field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDescription
String getDescription()Provide String value from inputOutput SFString field named description.
Tooltip: 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).
- Specified by:
getDescription
in interfaceX3DSoundNode
- Returns:
- value of description field
-
setDescription
Accessor method to assign String value to inputOutput SFString field named description.
Tooltip: 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).
- Specified by:
setDescription
in interfaceX3DSoundNode
- Parameters:
newValue
- is new value for the description field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDirection
float[] getDirection()Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.
Tooltip: direction of sound axis, relative to local coordinate system. *- Returns:
- value of direction field
-
setDirection
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.
Tooltip: direction of sound axis, relative to local coordinate system. *- Parameters:
newValue
- is new value for the direction field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDistanceModel
String getDistanceModel()Provide String enumeration value (baseType SFString) ["LINEAR" | "INVERSE" | "EXPONENTIAL"] from inputOutput SFString field named distanceModel.
Tooltip: 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: W3C Web Audio API https://www.w3.org/TR/webaudio/#enumdef-distancemodeltype
- Returns:
- value of distanceModel field
-
setDistanceModel
Accessor method to assign String enumeration value ("LINEAR" | "INVERSE" | "EXPONENTIAL") to inputOutput SFString field named distanceModel.
Tooltip: 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: W3C Web Audio API https://www.w3.org/TR/webaudio/#enumdef-distancemodeltype
- Parameters:
newValue
- is new value for the distanceModel field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDopplerEnabled
boolean getDopplerEnabled()Provide boolean value from inputOutput SFBool field named dopplerEnabled.
Tooltip: 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.- Hint: functional support requires player support for Sound component level 3.
- Hint: Wikipedia Doppler effect https://en.wikipedia.org/wiki/Doppler_effect
- Returns:
- value of dopplerEnabled field
-
setDopplerEnabled
Accessor method to assign boolean value to inputOutput SFBool field named dopplerEnabled.
Tooltip: 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.- Hint: functional support requires player support for Sound component level 3.
- Hint: Wikipedia Doppler effect https://en.wikipedia.org/wiki/Doppler_effect
- Parameters:
newValue
- is new value for the dopplerEnabled field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
getEnabled
in interfaceX3DSoundNode
- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
setEnabled
in interfaceX3DSoundNode
- Parameters:
newValue
- is new value for the enabled field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEnableHRTF
boolean getEnableHRTF()Provide boolean value from inputOutput SFBool field named enableHRTF.
Tooltip: enableHRTF enables/disables Head Related Transfer Function (HRTF) auralization, if available. SpatialSound enabledHRTF=true corresponds to panningModelType HRTF, enabledHRTF=false corresponds to panningModelType equalpower.- Hint: W3C Audio API https://www.w3.org/TR/webaudio/#enumdef-panningmodeltype
- Hint: Wikipedia HRTF https://en.wikipedia.org/wiki/3D_sound_localization#Head-related_Transfer_Function_(HRTF)
- Returns:
- value of enableHRTF field
-
setEnableHRTF
Accessor method to assign boolean value to inputOutput SFBool field named enableHRTF.
Tooltip: enableHRTF enables/disables Head Related Transfer Function (HRTF) auralization, if available. SpatialSound enabledHRTF=true corresponds to panningModelType HRTF, enabledHRTF=false corresponds to panningModelType equalpower.- Hint: W3C Audio API https://www.w3.org/TR/webaudio/#enumdef-panningmodeltype
- Hint: Wikipedia HRTF https://en.wikipedia.org/wiki/3D_sound_localization#Head-related_Transfer_Function_(HRTF)
- Parameters:
newValue
- is new value for the enableHRTF field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getGain
float getGain()Provide float value from inputOutput SFFloat field named gain.
Tooltip: (-infinity,+infinity) The gain field is a factor that represents the amount of linear amplification to apply to the output of the node.- Warning: Decibel values shall not be used.
- Hint: Negative gain factors negate the input signal.
- Returns:
- value of gain field
-
setGain
Accessor method to assign float value to inputOutput SFFloat field named gain.
Tooltip: (-infinity,+infinity) The gain field is a factor that represents the amount of linear amplification to apply to the output of the node.- Warning: Decibel values shall not be used.
- Hint: Negative gain factors negate the input signal.
- Parameters:
newValue
- is new value for the gain field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getIntensity
float getIntensity()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named intensity.
Tooltip: Factor [0,1] adjusting loudness (decibels) of emitted sound. *- Returns:
- value of intensity field
-
setIntensity
Accessor method to assign float value to inputOutput SFFloat field named intensity.
Tooltip: Factor [0,1] adjusting loudness (decibels) of emitted sound. *- Parameters:
newValue
- is new value for the intensity field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLocation
float[] getLocation()Provide array of 3-tuple float results from inputOutput SFVec3f field named location.
Tooltip: [0,+infinity) 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.
- Returns:
- value of location field
-
setLocation
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named location.
Tooltip: [0,+infinity) 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.
- Parameters:
newValue
- is new value for the location field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMaxDistance
float getMaxDistance()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxDistance.
Tooltip: [0,+infinity) maxDistance is the maximum distance where sound is renderable between source and listener, after which no reduction in sound volume occurs. *- Returns:
- value of maxDistance field
-
setMaxDistance
Accessor method to assign float value to inputOutput SFFloat field named maxDistance.
Tooltip: [0,+infinity) maxDistance is the maximum distance where sound is renderable between source and listener, after which no reduction in sound volume occurs. *- Parameters:
newValue
- is new value for the maxDistance field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMetadata
X3DMetadataObject getMetadata()Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DNode
- Specified by:
getMetadata
in interfaceX3DSoundNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in interfaceX3DSoundNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getPriority
float getPriority()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named priority.
Tooltip: Player hint [0,1] if needed to choose which sounds to play. *- Returns:
- value of priority field
-
setPriority
Accessor method to assign float value to inputOutput SFFloat field named priority.
Tooltip: Player hint [0,1] if needed to choose which sounds to play. *- Parameters:
newValue
- is new value for the priority field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getReferenceDistance
float getReferenceDistance()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named referenceDistance.
Tooltip: [0,+infinity) referenceDistance for reducing volume as source moves further from the listener. For distances less than this value, volume is not reduced.- Hint: W3C Web Audio API https://www.w3.org/TR/webaudio/#dom-pannernode-refdistance
- Returns:
- value of referenceDistance field
-
setReferenceDistance
Accessor method to assign float value to inputOutput SFFloat field named referenceDistance.
Tooltip: [0,+infinity) referenceDistance for reducing volume as source moves further from the listener. For distances less than this value, volume is not reduced.- Hint: W3C Web Audio API https://www.w3.org/TR/webaudio/#dom-pannernode-refdistance
- Parameters:
newValue
- is new value for the referenceDistance field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getRolloffFactor
float getRolloffFactor()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named rolloffFactor.
Tooltip: [0,+infinity) rolloffFactor indicates how quickly volume is reduced as source moves further from listener.- Hint: W3C Web Audio API https://www.w3.org/TR/webaudio/#dom-pannernode-rollofffactor
- Returns:
- value of rolloffFactor field
-
setRolloffFactor
Accessor method to assign float value to inputOutput SFFloat field named rolloffFactor.
Tooltip: [0,+infinity) rolloffFactor indicates how quickly volume is reduced as source moves further from listener.- Hint: W3C Web Audio API https://www.w3.org/TR/webaudio/#dom-pannernode-rollofffactor
- Parameters:
newValue
- is new value for the rolloffFactor field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSpatialize
boolean getSpatialize()Provide boolean value from initializeOnly SFBool field named spatialize.
Tooltip: Whether to spatialize sound playback relative to viewer.- Hint: only effective within the auralization volume.
- Returns:
- value of spatialize field
-
setSpatialize
Accessor method to assign boolean value to initializeOnly SFBool field named spatialize.
Tooltip: Whether to spatialize sound playback relative to viewer.- Hint: only effective within the auralization volume.
- Parameters:
newValue
- is new value for the spatialize field.- Returns:
SpatialSound
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-