0
0

The question:

Is there a way to detect either time signatures or to find the time until the next beat of a currently playing sound?

The goal:

I am currently working on a Pong project and want to make the ball move across the screen in time with the music.

Thank you in advance for any help!

  • You must to post comments
0
0

If the problem is prediction, you could always delay the sound by X ms so that you can line up the video with the audio.

  • You must to post comments
0
0

I can always hard code the time signature and force it to work, but generally I find hard coding anything to be in bad practice. The idea is that the user can put any mp3 or wav file into the Music folder, the program does a quick batch search of the folder, populates a music list, and the user selects a song from that list. The song is then either analyzed and varying time signatures at song times loaded OR the time in ms from the current beat to the next beat is recorded.

Based off of either one of these pieces of data, it’s trivial to set the ball to follow the beats.

Maybe that’s a little more clear as to what I’m trying to accomplish.

:)

  • You must to post comments
0
0

Beat detection isn’t really a simple or entirely accurate process if you’re trying to write code to do it from scratch, I know there is software around that does it though. If you can find a way of doing it then I’d store the bpm of a song in a separate file and let the user check whether it is correct and edit if necessary ie. if it detects something as 120 bpm when it’s actually 60. Not going to work with everything though if a song doesn’t start on a beat or has variable tempo.

  • You must to post comments
0
0

Yeah, I was afraid of that.

I might just have to scratch this feature altogether since it seems to be a larger project than the project itself. Maybe someday in the future. Thanks anyway! :)

  • You must to post comments
0
0

If you complete this project and a way to use it with fmod designer, I have part of my left testicle here ready to give you. Or if you prefer, kudos and approbation. :)

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.