DASound objects can represent a recorded sound, a synthesized sound, or a mixture of these. A characteristic of imported sounds (.WAV and .MIDI files) is that they must have a length.
DASound objects have gain, rate, phase, and pan functions. Gain (volume) defines how loud the sound is played. Rate defines how much faster or slower the sound is played relative to its nominal rate. Phase defines how much to shift the time of the sound, and is useful for creating special sound effects such as echoes. Mixing the same sounds that are out of phase makes the sound richer. Pan defines the strength of the sound relative to the left and right sound channels. This is useful for adapting monaural sounds for stereo.
Gain, rate, phase, and pan can use animated numbers and can, therefore, change over time. This is useful for modifying the sound based on time or other computed values such as distance.
This class inherits from DABehavior.
Multiplies the gain (volume) by the given amount.
soundObj.GainAnim(
gain
)
Returns a DASound object representing the newly created sound.
Same as GainAnim except the parameter is non-animated.
soundObj.Gain
Creates a DASound object that repeats continuously.
soundObj.Loop( )
Returns a DASound object.
Creates a DASound object by repositioning a monophonic sound between the left and right channels. This is similar to adjusting the balance on a stereo.
soundObj.PanAnim(
pan
)
Returns a DASound object.
With stereophonic sounds, panning away from a channel attenuates it.
Same as PanAnim except the parameter is non-animated.
soundObj.Pan(
pan
)
Creates a new DASound object by shifting the sound by the given amount. Shifting the sound and mixing with the original sound allows for special effects, such as echoing.
soundObj.PhaseAnim(
phase
)
Returns a DASoundobject.
Same as PhaseAnim except the parameter is non-animated.
soundObj.Phase(
phase
)
Creates a DASound object by multiplying the playback rate by the given amount.
soundObj.RateAnim(
rate
)
Returns a DASound object.
Same as RateAnim except the parameter is non-animated.
soundObj.Rate(
rate
)
The following functions are defined in the DAStatics class and are most relevant to objects of type DASound.
lib.ImportSoundAsync(url, soundStandIn)
The following properties are defined in the DAStatics class and are most relevant to objects of type DASound.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.