M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
soundsoundThe 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))

See also