javax.media.j3d
Class AuralAttributesRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeComponentRetained
              extended by javax.media.j3d.AuralAttributesRetained
All Implemented Interfaces:
java.lang.Cloneable

 class AuralAttributesRetained
extends NodeComponentRetained

The AuralAttributesRetained object defines all rendering state that can be set as a component object of a retained Soundscape node.


Field Summary
(package private)  boolean aaDirty
          This boolean is set when something changes in the attributes
(package private)  float attributeGain
          Gain Scale Factor applied to source with this attribute
(package private) static boolean debugFlag
          Debug print mechanism for Sound nodes
(package private)  float decayFilter
           
(package private)  float decayTime
          Decay parameters Length and timbre of reverb decay tail
(package private)  float density
           
(package private)  float diffusion
          Reverb Diffusion and Density ratios (0=min, 1=max)
(package private)  float[] distance
           
(package private)  int filterType
           
(package private)  float[] frequencyCutoff
           
(package private)  float frequencyScaleFactor
          Frequency Scale Factor used to increase or reduce the change of frequency associated with normal rate of playback.
(package private) static boolean internalErrors
           
(package private) static int LOW_PASS
           
(package private)  AuralAttributesRetained mirrorAa
          The mirror copy of this AuralAttributes.
(package private) static int NO_FILTERING
          Distance Filter Each sound source is attenuated by a filter based on it's distance from the listener.
(package private)  float reflectionCoefficient
          Coefficients for reverberation The (early) Reflection and Reverberation coefficient scale factors are used to approximate the reflective/absorptive characteristics of the surfaces in this bounded Auralizaton environment.
(package private)  float reflectionDelay
          Time Delays in milliseconds Set with either explicitly with time, or impliciticly by supplying bounds volume and having the delay time calculated.
(package private)  Bounds reverbBounds
           
(package private)  float reverbCoefficient
           
(package private)  float reverbDelay
           
(package private)  int reverbOrder
          Reverberation order This limits the number of Reverberation iterations executed while sound is being reverberated.
(package private)  float rolloff
          Atmospheric Rolloff - speed of sound - coeff Normal gain attenuation based on distance of sound from listener is scaled by a rolloff factor, which can increase or decrease the usual inverse-distance-square value.
(package private) static float SPEED_OF_SOUND
           
(package private)  float velocityScaleFactor
          Velocity Scale Factor Float value applied to the Change of distance between Sound Source and Listener over some delta time.
 
Fields inherited from class javax.media.j3d.NodeComponentRetained
changedFrequent, compChanged, duplicateOnCloneTree, mirror, refCnt, refCount, users
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
AuralAttributesRetained()
           
 
Method Summary
(package private)  void debugPrint(java.lang.String message)
           
(package private)  float getAttributeGain()
          Retrieve Attribute Gain (amplitude)
(package private)  float getDecayFilter()
          Retrieve Revereration Decay Filter
(package private)  float getDecayTime()
          Retrieve Revereration Decay Time
(package private)  float getDensity()
          Retrieve Revereration Density
(package private)  float getDiffusion()
          Retrieve Revereration Decay Diffusion
(package private)  void getDistanceFilter(float[] distance, float[] filter)
          Retrieve Distance Filter as arrays distances and frequency cutoff array
(package private)  void getDistanceFilter(Point2f[] attenuation)
          Retrieve Distance Filter (distances and frequency cutoff)
(package private)  int getDistanceFilterLength()
          Retrieve Distance Filter array length
(package private)  float getFrequencyScaleFactor()
          Retrieve Frequency Scale Factor
(package private)  float getReflectionCoefficient()
          Retrieve Reflective Coefficient
(package private)  float getReflectionDelay()
          Retrieve Reflection Delay Time
(package private)  Bounds getReverbBounds()
          Retrieve Revereration Delay Bounds volume
(package private)  float getReverbCoefficient()
          Retrieve Reverb Coefficient
(package private)  float getReverbDelay()
          Retrieve Revereration Delay Time
(package private)  int getReverbOrder()
          Retrieve Reverberation Order of Reflections
(package private)  float getRolloff()
          Retrieve Attribute Gain Rolloff
(package private)  float getVelocityScaleFactor()
          Retrieve Velocity ScaleFactor used in calculating Doppler Effect
(package private)  void reset(AuralAttributesRetained aa)
           
(package private)  void setAttributeGain(float gain)
          Set Attribute Gain (amplitude)
(package private)  void setDecayFilter(float decayFilter)
          Set Decay Filter
(package private)  void setDecayTime(float decayTime)
          Set Decay Time
(package private)  void setDensity(float density)
          Set Reverb Density
(package private)  void setDiffusion(float diffusion)
          Set Reverb Diffusion
(package private)  void setDistanceFilter(float[] distance, float[] filter)
          Set Distance Filter (based on distances and frequency cutoff) using separate arrays
(package private)  void setDistanceFilter(Point2f[] attenuation)
          Set Distance Filter (based on distances and frequency cutoff)
(package private)  void setFrequencyScaleFactor(float frequencyScaleFactor)
          Set Frequency Scale Factor
(package private)  void setReflectionCoefficient(float reflectionCoefficient)
          Set Reflective Coefficient
(package private)  void setReflectionDelay(float reflectionDelay)
          Set Reflection Delay Time
(package private)  void setReverbBounds(Bounds reverbVolume)
          Set Revereration Bounds
(package private)  void setReverbCoefficient(float reverbCoefficient)
          Set Reverb Coefficient
(package private)  void setReverbDelay(float reverbDelay)
          Set Revereration Delay Time
(package private)  void setReverbOrder(int reverbOrder)
          Set Reverberation Order of Reflections
(package private)  void setRolloff(float rolloff)
          Set Attribute Gain Rolloff
(package private)  void setVelocityScaleFactor(float velocityScaleFactor)
          Set Velocity ScaleFactor used in calculating Doppler Effect
(package private)  void update(AuralAttributesRetained aa)
           
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addAMirrorUser, addUser, clearLive, clone, copyMirrorUsers, createMirrorObject, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, initMirrorObject, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx, setLive, updateMirrorObject
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, compile, doSetLive, doSetLive, getSource, getVirtualUniverse, handleFrequencyChange, isInSetLive, isStatic, markAsLive, merge, mergeTransform, setCompiled, setLive, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeGain

float attributeGain
Gain Scale Factor applied to source with this attribute


rolloff

float rolloff
Atmospheric Rolloff - speed of sound - coeff Normal gain attenuation based on distance of sound from listener is scaled by a rolloff factor, which can increase or decrease the usual inverse-distance-square value.


SPEED_OF_SOUND

static final float SPEED_OF_SOUND
See Also:
Constant Field Values

reflectionCoefficient

float reflectionCoefficient
Coefficients for reverberation The (early) Reflection and Reverberation coefficient scale factors are used to approximate the reflective/absorptive characteristics of the surfaces in this bounded Auralizaton environment. Theses scale factors is applied to sound's amplitude regardless of sound's position. Value of 1.0 represents complete (unattenuated) sound reflection. Value of 0.0 represents full absorption; reverberation is disabled.


reverbCoefficient

float reverbCoefficient

reflectionDelay

float reflectionDelay
Time Delays in milliseconds Set with either explicitly with time, or impliciticly by supplying bounds volume and having the delay time calculated. Bounds of reverberation space does not have to be the same as Attribute bounds.


reverbDelay

float reverbDelay

reverbBounds

Bounds reverbBounds

decayTime

float decayTime
Decay parameters Length and timbre of reverb decay tail


decayFilter

float decayFilter

diffusion

float diffusion
Reverb Diffusion and Density ratios (0=min, 1=max)


density

float density

reverbOrder

int reverbOrder
Reverberation order This limits the number of Reverberation iterations executed while sound is being reverberated. As long as reflection coefficient is small enough, the reverberated sound decreases (as it would naturally) each successive iteration. Value of > zero defines the greatest reflection order to be used by the reverberator. All positive values are used as the number of loop iteration. Value of <= zero signifies that reverberation is to loop until reverb gain reaches zero (-60dB or 1/1000 of sound amplitude).


NO_FILTERING

static final int NO_FILTERING
Distance Filter Each sound source is attenuated by a filter based on it's distance from the listener. For now the only supported filterType will be LOW_PASS frequency cutoff. At some time full FIR filtering will be supported.

See Also:
Constant Field Values

LOW_PASS

static final int LOW_PASS
See Also:
Constant Field Values

filterType

int filterType

distance

float[] distance

frequencyCutoff

float[] frequencyCutoff

frequencyScaleFactor

float frequencyScaleFactor
Frequency Scale Factor used to increase or reduce the change of frequency associated with normal rate of playback. Value of zero causes sounds to be paused.


velocityScaleFactor

float velocityScaleFactor
Velocity Scale Factor Float value applied to the Change of distance between Sound Source and Listener over some delta time. Non-zero if listener moving even if sound is not. Value of zero implies no Doppler applied.


aaDirty

boolean aaDirty
This boolean is set when something changes in the attributes


mirrorAa

AuralAttributesRetained mirrorAa
The mirror copy of this AuralAttributes.


debugFlag

static final boolean debugFlag
Debug print mechanism for Sound nodes

See Also:
Constant Field Values

internalErrors

static final boolean internalErrors
See Also:
Constant Field Values
Constructor Detail

AuralAttributesRetained

AuralAttributesRetained()
Method Detail

debugPrint

void debugPrint(java.lang.String message)

setAttributeGain

void setAttributeGain(float gain)
Set Attribute Gain (amplitude)

Parameters:
gain - scale factor applied to amplitude

getAttributeGain

float getAttributeGain()
Retrieve Attribute Gain (amplitude)

Returns:
gain amplitude scale factor

setRolloff

void setRolloff(float rolloff)
Set Attribute Gain Rolloff

Parameters:
rolloff - atmospheric gain scale factor (changing speed of sound)

getRolloff

float getRolloff()
Retrieve Attribute Gain Rolloff

Returns:
rolloff atmospheric gain scale factor (changing speed of sound)

setReflectionCoefficient

void setReflectionCoefficient(float reflectionCoefficient)
Set Reflective Coefficient

Parameters:
reflectionCoefficient - reflection/absorption factor applied to early reflections.

getReflectionCoefficient

float getReflectionCoefficient()
Retrieve Reflective Coefficient

Returns:
reflection coeff reflection/absorption factor applied to early reflections.

setReflectionDelay

void setReflectionDelay(float reflectionDelay)
Set Reflection Delay Time

Parameters:
reflectionDelay - time before the start of early (first order) reflections.

getReflectionDelay

float getReflectionDelay()
Retrieve Reflection Delay Time

Returns:
reflection delay time

setReverbCoefficient

void setReverbCoefficient(float reverbCoefficient)
Set Reverb Coefficient

Parameters:
reverbCoefficient - reflection/absorption factor applied to late reflections.

getReverbCoefficient

float getReverbCoefficient()
Retrieve Reverb Coefficient

Returns:
reverb coeff reflection/absorption factor applied to late reflections.

setReverbDelay

void setReverbDelay(float reverbDelay)
Set Revereration Delay Time

Parameters:
reverbDelay - time between each order of reflection

getReverbDelay

float getReverbDelay()
Retrieve Revereration Delay Time

Returns:
reverb delay time between each order of reflection

setDecayTime

void setDecayTime(float decayTime)
Set Decay Time

Parameters:
decayTime - length of time reverb takes to decay

getDecayTime

float getDecayTime()
Retrieve Revereration Decay Time

Returns:
reverb delay time

setDecayFilter

void setDecayFilter(float decayFilter)
Set Decay Filter

Parameters:
decayFilter - frequency referenced used in low-pass filtering

getDecayFilter

float getDecayFilter()
Retrieve Revereration Decay Filter

Returns:
reverb delay Filter

setDiffusion

void setDiffusion(float diffusion)
Set Reverb Diffusion

Parameters:
diffusion - ratio between min and max device diffusion settings

getDiffusion

float getDiffusion()
Retrieve Revereration Decay Diffusion

Returns:
reverb diffusion

setDensity

void setDensity(float density)
Set Reverb Density

Parameters:
density - ratio between min and max device density settings

getDensity

float getDensity()
Retrieve Revereration Density

Returns:
reverb density

setReverbBounds

void setReverbBounds(Bounds reverbVolume)
Set Revereration Bounds

Parameters:
reverbVolume - bounds used to approximate reverb time.

getReverbBounds

Bounds getReverbBounds()
Retrieve Revereration Delay Bounds volume

Returns:
reverb bounds volume that defines the Reverberation space and indirectly the delay

setReverbOrder

void setReverbOrder(int reverbOrder)
Set Reverberation Order of Reflections

Parameters:
reverbOrder - number of times reflections added to reverb signal

getReverbOrder

int getReverbOrder()
Retrieve Reverberation Order of Reflections

Returns:
reverb order number of times reflections added to reverb signal

setDistanceFilter

void setDistanceFilter(Point2f[] attenuation)
Set Distance Filter (based on distances and frequency cutoff)

Parameters:
attenuation - array of pairs defining distance frequency cutoff

setDistanceFilter

void setDistanceFilter(float[] distance,
                       float[] filter)
Set Distance Filter (based on distances and frequency cutoff) using separate arrays

Parameters:
distance - array containing distance values
filter - array containing low-pass frequency cutoff values

getDistanceFilterLength

int getDistanceFilterLength()
Retrieve Distance Filter array length

Returns:
attenuation array length

getDistanceFilter

void getDistanceFilter(Point2f[] attenuation)
Retrieve Distance Filter (distances and frequency cutoff)


getDistanceFilter

void getDistanceFilter(float[] distance,
                       float[] filter)
Retrieve Distance Filter as arrays distances and frequency cutoff array

Parameters:
distance - array of float values
frequencyCutoff - array of float cutoff filter values in Hertz

setFrequencyScaleFactor

void setFrequencyScaleFactor(float frequencyScaleFactor)
Set Frequency Scale Factor

Parameters:
frequencyScaleFactor - factor applied to sound's base frequency

getFrequencyScaleFactor

float getFrequencyScaleFactor()
Retrieve Frequency Scale Factor

Returns:
frequency scale factor applied to sound's base frequency

setVelocityScaleFactor

void setVelocityScaleFactor(float velocityScaleFactor)
Set Velocity ScaleFactor used in calculating Doppler Effect

Parameters:
velocityScaleFactor - applied to velocity of sound in relation to listener

getVelocityScaleFactor

float getVelocityScaleFactor()
Retrieve Velocity ScaleFactor used in calculating Doppler Effect

Returns:
velocity scale factor

reset

void reset(AuralAttributesRetained aa)

update

void update(AuralAttributesRetained aa)


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.