Okay, I'm not sure if this is exactly what you are looking for, but...
#==========================================================================
# ** SG Optional Battle Music
#==========================================================================
# sandgolem
# Version 1
# 24.06.06
#==========================================================================
Scene_Map::SG_Disable_BattleMusic = 2
#==========================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
#
# To use this script, copy it and insert it in a new section above "Main",
# under the default scripts, and the SDK if you're using it.
#
# Have problems? Official topic:
# http://forums.gamebaker.com/showthread.php?t=13
#
#==========================================================================
begin
SDK.log('SG Optional Battle Music', 'sandgolem', 1, '24.06.06')
if SDK.state('SG Optional Battle Music') != true
@sg_nobattlebgm_disabled = true
end
rescue
end
if !@sg_nobattlebgm_disabled
#--------------------------------------------------------------------------
class Game_System
alias sandgolem_nobattlebgm_system_bgm bgm_play
def bgm_play(bgm)
if !$sg_keep_music
sandgolem_nobattlebgm_system_bgm(bgm)
end
end
alias sandgolem_nobattlebgm_system_bgmstop bgm_stop
def bgm_stop
if !$sg_keep_music
sandgolem_nobattlebgm_system_bgmstop
end
end
end
class Scene_Map
alias sandgolem_nobattlebgm_map_callbattle call_battle
def call_battle
if $game_switches[SG_Disable_BattleMusic]
$sg_keep_music = true
end
sandgolem_nobattlebgm_map_callbattle
$sg_keep_music = nil
end
end
#--------------------------------------------------------------------------
end
This script will keep whatever music that's currently playing as the battle music too. So if you play boss music on the field, you'd get boss music that keeps playing before, during, and after the battle, at least until you manually stop it with an event. All you have to do to turn it on and off is to use switch 2.