This guide is mostly intended for more advanced code music mods, although the first section covers a basic example of randomizing a song.
global_bgm["Period"]:
music = random_song(1, 10)
end
Should be easy to understand by this point:
That's it for the basic use. Not too useful outside of randomizing songs.
But when you combine it with a code mod that takes advantage of BGME Framework's live updating...
While largely untested, in theory it's fairly simple. Hook a game function then update your mod's music script depending on the incoming data. Combine with global_bgm to replace the game's music based on whatever you want.
General Ideas