Is there a way to make BGM not automatically loop?

Hello. Let me describe what I'm trying to do. You're on Map 1 and a song (BGM) starts. You transfer to Map 2 and the song continues uninterrupted. So far, no problem. Then that song ends, and a parallel process is checking every 60 frames to see if a BGM is playing. If not, then it starts a new (randomly chosen) BGM.

The problem is that BGM instantly loops, so that same song will just play over and over. I know how to check if a BGM is playing, and it works fine if a BGM hasn't already started, but once one starts, it just continually loops with no pause between the end and beginning.

Now, MEs (Music Effects) don't automatically loop, they actually stop when they are done, so theoretically I could just put my BGM files in the ME folder and play those as full songs, but I can't figure out how to check to see if an ME is currently playing.

By the way, the way I'm checking to see if a BGM is playing is like this:

(parallel process)
wait : 60 frames
set variable : variable 20 = AudioManager._currentBgm.name
if : variable 20 = 0
play random song
end

This works fine (if a BGM isn't already playing), but there doesn't seem to be a corresponding script call for MEs. For example, this does NOT work:

set variable : variable 20 = AudioManager._currentMe.name

Therefor I'm wondering if there's a way to make BGMs not auto-loop, as that seems like a solution, but of course any other solution is also more than welcome.

Thanks!
_currentBGM.name is simply the name of the BGM that was last asked to play. It doesn't change to nothing when the BGM stops playing. It changes to nothing when there's a command to stop playing BGM (which includes going to a map with no BGM where the previous map's BGM is not meant to continue).

There is no command to see "have I reached the end of the track", even if it didn't loop by default.
Right there is no command to end loop.

It would be a hard thing to do but...

if you really wanted to, I would make a parallel processing event add each second of time to a variable.

then once that variable is high enough, you can just stop the song.
@Shaz Thanks, Shaz. I understand what you're saying. So I guess the question then is: how in the world does one create a playlist that isn't just the same song looping over and over again?

I mean, I know a way to do it if you stay on the same map the whole time, but what if you are traveling from map to map? I would like the songs to not abruptly change to a new song every time the player goes through a door.

@BrentBAM I'm sorry, but I just don't know what you're talking about. What variable? You mean based on the length of the song? I don't get it.
You could have an event on each map that's set to parallel process with the following commands: Fadeout BGM in 10 seconds, Wait 10 seconds, Play new BGM, Erase Event.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-make-bgm-not-automatically-loop.127225/