<< Chapter < Page | Chapter >> Page > |
We performed an analysis on the volume of the song to determine how quickly the pieces in tetris should fall. The thinking behind this is that songs generally grow louder when they are growing more intense. Therefore, the game should become more intense when the song does.
We compute a constant based on the relative volume of the song such that the current drop speed can be determined as a fraction of the maximum fall speed. We determine the relative volume from the songs envelope. The envelope is computed by first taking the normalized magnitude of the signal and then setting each second of the song to the max value in that segment of the song.
Because the signal is normalized, the value of the envelope at time t is equivalent to the fractional value of the maximum speed that the current speed is to be set at.
Notification Switch
Would you like to follow the 'Audio analysis' conversation and receive update notifications?