soundsource
Created when calling the sound() command, represents a live sound currently playing. Can be controlled to alter the playing sound:
Properties:
volume number, the current volume of the sound source
pitch number, the current pitch of the sound source
pan number, the 2D spatial location of the sound (-1 left, +1 right, 0 centre)
looping boolean, whether to loop the sound when it reaches the end of playback
paused boolean, whether the sound source is currently paused
muted boolean, whether the sound source is currently muted
Methods:
stop()
rewind()
fadeTo(volume, duration) animates the volume of the sound source over a time
stopFade() cancels the current fading action
pitchTo(pitch, duration) animates the pitch of the sound source over time
stopPitch() cancels the current pitch action
panTo(pan, duration) animates the pan of the sound source over time
stopPan() cancels the panning action
stopActions() cancels all actions on the sound source
soundsourceCreated when calling the
sound()command, represents a live sound currently playing. Can be controlled to alter the playing sound:Properties:
volumenumber, the current volume of the sound sourcepitchnumber, the current pitch of the sound sourcepannumber, the 2D spatial location of the sound (-1 left, +1 right, 0 centre)loopingboolean, whether to loop the sound when it reaches the end of playbackpausedboolean, whether the sound source is currently pausedmutedboolean, whether the sound source is currently mutedMethods:
stop()rewind()fadeTo(volume, duration)animates the volume of the sound source over a timestopFade()cancels the current fading actionpitchTo(pitch, duration)animates the pitch of the sound source over timestopPitch()cancels the current pitch actionpanTo(pan, duration)animates the pan of the sound source over timestopPan()cancels the panning actionstopActions()cancels all actions on the sound source