Fading out MEs just like how you fade BGM and BGS

Good Morning / Day / Afternoon / Evening everyone.

This request is a bit different...!

I was wonderfing if it's techically possible to allow the slow fading of music effects on rpg maker vx ace, just like how you can fade BGM or BGS, can this be done with scripting?

I hope this is the right place for this.
Since music effects are not repeated, is there a reason why you cannot edit the file itself and add a fade to the last few seconds of the said file?
I have an opening sequence which you can skip with a key press in my game which I only want it to play ONCE. So using an ME is a good way. but I am kind of put of by how it fades so quickly and I was wondering if I could do a smoother fade. it's not a deal breaker, but it would be a nice touch.
You could use Audacity (free), select 'Effect', select 'Fadeout' which will change the rate of fade out for you.
@Kes unfortunately, if the sequence can be skipped at any time, that should be enough of a reason not to edit the file itself, as it is impossible to know when it should fade.

@Panda_Artist that said, unfortunately the audio module is not exactly something that we are allowed to know, as it is part of one of those hidden modules in the DLL. A workaround would be using a BGM instead of a ME, but with a bit of empty space at the beginning so that you can check the audio player position when it restarts and end it. This would solve both the fact that you only want it to play once, and the fade effect.
🤔 Really guys? It's in the Help File...
RPG::ME.fade(time)
Starts ME fadeout. time is the length of the fadeout in milliseconds.

# which calls...

Audio.me_fade(time)
Starts ME fadeout. time is the length of the fadeout in milliseconds.
Tried it out and the game still thinks the ME is playing. The BGM won't kick back in until the full ME length has played even if it has already faded out entirely. You'd have to make a call to RPG::ME.stop at some point.

What I did was turn on a switch after calling RPG::ME.fade(1000). A parallel process event will then use a Wait command equal to the fade-out time (in this case 60 frames), then call RPG::ME.stop, and lastly turn the switch back off. Granted, if the player deactivates the window, i.e. changes focus to another window, the parallel process won't run and you may get an undesired effect.
@KK20 you are completely right. I have to admit that I did not remember that part at all, but it looks that the engine already has a built-in method for that, this makes things much easier. Thank you for pointing it out.

Original thread: https://forums.rpgmakerweb.com/threads/fading-out-mes-just-like-how-you-fade-bgm-and-bgs.112443/