Synchronised map and battle BGM?

I write my own music and would love for my game to have map and battle BGM that fade between one another as though two parts of one whole. (For example, a melody is playing on the map, a battle starts and the melody continues seamlessly, but now we have battle drums on top and some electric guitar.)

Presuming I have written two interchangeable pieces of music in OGG format, is it possible to use script calls to get the position of the field BGM just before a battle and another to set the battle BGM to start from that position? If so, what would they be?

Cherry on top would be them fading smoothly into one another 😉 .

Many thanks!
While I don't know anything about script calls or any of that stuff, I think it would be possible to make a script that plays the main theme you're using (The map theme) and the Battle Theme simultaneously (Said battle theme being muted) so that when battles start, it transitions directly into the other theme. (The reasoning for this is that when you have the battle theme the same as the currently playing theme, the theme doesn't restart. By being able to have both play, but the second muted, it would transition seamlessly.) In any case, it would be possible, but you'd either need someone with scripting experience or be able to script yourself, assuming that you cannot transition seamlessly with the vanilla program.
Has anyone found a clear solution for this? I'm also looking for something similar.
Use the BGM for the map BGM and don't specify a battle BGM at all - hopefully the BGM will then continue to play through battles.


Set up your additional track (for battles only) as a BGS instead.


I don't think you can specify a BGS for battles, so in that case you'd be looking at a script mod to start and end BGS during battle. That would then mean your map BGS, if any, would stop during battles and resume when you return to the map.
From the looks of things you can fadeout the BGS, which is pretty close so I can try and test that out. Thanks for the info, this helped a lot!
I also happen to run into a cross fade script that seems to do what both me and the OP were looking for, though it looks like its works for field and event battles so far, I haven't tried it out with a regular battle yet.

http://forums.rpgmakerweb.com/index.php?/topic/2472-cross-fade-audio-script/
J.M. Henry, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you need to add something, edit your last post instead.


Having said that, the OP posted 4 months ago, and this thread is old and you're necroposting. If you're looking at fading BGM or a cross-fading script, then your issue is not the same as the OP's either, so you're somewhat off topic. Next time, can you please just start a new thread in the support forums instead of bringing back an old topic that's only slightly related to what you want to do? You can find more details on this in the forum rules, linked at the bottom right of every page.

Original thread: https://forums.rpgmakerweb.com/threads/synchronised-map-and-battle-bgm.22612/