Interface SpatialSound

All Superinterfaces:
X3DChildNode, X3DNode, X3DSoundNode
All Known Implementing Classes:
SpatialSound

public interface SpatialSound
extends X3DSoundNode
The SpatialSound node controls the 3D spatialization of sound playback by a child AudioClip or MovieTexture node.

X3D node tooltip: (X3D version 4.0 draft) [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.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
SAI Java Specification, X3D Abstract Specification: SpatialSound, X3D Tooltips: SpatialSound, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    float getConeInnerAngle()
    Provide float value unit axis, angle (in radians) within allowed range of [0,6.2832] from inputOutput SFFloat field named coneInnerAngle.
    float getConeOuterAngle()
    Provide float value unit axis, angle (in radians) within allowed range of [0,6.2832] from inputOutput SFFloat field named coneOuterAngle.
    float getConeOuterGain()
    Provide float value from inputOutput SFFloat field named coneOuterGain.
    java.lang.String getDescription()
    Provide String value from inputOutput SFString field named description.
    float[] getDirection()
    Provide array of 3-tuple float results from inputOutput SFVec3f field named direction.
    java.lang.String getDistanceModel()
    Provide String enumeration value (baseType SFString) ["linear" | "inverse" | "exponential"] from inputOutput SFString field named distanceModel.
    boolean getEnabled()
    Provide boolean value from inputOutput SFBool field named enabled.
    boolean getEnableHRTF()
    Provide boolean value from inputOutput SFBool field named enableHRTF.
    float getGain()
    Provide float value from inputOutput SFFloat field named gain.
    float getIntensity()
    Provide float value within allowed range of [0,1] from inputOutput SFFloat field named intensity.
    float[] getLocation()
    Provide array of 3-tuple float results from inputOutput SFVec3f field named location.
    float getMaxDistance()
    Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named maxDistance.
    X3DMetadataObject getMetadata()
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float getPriority()
    Provide float value within allowed range of [0,1] from inputOutput SFFloat field named priority.
    float getReferenceDistance()
    Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named referenceDistance.
    float getRolloffFactor()
    Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named rolloffFactor.
    boolean getSpatialize()
    Provide boolean value from initializeOnly SFBool field named spatialize.
    SpatialSound setConeInnerAngle​(float newValue)
    Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named coneInnerAngle.
    SpatialSound setConeOuterAngle​(float newValue)
    Accessor method to assign float value unit axis, angle (in radians) to inputOutput SFFloat field named coneOuterAngle.
    SpatialSound setConeOuterGain​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named coneOuterGain.
    SpatialSound setDescription​(java.lang.String newValue)
    Accessor method to assign String value to inputOutput SFString field named description.
    SpatialSound setDirection​(float[] newValue)
    Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named direction.
    SpatialSound setDistanceModel​(java.lang.String newValue)
    Accessor method to assign String enumeration value ("linear" | "inverse" | "exponential") to inputOutput SFString field named distanceModel.
    SpatialSound setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    SpatialSound setEnableHRTF​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enableHRTF.
    SpatialSound setGain​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named gain.
    SpatialSound setIntensity​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named intensity.
    SpatialSound setLocation​(float[] newValue)
    Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named location.
    SpatialSound setMaxDistance​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named maxDistance.
    SpatialSound setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    SpatialSound setPriority​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named priority.
    SpatialSound setReferenceDistance​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named referenceDistance.
    SpatialSound setRolloffFactor​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named rolloffFactor.
    SpatialSound setSpatialize​(boolean newValue)
    Accessor method to assign boolean value to initializeOnly SFBool field named spatialize.
  • Method Details

    • 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.
      Returns:
      value of coneInnerAngle field
    • setConeInnerAngle

      SpatialSound setConeInnerAngle​(float newValue)
      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.
      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.
      Returns:
      value of coneOuterAngle field
    • setConeOuterAngle

      SpatialSound setConeOuterAngle​(float newValue)
      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.
      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

      SpatialSound setConeOuterGain​(float newValue)
      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

      java.lang.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 interface X3DSoundNode
      Returns:
      value of description field
    • setDescription

      SpatialSound setDescription​(java.lang.String newValue)
      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 interface X3DSoundNode
      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

      SpatialSound setDirection​(float[] newValue)
      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

      java.lang.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.
      Returns:
      value of distanceModel field
    • setDistanceModel

      SpatialSound setDistanceModel​(java.lang.String newValue)
      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.
      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).
    • getEnabled

      boolean getEnabled()
      Provide boolean value from inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      getEnabled in interface X3DSoundNode
      Returns:
      value of enabled field
    • setEnabled

      SpatialSound setEnabled​(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      setEnabled in interface X3DSoundNode
      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.
      Returns:
      value of enableHRTF field
    • setEnableHRTF

      SpatialSound setEnableHRTF​(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enableHRTF.

      Tooltip: enableHRTF enables/disables Head Related Transfer Function (HRTF) auralization, if available.
      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.
      Specified by:
      getGain in interface X3DSoundNode
      Returns:
      value of gain field
    • setGain

      SpatialSound setGain​(float newValue)
      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.
      Specified by:
      setGain in interface X3DSoundNode
      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

      SpatialSound setIntensity​(float newValue)
      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

      SpatialSound setLocation​(float[] newValue)
      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

      SpatialSound setMaxDistance​(float newValue)
      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.
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DNode
      Specified by:
      getMetadata in interface X3DSoundNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      SpatialSound setMetadata​(X3DMetadataObject newValue)
      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.
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNode
      Specified by:
      setMetadata in interface X3DSoundNode
      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:
      X3D Scene Authoring Hints: Metadata Nodes
    • 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

      SpatialSound setPriority​(float newValue)
      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.
      Returns:
      value of referenceDistance field
    • setReferenceDistance

      SpatialSound setReferenceDistance​(float newValue)
      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.
      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.
      Returns:
      value of rolloffFactor field
    • setRolloffFactor

      SpatialSound setRolloffFactor​(float newValue)
      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.
      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

      SpatialSound setSpatialize​(boolean newValue)
      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).