THE TYPES:
1) Powerup song - Cut level BGM, play a specific speed shoes BGM, then cut back to the level BGM at the end of the powerup. It's optional if you play the BGM from the start again (stop, play), or resume where it left off (mute, unmute)
Sonic Adventure does this.
Very easy to implement
2) Level-specific Powerup song - Cut level BGM, play a specific speedshoes version of the level's BGM that has been rendered at a higher tempo (typically 1.25x) that starts from the beginning and lasts 20 secs or however long the powerup is. At the 20 second mark, just as the powerup fades, you start the level BGM from the 25s mark (or in other words, 20 x 1.25, which due to the maths will 'segue' at the exact spot)
Sonic Generations does this.
Also very easy to implement, a little more responsibility on the people who is procuring your music for you.
3) Speed up the music, easy version - Your music engine just plays the music at a 1.25 rate for however long the powerup lasts. Very easy to do, results are often 'musical' enough as it feels like a major 3rd up modulation for the duration of the powerup.
Easy to implement, doesn't require anything extra from music guys
4) Speed up the music, hard version - You procure two versions of each level track - normal and sped-up (1.25x), both with the audio clip starting directly on bar:beat:division 1:1:00. Upon grabbing a speedshoes powerup, the default BGM plays to the next beat in the music, and then transitions to the exact same relative grid in the speedshoes version. The reverse happens as the powerup wears off.
In terms of mathematics, the easiest way to accomplish this would be to supply your music engine with the BPM of each level track. Upon grabbing a powerup, you want the music to stop at the next beat, meaning first you need to identify that beat: <current time in music, in seconds>*bpm/60 will tell you this. You then round up the number to get the next beat, and do <current beat in music>*60/bpm to get the exact time you want the music to stop.
Next, you want the speedshoes version of the music to start on that same beat. Essentially again you first get the absolute time value via <current beat in music>*60/bpm, then start the new track from there. Since BPM in this case is higher (typically 1.25) the math works out and you get a seamless transition.
The opposite takes place when the powerup runs out - calculate absolute time of next beat, stop speedshoes version at that absolute time, calculate corresponding absolute time of the normal version at that beat, start playback from there.
For music that has a changing tempo for whatever reason, if you're really OCD you could supply the music engine with two arrays that provide a complete list of absolute times that correspond to beats for both versions, or simply say screw changing on the beat, and simply note absolute time of current normal track, stop current normal track and start speedshoes version at <absolute time * 0.8>
I'll try to procure both example audio clips and for 4) example code that does what I'm talking about. Hilariously enough, this is the one thing that Wwise cannot do as it can't segue based on beats (the most you can do is transition from one clip to another maintaining the same absolute time which does not help in this case)


00