Page 1 of 4
MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 3:50 am
by wizzo
This is a script to play background music while you're in the main menu core. I consider it more of a proof of concept, because I don't think people spend that much time in the menu, but it could be useful in the future if/when mgl files become more common.
Download & installation:
https://github.com/wizzomafizzo/MiSTer_BGM
Follow the instructions there. Once installed, your MiSTer will automatically play random music whenever you're in the main menu. It will switch itself off when you start up core, and come back on when you've exited.
Screenshot:
*imagine the Earthbound Onett theme is playing*
- menu.jpeg (302 KiB) Viewed 21868 times
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 1:27 pm
by callanabrown
Great idea! We need a little BIOS music collection, from Sega CD to PS2.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 2:58 pm
by wizzo
A music collection would be cool!
Just a note for people, I can't promise this will work perfectly, so if something goes wrong and you can't turn the annoying music off: either delete all the music you put in the music folder, or go into the /media/fat/linux/user-startup.sh file and comment the bgm.sh line, or just straight up delete the script and reboot
This all runs off that bgm.sh file it doesn't install anything permanently on your system except the line in the user-startup.sh file
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 2:59 pm
by Sigismond0
Works great! I loaded up the menu music from the various mini consoles, and it feels pretty much right. Love that it also works while scripts are running, makes waiting on Update_All or running through the new favorites script a little more fun.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 3:09 pm
by wizzo
Awesome. Thanks for trying it out! I never thought about that but you're right those scripts can take a while
It looks like music will also play during games without any impact if you make it. Maybe controversial but I can think of a few games that would benefit from a new soundtrack to get through the grinding
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 4:30 pm
by hitm4n
I like this idea. I did a very quick rough search, found this to get some people going. When i get my MiSTer project finished (putting it in a case), i'll be trying this out.
https://archive.org/details/Boot_Sounds ... -+Boot.wav
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 5:39 pm
by lamarax
Thanks for that, it's brilliant!
Is there any way to make files loop?
Here's a contribution; some hours worth of 8-bit chiptunes (envelopes) taken from the BBC micro, courtesy of stairwaytohell
...the motherlode of vidya OSTs and BGM, can of course be found here!
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 9:23 pm
by Wave
Great feature, thank you Wizzo.
I wonder if anyone has collected all the recent mini-console bgms anywhere?
lamarax wrote: βTue Apr 12, 2022 5:39 pm
Is there any way to make files loop?
Looping would indeed be a great feature (if it's not in there already, I haven't tested yet).
It would be nice to have looping off for things like MiSTer startup sound, but able to be enabled for general menu bgm.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Tue Apr 12, 2022 11:57 pm
by leonquest
wizzo. you are a genius thank you!! you have no idea how much my experience with the mister has improved now that U can hear the nes mini music in the background while I browse the menu. amazing idea, amazing work. Thanks a million.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 12:01 am
by wizzo
Thank you for the kind words!
lamarax wrote: βTue Apr 12, 2022 5:39 pm
Is there any way to make files loop?
There could be! Just to be clear, we're talking about a feature that picks a random file but then plays just that one file on loop until reboot/core change?
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 7:19 am
by wizzo
Alright small update. I've made some changes to how the boot files work and I've added the new playlist type requested (at least I think I got it right, but we can change it if that's not what everyone wanted). Details are in the readme on github. If you don't care about the playlists, everything should continue working as is
Next time you start the script, a new "bgm.ini" file will get created in your music folder. You can edit the playlist field in that to be "loop", reboot, and it will start playing the way you've described. Change it back to "random" if you don't like it
For people who were using boot sounds, I've made it so that the files only need an "_" at the start to be picked up for this. You can rename your "_boot.mp3" to be something more descriptive again. This also means you can put a _ in front of multiple files and the script will pick one at random each time to play
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 2:34 pm
by Krakout
Tried it today, works great and indeed behind other scripts which is great! Gonna try it with the boot sounds
Thanks!!
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 5:53 pm
by 314ter
Great idea, music in the menu!
Did you consider also using vgmplay for use in your script? It is already available on MiSTer, and would greatly expand the possible types of (videogame)music that could be played.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 7:02 pm
by Sigismond0
Working great after the update! Have a load of BIOS/boot sounds previxed with _ and a handful of menu themes without, and everything works as I would expect!
I did get it to bug out once and play music during a core--I think it happened because the boot sound was ending right as I clicked on the core, and the script maybe didn't see the core change as it was shuffling to the next track. But after soft resetting back to the menu and selecting the core again, it was all good.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 8:37 pm
by lamarax
Wave wrote: βTue Apr 12, 2022 9:23 pm
I wonder if anyone has collected all the recent mini-console bgms anywhere?
Someone
on twitter I think*, particularly suggested the NES classic mini theme and I agree:
leonquest wrote: βTue Apr 12, 2022 11:57 pm
U can hear the nes mini music in the background while I browse the menu.
*oh, it was
leonquest above!
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 9:00 pm
by Sigismond0
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 10:51 pm
by gargos
Sigismond0 wrote: βTue Apr 12, 2022 2:59 pm
Works great! I loaded up the menu music from the various mini consoles, and it feels pretty much right. Love that it also works while scripts are running, makes waiting on Update_All or running through the new favorites script a little more fun.
Can I ask, where can you get those songs? I was able to find the NES and SNES mini ones, but haven't been able to find the Genesis mini or 2 Turbografx/PCE mini songs anywhere.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 11:27 pm
by Wave
gargos wrote: βWed Apr 13, 2022 10:51 pm
Can I ask, where can you get those songs? I was able to find the NES and SNES mini ones, but haven't been able to find the Genesis mini or 2 Turbografx/PCE mini songs anywhere.
Follow the YouTube link in Sigismond0's post right before yours, hehe. It's a nice long playlist.
(I will share here if I find more HQ copies.)
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Wed Apr 13, 2022 11:48 pm
by barfood
Nice! I can't wait to try this out. I've spent a great deal of time collecting songs to play on my RetroPie menu. For anyone interested, here's a dump of the songs I accumulated (600+), there's a lot of VGM but also random songs that I thought would fit for an engaging video gaming menu screen (apologies in advance for the messy filenames, though):
https://drive.google.com/drive/folders/ ... sp=sharing
An idea I haven't tried yet, but I wonder if it's possible : using MiSTer BGM along with
MiSTer SAM to have screen savers where game audio is replaced by custom BGM. Just an idea for a new feature, if you're interested in implementing that
Thanks for your work wizzo!
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Thu Apr 14, 2022 1:24 am
by gargos
This is pretty awesome, great work. After you install this, should songs begin playing every time you power on your mister, or do you have to start it by running the bgm script every time? I have it installed and it's not playing music at power up, I have to go into script and run the bgm script everything. I assumed it would automatically run music at bootup and doesnt seem like it does, but maybe this was intended?
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Thu Apr 14, 2022 5:25 am
by wizzo
barfood wrote: βWed Apr 13, 2022 11:48 pm
An idea I haven't tried yet, but I wonder if it's possible : using MiSTer BGM along with
MiSTer SAM to have screen savers where game audio is replaced by custom BGM. Just an idea for a new feature, if you're interested in implementing that
You're welcome! If it's possible to mute cores from linux, I don't see why not, but it may take some cooperation from SAM to tell the difference between it running a game and you actually intending to launch and run a core. I suspect they will look identical to the script right now.
Sigismond0 wrote: βWed Apr 13, 2022 7:02 pm
I did get it to bug out once and play music during a core--I think it happened because the boot sound was ending right as I clicked on the core, and the script maybe didn't see the core change as it was shuffling to the next track. But after soft resetting back to the menu and selecting the core again, it was all good.
Sweet. Thanks for troubleshooting! I can see exactly why this would happen now. The boot noise in particular actually runs in the main thread and blocks it, before the thing kicks in that monitors for cores being launched, so by the time it does check nothing has changed. Anyway, I've made an issue on github and will get round to it soon
314ter wrote: βWed Apr 13, 2022 5:53 pm
Did you consider also using vgmplay for use in your script? It is already available on MiSTer, and would greatly expand the possible types of (videogame)music that could be played.
I'll take a look at it. I didn't know this existed. The script doesn't really care about what it plays, it just needs a program to point a file to. I'd be happy to add support for anything the mister OS already ships a program to play it
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Thu Apr 14, 2022 7:00 am
by pepito
That's a great script!
boot'up musics are played in loop and continuity.
Is there a way to ONLY play once one boot up music?
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Thu Apr 14, 2022 7:21 am
by wizzo
pepito wrote: βThu Apr 14, 2022 7:00 am
Is there a way to ONLY play once one boot up music?
There is not but thatβs a really obvious and straightforward feature in hindsight. Iβll put it on the list. Thanks!
(It would also be easy to do yourself without my script if you like. Just add something like βmpg123 /my/sound/file.mp3β to your user-startup.sh script)
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Thu Apr 14, 2022 10:15 pm
by Wave
I've been thinking about the script's features and it seems like it currently covers or will soon cover many of the use cases that occur to me. In addition to creating it, I appreciate how quickly you're improving it!
One perhaps subtle feature that could be nice is letting the user control how many times a given file will loop. Seems this could be done via the playlist files or by adding an optional loop count in music track filenames. (Like "X05_Mario 64 - Level Select.mp3" or "LOOPX05_Mario 64 - Level Select.mp3" for a track the user wants to stop looping after five cycles, for example.)
Two examples of why this could be nice:
- A track is very short and would be more enjoyable if it played for a longer time; random example, the
Excitebike title screen
- The existing "loop" playlist functionality seems to just loop a single track forever; by letting user specify per-track/finite loop settings, the looping feature can be used while also progressing through a greater variety of tracks each session
(Implementing this loop-control functionality for boot sound playback would also cover the feature request just made by pepito.)
Finally, speaking generally, since the MiSTer doesn't afford the user very convenient control over the active playback (gotta go to menu and run a script) it'd be nice to be able to have some settings, such as per-track looping vs. single-play, and loop count, able to be squared away ahead of time via playlists or filenames.
One possible argument against implementation at the filename level: That file will only ever loop (or not loop) a single way, whereas multiple playlists could theoretically exist which each specify different loop rules for the same set of generically named audio files.
Anyway, just my braindump thinking about how it might be nice to customize things. Thanks again for this great new menu music.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Fri Apr 15, 2022 2:20 am
by wizzo
Wave wrote: βThu Apr 14, 2022 10:15 pm
I've been thinking about the script's features
I like it! I'm trying not to over complicate things so for now I do want to avoid traditional playlist files with a set list, and go with these virtual style
file name/location based ones (if you can call that less complicated anyway, at least I don't want to pollute the file system with too many bgm-only files)
I did have some other ideas kicking around. The main one was was to allow subfolders to act as separate playlists. I'm not sure how useful it would be because there's really only one context in which stuff will play, but it seems like a simple addition. It also depends on what people want more: folder based playlists or just the ability to organise music into folders and have them be included in the normal playing?
I also had an idea about running a web based controller so you can control what's playing on your phone. I wouldn't want to bloat the main script, so the idea would be to have it as a separate optional module file. For me personally, there are a lot of games (especially grindy ones) that I don't like the original music and would be happy to chuck on something else while I'm playing
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Fri Apr 15, 2022 2:41 am
by flynnsbit
All the internet radio stations work out of the box on mister as well. Thats how we were controlling them from AO486 through MidiLink. Just in the event people wanted that too...
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Fri Apr 15, 2022 4:47 am
by Wave
Thanks for the response!
I agree certain games can benefit from outside music. Actually, that could be a key scenario where the proposed ability to have subfolders acting as separate playlists would be useful, as it'd make it easy for the user to set apart specific tracks that suit a given game they want to spruce up. (Advanced feature tangent: Perhaps the script could be set to automatically load a certain playlist/folder when certain cores/games are launched. Tho I kinda think MiSTer doesn't make the actual ROM being loaded known to scripts unless the game is launched from a custom... what is it, MRA file?)
Cool idea about playback control via phone / web!
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Fri Apr 15, 2022 7:20 pm
by Reg
Well now I am stuck at the main mister menu with this and it's stopped gameplay...
...stupidly, I choose to rip this audio for the background track and now just transfixed...
...thanks for a great add on.
https://www.youtube.com/watch?v=a8pGS4cWbHo
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Sat Apr 16, 2022 12:05 am
by AntialiasedPixel
Is anyone else getting music still when they launch a core? Seems like it just starts a different song once the core launches, and then it's playing over the top of the game sound with no way to stop it.
I totally understand it's a new script and still being worked on though, just thought I would chime in with my experience.
Re: MiSTer BGM - Background Music for the MiSTer Menu
Posted: Sat Apr 16, 2022 4:50 pm
by AntialiasedPixel
AntialiasedPixel wrote: βSat Apr 16, 2022 12:05 am
Is anyone else getting music still when they launch a core? Seems like it just starts a different song once the core launches, and then it's playing over the top of the game sound with no way to stop it.
After another run of update all/reboot, seems to be behaving better. I can launch into the nes/snes cores and it's not starting up a new song. One thing I notice is when launching a core, the volume seems to jump up a bit before it stops playing. I assume because of per-core volume settings, but overall a great new addition to the Mister toolbelt!