Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I work out the BPM of a sound object?

I'm sure somebody here knows, but I've seen a new club place open up recently and they've got a script that works out the beats per minute of a song that any user can play.

They've added that feature so their dance animations can be synced with the BPM of a song that's played.

There's not a property for this on sound objects on Roblox, anyone know how it's done?

Thanks.

2 comments

0

Wow, I can't even imagine approaching that script. It sounds quite complicated

0

You should probably ask BlueTaslem , he would know about this complex stuff.

2 answers

✓ Accepted answer

Peaks

You can probably try and average it out with the peaks of the sound. Most music will have some form of emphasis on the beats in every bar, whether that's because that's where every new note comes in or because they genuinely have an emphasis there. Most of your emphasis happens on the downbeat though, so you'll probably get slightly inaccurate BPM unless you also give it some guesswork.

1 comment

0

Thanks, I'm going to give it a go today and see what I can come up with. It would be quite interesting to get working, because it could open up a lot of potential in certain areas.

To do this, you would need to use the PlaybackLoudness property, which gives a number between 0 and 1000 indicating how loud the sound is currently playing back. Using this, you can create a BPM counter that counts how frequently the audio loudness is above a value determined by you.

4 comments

0

How loud a song is playing doesn't equate to how many beats there are in a minute. Higher the BPM the faster the song, lower BPM and it's a slower song.

0

@shayner32 Yes it does. That is how most BPM meters find the BPM today. You look for the rythmic patterns in the song which relates to the song intensity (or level/amplitude) within a certain time frime (or frequency). I've been an audio producer for 5 years and what you have told me in your second sentence is nothing new. Your first sentence is very incorrect however.

0

But I would have to be searching for the low kicks, and that's not possible on Roblox. For example a 4x4 house beat.

0

That's not entirely true. You would be searching for the loudest part in the song which so happens to occur when the low kicks hit. Think of it as layers of a track. The more layers, the louder it will be.

This discussion is preserved as it was. New answers, comments, and votes are closed.