Fading in BGM

Hello everyone!


I'd like to know if there's a way to fade in BGM.


Sadly there's only a fade out function implemented into RMMV.


But I'd love to let the music slowly fade in after entering a new map~


Did a quick google search without a result.


Does anyone know of a solution or plugin?


Huge thanks! 🙂  
I don't know about a solution with the engine, but you could use a music editing program to make your BGM file fade in and then use that file for the game. Best of luck finding an actual answer (mine sucks XD). 🙂  
Yeah but the loop wouldn't loop anymore D:
Use AudioManager.fadeInBgm(n) in a Script call where n is the duration. 
Thank you so much 🙂  


Works great!
🙂 No problem. 
Yeah but the loop wouldn't loop anymore D:



That would depend where the loop points were set. There's no major problem fading in, but it's most effective if the music has a non-looping 'intro' part.
That would depend where the loop points were set. There's no major problem fading in, but it's most effective if the music has a non-looping 'intro' part.



Well, that's true, but wouldn't that be most effective if you'd set up a fading in intro version of the song and a looping one played one after another?


That's what I thought about but the script input is more effective (for my needs) since I don't need to edit the music itself 🙂  
The script call in the reply above works; thanks for that. One may fade from one BGM to another using it...


◆Fadeout BGM:5 seconds
◆Wait:300 frames // Wait 5 seconds, otherwise the next BGM cuts short the fade-out...
◆Play BGM:Field1 (20, 100, 0)
◆Script:AudioManager.fadeInBgm(5)

Original thread: https://forums.rpgmakerweb.com/threads/fading-in-bgm.70330/