2
\$\begingroup\$

I'm curious as to how video games like Audiosurf, Beat Hazard and Symphony procedurally generate content using music. What are the common concepts used to accomplish this? And in what way is the music read and interpreted into data that can be used in the game?

Also, I plan on using Java, so if there are any Java-specific information anyone can share, that would be greatly appreciated.

\$\endgroup\$
  • \$\begingroup\$ Interesting question, though quite broad. I found this similar XNA-specific question, but its answers are unhelpful. This question is about the inverse situation! :) \$\endgroup\$ – Anko Aug 29 '13 at 8:45
  • \$\begingroup\$ It's not unlikely that these games create much more content from pseudorandom number generators than it seems. \$\endgroup\$ – Philipp Aug 29 '13 at 13:18
  • \$\begingroup\$ They are known, advertised and marketed as games that generate content based on the music that you load, so I'd assume that they're telling the truth unless proven otherwise. Also, it's easily verifiable from observing how the game content changes depending on what music you play. \$\endgroup\$ – heisenbergman Aug 30 '13 at 0:52
1
\$\begingroup\$

The way to go is to transform and use parts of the music that are usable.

You can use the volume (wave height at a given time). Audiosurf use the volume to adjust speed.

You can compute a FFT of the music, then trigger some events when some pre-defined wave lenght are heard. Audiosurf generate lights flashes when drums sounds are heards (this is easy to detect using FFT)

You can use a Pseudo random generator seeded using some value taken from the track to generate the rest of your gameplay.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.