Play BGM is its own event command. It doesn't require a script and Conditional Branches also are not required (though they are useful since it will be easier to copy, so I will use them - however, you could just as easily only use Wait commands
It would be like this:
@>Loop
@>Play BGM: BGM1, 100, 100
@>Control Variable: [XXXX: Song Length] = song length in seconds (so 180 if the song is 3 minutes long)
@>Loop
@>Conditional Branch: Variable [XXXX: Song Length] > 0
@> Wait: 60 frames
@>Control Variables: [XXXX: Song Length] -= 1
: Else
Break Loop
: Branch END
: Repeat
# Do the same for the next song, etc...
: Repeat
You could make it even cleaner if you put the counting loop in a common event and just called it after each time you set a song.
I attached a demo, and I even made it a little snazzier to fade it out.
There is, however, a problem - it won't keep counting down if you, for instance, click outside of the window to do something else on your computer or if you call a new scene and expect to have the map music play in it. The Audio module is, sadly, pretty restrictive in general, so a scripted solution could probably solve the second issue but not the first (or rather, the amount of work involved in solving the first would give you much more sophisticated way to track the time a song has been playing and the like, so it would make this method obsolete).
Also, changing maps would naturally interfere with that method since it uses a local parallel process event, but you could fix that by putting it in a common event.