All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.AuralAttributes
java.lang.Object
|
+----javax.media.j3d.SceneGraphObject
|
+----javax.media.j3d.NodeComponent
|
+----javax.media.j3d.AuralAttributes
- public class AuralAttributes
- extends NodeComponent
The AuralAttributes object is a component object of a Soundscape node that
defines environmental audio parameters that affect sound rendering. These
attributes include gain scale factor, atmospheric rolloff, and parameters
controlling reverberation, distance frequency filtering, and velocity-based
Doppler effect.
Attribute Gain
Scale factor applied to all sound's amplitude active within this region.
Valid values are > 0.0
Attribute Gain Rolloff
Rolloff scale factor used to model atmoshperic changes from
normal speed of sound.
Valid values are >= 0.0. Values > 1.0 increase the speed of sound,
while values < 1.0 decrease its speed.
Reverberation Model
Within Java3D simple model for auralization, there are three components
to sound reverberation for a particular listening space:
Delay time Approximates the time from the start of a sound until
it reaches the listener after reflecting once off the surfaces
in the region.
Reflection coefficient Attenuates the reverberated sound uniformly
(for all frequencies) as it bounces off surfaces (with
potentially different reflection characteristics).
Feedback loop Controls the maximum number of times a sound is
reflected off the surfaces.
None of these parameters are affected by sound position.
Reverberation Coeffient
The reflection coefficient for reverberation is a single scale factor
used to approximate the overall reflective or absorptive characteristics
of the surfaces in a reverberation region the listener is in. This
scale factor is applied to the sound's amplitude regardless of the
sound's position. A value of 1.0 represents complete (unattenuated)
sound reflection, while a value of 0.0 represents full absorption
(reverberation is disabled).
Reverberation Delay
The reverberation delay time is set either explicitly (in milliseconds),
or implicitly by supplying an additional bounds volume (from which the delay
time can be calculated). The bounds of the reverberation space does not
have to be the same as the application region of the Soundscape node
using this object.
Reverberation Order
The reverberation order defines the number of reverberation (feedback)
loop iterations to be executed while a sound is played. As long as the
reflection coefficient is small enough, the reverberated sound de-
creases (as it would naturally) each successive iteration. A value of 0
creates a single echo (given that the reverb delay is long enough),
while a value of -1 signifies that reverberation is to loop until it
reaches an amplitude of effective zero (>60 dB or 1/1000 of sound
amplitude). All other positive values are used as the number of loop
iteration.
Distance Filter
This parameter specifies a (distance, filter) attenuation pairs array.
If this is not set then no distance filtering is performed (equivalent to
using a distance filter of Sound.NO_FILTER for all distances). Currently,
this filter is a low-pass cutoff frequency. This array of pairs defines
a piece-wise linear slope for range of values. This attenuation array is
similar to the PointSound node's distanceAttenuation pair array, except
paired with distances in this list are frequency values. Using these
pairs, distance-based low-pass frequency filtering can be applied during
sound rendering. Distances, specified in the local coordinate system in
meters, must be > 0. Frequencies (in Hz) must be > 0.
If the distance from the listener to the sound source is less than the
first distance in the array, the first filter is applied to the sound
source. This creates a spherical region around the listener within
which a sound is uniformly attenuated by the first filter in the array.
If the distance from the listener to the sound source is greater than
the last distance in the array, the last filter is applied to the sound
source.
Distance elements in these array of pairs is a monotonically-increasing
set of floating point numbers measured from the location of the sound
source. FrequencyCutoff elements in this list of pairs can be any
positive float. While for most applications this list of values will
usually be monotonically-decreasing, they do not have to be.
getDistanceFilterLength method returns the length of the distance filter
arrays. Arrays passed into getDistanceFilter methods should all be at
least this size.
Doppler Effect Model
Doppler effect can be used to create a greater sense of movement of
sound sources, and can help unambiguate front-back localization errors.
The frequency of sound waves emanating from the source are lowered based
on the speed of the source in relation to the listener, and the sound
wave length.
The Doppler scale factor can be used to increase or reduce the change of
frequency associated with normal Doppler calculation. To create this
Doppler effect, the relative velocity (change in distance in the local
coordinate system between the sound source and the listener over time,
in meters per second) must be specified. This is non-zero even if the
listener is moving but the sound is not.
-
ALLOW_ATTRIBUTE_GAIN_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's attribute gain scale factor information
-
ALLOW_ATTRIBUTE_GAIN_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's attribute gain scale factor information
-
ALLOW_DISTANCE_FILTER_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's frequency cutoff information
-
ALLOW_DISTANCE_FILTER_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's frequency cutoff information
-
ALLOW_DOPPLER_SCALE_FACTOR_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's Doppler scale factor information.
-
ALLOW_DOPPLER_SCALE_FACTOR_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's Doppler scale factor information.
-
ALLOW_DOPPLER_VELOCITY_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's Doppler velocity information.
-
ALLOW_DOPPLER_VELOCITY_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's Doppler velocity information.
-
ALLOW_REFLECTION_COEFFICIENT_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's reflection coefficient
-
ALLOW_REFLECTION_COEFFICIENT_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's reflection coefficient
-
ALLOW_REVERB_DELAY_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's reverberation delay information
-
ALLOW_REVERB_DELAY_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's reverberation delay information
-
ALLOW_REVERB_ORDER_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's reverb order (feedback loop) information
-
ALLOW_REVERB_ORDER_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's reverb order (feedback loop) information
-
ALLOW_ROLLOFF_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's atmospheric rolloff.
-
ALLOW_ROLLOFF_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's atmospheric rolloff.
-
AuralAttributes()
- Constructs and initializes a new AuralAttributes object using following
defaults * for all parameters:
distance filtering: null (no filtering performed)
doppler scale factor: 1.0
-
AuralAttributes(float, float, float, float, int, float[], float[], float, float)
- Constructs and initializes a new AuralAttributes object using specified
parameters with separate float arrays for components of distanceFilter
-
AuralAttributes(float, float, float, float, int, Point2f[], float, float)
- Constructs and initializes a new AuralAttributes object using specified
parameters including a array of Point2f for the distanceFilter
-
getAttributeGain()
- Retrieve Attrribute Gain (amplitude)
-
getDistanceFilter(float[], float[])
- Retrieve Distance Filter in separate distance and frequency cutoff arrays
-
getDistanceFilter(Point2f[])
- Retrieve Distance Filter as a single array containing distances
and frequency cutoff
-
getDistanceFilterLength()
- Retrieve Distance Filter array length
-
getDopplerScaleFactor()
- Retrieve Doppler Scale Factor
-
getDopplerVelocity()
- Retrieve Velocity used to calculate Doppler Effect
-
getReflectionCoefficient()
- Retrieve Reflective Coefficient
-
getReverbDelay()
- Retrieve Revereration Delay Time
-
getReverbOrder()
- Retrieve Reverberation Order of Reflections
-
getRolloff()
- Retrieve Attribute Gain Rolloff
-
setAttributeGain(float)
- Set Attribute Gain (amplitude) scale factor
-
setDistanceFilter(float[], float[])
- Set Distance Filter using separate arrays for distances and frequency
cutoff.
-
setDistanceFilter(Point2f[])
- Set Distance Filter using a single array containing distances and
frequency cutoff as pairs of values as a single array of Point2f.
-
setDopplerScaleFactor(float)
- This parameter specifies a scale factor applied to the velocity or
wavelength portion of the Doppler-effect equation used during sound
rendering.
-
setDopplerVelocity(float)
- Set Doppler Velocity used to calculate Doppler Effect
This parameter specifies the velocity of sound relative to the listener's
position and velocity, which is used in the velocity and wavelength
portion of the Doppler effect equation used during sound rendering.
-
setReflectionCoefficient(float)
- Set Reflective Coefficient
-
setReverbDelay(Bounds)
- Set Revereration Delay Time by defining the volume of bounds
In this form the parameter implicitly defines the delay time between
each order of reflection (while reverberation is being rendered) by
specifying a reverberation bounds volume.
-
setReverbDelay(float)
- Set Revereration Delay Time
In this form the parameter specifies the delay time between each order of
reflection (while reverberation is being rendered) explicitly given in milli-
seconds.
-
setReverbOrder(int)
- Set Reverberation Order of Reflections
Its parameter specifies the number of times reflections are added to
reverberation being calculated.
-
setRolloff(float)
- Set Attribute Gain Rolloff
ALLOW_ATTRIBUTE_GAIN_READ
public static final int ALLOW_ATTRIBUTE_GAIN_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's attribute gain scale factor information
ALLOW_ATTRIBUTE_GAIN_WRITE
public static final int ALLOW_ATTRIBUTE_GAIN_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's attribute gain scale factor information
ALLOW_ROLLOFF_READ
public static final int ALLOW_ROLLOFF_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's atmospheric rolloff.
ALLOW_ROLLOFF_WRITE
public static final int ALLOW_ROLLOFF_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's atmospheric rolloff.
ALLOW_REFLECTION_COEFFICIENT_READ
public static final int ALLOW_REFLECTION_COEFFICIENT_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's reflection coefficient
ALLOW_REFLECTION_COEFFICIENT_WRITE
public static final int ALLOW_REFLECTION_COEFFICIENT_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's reflection coefficient
ALLOW_REVERB_DELAY_READ
public static final int ALLOW_REVERB_DELAY_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's reverberation delay information
ALLOW_REVERB_DELAY_WRITE
public static final int ALLOW_REVERB_DELAY_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's reverberation delay information
ALLOW_REVERB_ORDER_READ
public static final int ALLOW_REVERB_ORDER_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's reverb order (feedback loop) information
ALLOW_REVERB_ORDER_WRITE
public static final int ALLOW_REVERB_ORDER_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's reverb order (feedback loop) information
ALLOW_DISTANCE_FILTER_READ
public static final int ALLOW_DISTANCE_FILTER_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's frequency cutoff information
ALLOW_DISTANCE_FILTER_WRITE
public static final int ALLOW_DISTANCE_FILTER_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's frequency cutoff information
ALLOW_DOPPLER_SCALE_FACTOR_READ
public static final int ALLOW_DOPPLER_SCALE_FACTOR_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's Doppler scale factor information.
ALLOW_DOPPLER_SCALE_FACTOR_WRITE
public static final int ALLOW_DOPPLER_SCALE_FACTOR_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's Doppler scale factor information.
ALLOW_DOPPLER_VELOCITY_READ
public static final int ALLOW_DOPPLER_VELOCITY_READ
- For AuralAttributes component objects, specifies that this object
allows the reading of it's Doppler velocity information.
ALLOW_DOPPLER_VELOCITY_WRITE
public static final int ALLOW_DOPPLER_VELOCITY_WRITE
- For AuralAttributes component objects, specifies that this object
allows the writing of it's Doppler velocity information.
AuralAttributes
public AuralAttributes()
- Constructs and initializes a new AuralAttributes object using following
defaults * for all parameters:
distance filtering: null (no filtering performed)
doppler scale factor: 1.0
AuralAttributes
public AuralAttributes(float gain,
float rolloff,
float reflectionCoefficient,
float reverbDelay,
int reverbOrder,
Point2f distanceFilter[],
float dopplerScaleFactor,
float dopplerVelocity)
- Constructs and initializes a new AuralAttributes object using specified
parameters including a array of Point2f for the distanceFilter
- Parameters:
- gain - amplitude scale factor
- rolloff - atmospheric (changing speed of sound) scale factor
- coefficient - reflection/absorption scale factor applied to reverb
- reverb_delay - time between each order of reflection
- reverb_order - number of times reflections added to reverb signal
- cutoff - distance filter frequency cutoff
- doppler_scale_factor - factor applied to velocity/wave-length
- doppler_velocity - velocity of sound in relation to listener
AuralAttributes
public AuralAttributes(float gain,
float rolloff,
float reflectionCoefficient,
float reverbDelay,
int reverbOrder,
float distance[],
float frequencyCutoff[],
float dopplerScaleFactor,
float dopplerVelocity)
- Constructs and initializes a new AuralAttributes object using specified
parameters with separate float arrays for components of distanceFilter
- Parameters:
- gain - amplitude scale factor
- rolloff - atmospheric (changing speed of sound) scale factor
- coefficient - reflection/absorption scale factor applied to reverb
- reverb_delay - time between each order of reflection
- reverb_order - number of times reflections added to reverb signal
- cutoff - distance filter frequency cutoff
- doppler_scale_factor - factor applied to velocity/wave-length
- doppler_velocity - velocity of sound in relation to listener
setAttributeGain
public final void setAttributeGain(float gain)
- Set Attribute Gain (amplitude) scale factor
- Parameters:
- gain - scale factor applied to amplitude
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getAttributeGain
public final float getAttributeGain()
- Retrieve Attrribute Gain (amplitude)
- Returns:
- gain amplitude scale factor
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setRolloff
public final void setRolloff(float rolloff)
- Set Attribute Gain Rolloff
- Parameters:
- rolloff - atmospheric gain scale factor (changing speed of sound)
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getRolloff
public final float getRolloff()
- Retrieve Attribute Gain Rolloff
- Returns:
- rolloff atmospheric gain scale factor (changing speed of sound)
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setReflectionCoefficient
public final void setReflectionCoefficient(float coefficient)
- Set Reflective Coefficient
- Parameters:
- coefficient - reflection/absorption factor applied to reverb
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getReflectionCoefficient
public final float getReflectionCoefficient()
- Retrieve Reflective Coefficient
- Returns:
- reflection coeff reflection/absorption factor applied to reverb
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setReverbDelay
public final void setReverbDelay(float reverbDelay)
- Set Revereration Delay Time
In this form the parameter specifies the delay time between each order of
reflection (while reverberation is being rendered) explicitly given in milli-
seconds. A value for delay time of 0.0 disables reverberation.
- Parameters:
- reverbDelay - time between each order of reflection
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setReverbDelay
public final void setReverbDelay(Bounds reverbVolume)
- Set Revereration Delay Time by defining the volume of bounds
In this form the parameter implicitly defines the delay time between
each order of reflection (while reverberation is being rendered) by
specifying a reverberation bounds volume. The delay time is calculated
(becoming the new reverb time delay).
- Parameters:
- reverbVolume - bounds used to approximate reverb time.
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getReverbDelay
public final float getReverbDelay()
- Retrieve Revereration Delay Time
- Returns:
- reverb delay time between each order of reflection
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setReverbOrder
public final void setReverbOrder(int reverbOrder)
- Set Reverberation Order of Reflections
Its parameter specifies the number of times reflections are added to
reverberation being calculated. A value of -1 specifies an unbounded
number of reverberations.
- Parameters:
- reverbOrder - number of times reflections added to reverb signal
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getReverbOrder
public final int getReverbOrder()
- Retrieve Reverberation Order of Reflections
- Returns:
- reverb order number of times reflections added to reverb signal
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setDistanceFilter
public final void setDistanceFilter(Point2f attenuation[])
- Set Distance Filter using a single array containing distances and
frequency cutoff as pairs of values as a single array of Point2f.
- Parameters:
- attenuation - array of pairs of distance and frequency cutoff
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setDistanceFilter
public final void setDistanceFilter(float distance[],
float frequencyCutoff[])
- Set Distance Filter using separate arrays for distances and frequency
cutoff. The distance and frequencyCutoff arrays should be of the same
length. If the frequencyCutoff array length is greater than the distance
array length, the frequencyCutoff array elements beyond the length of
the distance array are ignored. If the frequencyCutoff array is shorter
than the distance array, the last frequencyCutoff array value is repeated
to fill an array of length equal to distance array.
- Parameters:
- distance - array of float distance with corresponding cutoff values
- frequencyCutoff - array of frequency cutoff values in Hertz
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getDistanceFilterLength
public final int getDistanceFilterLength()
- Retrieve Distance Filter array length
- Returns:
- attenuation array length
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getDistanceFilter
public final void getDistanceFilter(Point2f attenuation[])
- Retrieve Distance Filter as a single array containing distances
and frequency cutoff
- Returns:
- attenuation array of pais of distance and frequency cutoff values
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getDistanceFilter
public final void getDistanceFilter(float distance[],
float frequencyCutoff[])
- Retrieve Distance Filter in separate distance and frequency cutoff arrays
- Parameters:
- distance - array
- frequency - cutoff array
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setDopplerScaleFactor
public final void setDopplerScaleFactor(float dopplerScaleFactor)
- This parameter specifies a scale factor applied to the velocity or
wavelength portion of the Doppler-effect equation used during sound
rendering. Valid values are >= 0.0.
- Parameters:
- dopplerScaleFactor - factor applied to velocity/wave-length
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getDopplerScaleFactor
public final float getDopplerScaleFactor()
- Retrieve Doppler Scale Factor
- Returns:
- doppler scaleFactor factor applied to velocity/wave-length
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
setDopplerVelocity
public final void setDopplerVelocity(float dopplerVelocity)
- Set Doppler Velocity used to calculate Doppler Effect
This parameter specifies the velocity of sound relative to the listener's
position and velocity, which is used in the velocity and wavelength
portion of the Doppler effect equation used during sound rendering.
- Parameters:
- dopplerVelocity - velocity of sound in relation to listener
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
getDopplerVelocity
public final float getDopplerVelocity()
- Retrieve Velocity used to calculate Doppler Effect
- Returns:
- doppler velocity velocity of sound in relation to listener
- Throws: CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
All Packages Class Hierarchy This Package Previous Next Index