getSoundProperties
Client
Returns a sound's sample rate, tempo and pitch, and whether it plays backwards.
float, float, float, bool|false getSoundProperties(sound sound)
Parameters
| Name | Type | Description |
|---|---|---|
| sound | sound | The sound element, or a dui element for the browser's sound. |
Returns
The sample rate in Hz, the tempo in percent, the pitch in semitones and true if it plays backwards; or false if the sound was not found.
Example
local rate, tempo, pitch, reversed = getSoundProperties(music)
outputDebugString(("%d Hz, tempo %+d%%, pitch %+d"):format(rate, tempo, pitch))