Well, not exactly. I made music play. In floob. Because no one else would do it.
Well that’s why I’m writing this.
To begin I needed to decide what music tracks I wanted to include and what tracks didn’t make the cut.
So to begin, here is all the tracks we were given. There’s a mix of good and bad and just down right odd. After speaking with the audio guys they seem to be aware that not all the tracks are good, but since they were pressed for time they just gave us everything they had, warts and all.
So when we got all these tracks, I took it upon myself to listen to all of them, give feedback to the audio guys and then decide which ones were for the chop.
Some tracks like this one:
Just did not work at all. There was repeated sounds that happened out of time and the volume was much too confusing. Listening to it makes the listener feel as though there are two songs playing at once and that is not what we want. The second bad thing about this track is that it’s just another song with an increased time scale. The original track:
Is better, but still does not feel entirely comfortable. I ended up choosing to use the second slower track but it is one of the worse tracks in the game.
Many of the tracks were excluded for reasons like this, and other reasons. Here is a list of the tracks we removed in the end:
So with the tracks decided, I needed to figure out how to implement them. To do this, 4 of the 5 tracks chosen needed to be set for certain sections of the level. To get a smooth transition between the tracks I needed to have the tracks fade between each other. It took me some time to decide how to do this, eventually deciding that I would have all the tracks playing and looping at once and then increasing and dropping the volume of the necessary tracks when the player entered different sections. I decided the section by using an enum state switch, which would be set to the current section the player is in. I then added triggers to the level that set the enum to play the correct track
Here is what my code looked like:
I’m pretty sure that there is a much more efficient way to do this, as there normally is when I program something. But I was forced to do it this way as I was pressed for time and the programmers for the project had left me high and dry when it came to background music.
One thing I would have liked to do is to make the menu music not immediately cut off when the player starts the game, since it is very jarring and takes away from the smooth transition we were hoping for. But due to the way the game is taken to a loading scene, I could not have the menu music audio source be persistent between scenes and so could not have the track drop smoothly in volume. But in it’s current state, it works and it is not dropping the performance in any way. So it’s good enough to move on from.