Fade out BGM, fade in ME/SE in battle when victory/defeat/escape...

Good day everyone,

I want to fade out the battle music when, the team wins/loses the battle or escapes to the current map. Afterward the victory/game over music fades in, when the team wins/loses or the overworld music fades in, when the transition to the map starts so i have a smoother battle music transition.
Right now the music abruptly stops whenever the appropiate action; i guess you could say it's all about timing.

Thanks for the help in advance.
Bump.
Bump, i guess.
Bump.

Original thread: https://forums.rpgmakerweb.com/threads/fade-out-bgm-fade-in-me-se-in-battle-when-victory-defeat-escape.92627/