The game
The game was successfully built, and a copy of it can be downloaded here: Sound Tetris (All OS's)
In addition, all of the source code is available [link] here .
Conclusions
The analyzer works, louder portions of the song do make pieces fall faster, the visualizer does beat with the music, and the next piece will consistently change with differing frequency.
Bugs
There are some bugs with each of the features, notably- The beat detection does not work properly on songs without a clear beat
- The amplitude analysis has trouble finding differences, likely because most modern songs are “mastered” to be at a constant volume
- The frequency analysis does not make it clear which frequencies map to which pieces
Using audio to affect gameplay is a valid, and often entertaining, way of adding randomness to a game. It can increase the diversity of the game, and thereby make it more likely that the user will continue to enjoy the game. In addition, the framework created is generic enough that it could be applied to many games without requiring large code rewrites, meaning that it could potentially be applied to other games.