GetSoundBPM: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 17: | Line 17: | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
- | local sound = playSound ( "http://radio02-cn03.akadostream.ru:8114/nrj192.mp3" ) | ||
addEventHandler ( "onClientRender", root, | |||
function ( ) | |||
local bpm = getSoundBPM ( sound ) | |||
outputChatBox ( string.format ( "BPM: %i", bpm or 0 ) ) | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Revision as of 17:49, 1 October 2012
Syntax
int getSoundBPM( element sound )
Required Arguments
- sound: A sound element that is created using playSound or playSound3D
Returns
Returns the beats per minute of the given sound.
Example
Click to collapse [-]
Clientlocal sound = playSound ( "http://radio02-cn03.akadostream.ru:8114/nrj192.mp3" ) addEventHandler ( "onClientRender", root, function ( ) local bpm = getSoundBPM ( sound ) outputChatBox ( string.format ( "BPM: %i", bpm or 0 ) ) end )
Requirements
This template will be deleted.
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd