This is a small example of how to blend different variants (phases) of music together for a game. Press the spacebar to transition to a new phase. The variables on the left represent the volume of each phase.
I tried my best to optimize / spam-proof it, but it is hard since sprites can only have 1 volume each. (Also you cannot change internal variables from a different sprite.) The music is from the original Splatoon game, from Octo Valley. You can view that here: https://splatoonwiki.org/wiki/Music#Octo_Valley I originally employed this technique for an unreleased dungeon crawler game called Dungeon Keeper. Feel free to remix, reuse, or be inspired by the project. Credit isn't necessary. :) Ok, I'm going back to programming in Rust now. ?