Class SoundTrack
Hierarchy
- SoundTrack
Index
Constructors
Properties
Methods
Constructors
constructor
-
Creates a new sound track.
Parameters
-
scene: Scene
Define the scene the sound track belongs to
-
Optional options: ISoundTrackOptions
Returns SoundTrack
-
Properties
idSearch playground for id
The unique identifier of the sound track in the scene.
sound CollectionSearch playground for soundCollection
The list of sounds included in the sound track.
Methods
add SoundSearch playground for addSound
-
Adds a sound to this sound track
Parameters
-
sound: Sound
define the cound to add
Returns void
-
connect ToAnalyserSearch playground for connectToAnalyser
-
Connect the sound track to an audio analyser allowing some amazing synchornization between the sounds/music and your visualization (VuMeter for instance).
Parameters
-
analyser: Analyser
The analyser to connect to the engine
Returns void
-
disposeSearch playground for dispose
-
Release the sound track and its associated resources
Returns void
remove SoundSearch playground for removeSound
-
Removes a sound to this sound track
Parameters
-
sound: Sound
define the cound to remove
Returns void
-
set VolumeSearch playground for setVolume
-
Set a global volume for the full sound track.
Parameters
-
newVolume: number
Define the new volume of the sound track
Returns void
-
switch Panning Model ToEqual PowerSearch playground for switchPanningModelToEqualPower
-
Switch the panning model to Equal Power: Represents the equal-power panning algorithm, generally regarded as simple and efficient. equalpower is the default value.
Returns void
switch Panning Model ToHRTFSearch playground for switchPanningModelToHRTF
-
Switch the panning model to HRTF: Renders a stereo output of higher quality than equalpower — it uses a convolution with measured impulse responses from human subjects.
Returns void
It could be useful to isolate your music & sounds on several tracks to better manage volume on a grouped instance of sounds. It will be also used in a future release to apply effects on a specific track.
https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-sound-tracks