Sound object

The Sound object plays and controls audio with effects and spatial properties

Property Description Access Type
Sound.cone Get/set the sound cone readwrite table
Sound.cursor Get/set the current sound cursor position readwrite number
Sound.direction Get/set the sound direction in the world readwrite table
Sound.doppler Get/set the sound doppler factor readwrite number
Sound.duration Get the sound length in seconds readonly number
Sound.ended Check if the sound has ended readonly boolean
Sound.loop Get/set the sound looping mode readwrite boolean
Sound.maxdistance Get/set the sound maximum distance for attenuation calculation readwrite number
Sound.maxgain Get/set the sound maximum gain from spatialization readwrite number
Sound.mindistance Get/set the sound minimum distance for attenuation calculation readwrite number
Sound.mingain Get/set the sound minimum gain from spatialization readwrite number
Sound.pan Get/set the sound pan readwrite number
Sound.pitch Get/set the sound pitch readwrite number
Sound.playing Check if the sound is playing readonly number
Sound.position Get/set the sound position in the world readwrite table
Sound.rolloff Get/set the sound rolloff readwrite number
Sound.velocity Get/set the sound velocity readwrite number
Sound.volume Get/set the sound volume readwrite number
Methods Description Return value
Sound:constructor() Sound object constructor
Sound:echo() Apply an echo effect to the sound -
Sound:fade() Fade the sound -
Sound:play() Play the sound
Sound:reverb() Apply a reverb effect to the sound -
Sound:seek() Seek sound to time position -
Sound:stop() Stop playing the sound -