Change Encounter Sound for Boss Battle

I have a situation where I have a encounter sound for random encounters, but I would also like to change the encounter sound before a boss fight (like the MOTHER trilogy), then back to the original encounter sound for further random encounters. How would I do this? Someone else asked this same question before, but for some reason, the solution they got doesn't work for me. 


Before the battle, I use the script call

$data_system.sounds[7] = RPG::SE.new("Big Enemy Encounter")

but all this does is either remove the encounter sound, or cause a crash with the message

Unable to find file:


Audio/SE/Big Enemy Encounter

I've tried everything I can think of, but nothing fixes this. I've even tried using other sound effects, but nothing works. I've run out of ideas to fix this. On top of that, I've noticed that the encounter sound effect gets drowned out by the battle BGM if it's too long. Is there any way to delay the battle BGM until the encounter sound is done playing? 
Is your boss fight a random encounter?
No, it's scripted.
Sorry, scripted? As in it is a visible event you walk up to and interact with?
It's a person you walk up to and interact with. It's not a random encounter, the battle is part of an event.
Okay, if it's an event, you can make it something like this:


Play SE: "Machine" (You obviously change this, I was just using a long SE for testing)


Wait: 60 frames (Again, just change the length to fit your needs)


Battle Processing: Slime*2 (Place whatever enemy you need here)


This will play the sound effect, cause a wait before the battle starts while still playing the sounds effect. After the wait, the battle starts, so you will want the Wait to be enough to finish playing the sound before starting the battle.


I created an evented battle with just this in it and it works. I'm sure if you have dialogue and whatnot first, this will still work as long as you set it up right before the battle processing. Let me know if I did not understand you and this is wrong.
It sort of works, but I've found a decent enough work around. I have to turn off the battle BGM, and then in the troop page, wait 60 frames, then play the BGM.
OR, you could just make an event, play the SE before the encounter, and then use wait. Normally I don't do troop page events unless it's absolutely required because It's really much more efficient doing it on an actual event.

Original thread: https://forums.rpgmakerweb.com/threads/change-encounter-sound-for-boss-battle.62671/