MiSTer BGM - Background Music for the MiSTer Menu

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
menu.jpeg (302 KiB) Viewed 21759 times
callanabrown
Posts: 89
Joined: Thu Jul 30, 2020 1:05 pm
Has thanked: 14 times
Been thanked: 27 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post by callanabrown »

Great idea! We need a little BIOS music collection, from Sega CD to PS2.
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
hitm4n
Posts: 116
Joined: Sat Jan 30, 2021 9:20 am
Has thanked: 3 times
Been thanked: 25 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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 :mrgreen:

...the motherlode of vidya OSTs and BGM, can of course be found here!

Attachments
BBC micro music.7z
(73.17 MiB) Downloaded 369 times
User avatar
Wave
Posts: 132
Joined: Tue Jan 04, 2022 6:57 pm
Has thanked: 93 times
Been thanked: 42 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
she/her
leonquest
Posts: 5
Joined: Mon May 25, 2020 12:08 am
Been thanked: 1 time

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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?
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
Krakout
Posts: 41
Joined: Wed Aug 25, 2021 8:48 am
Has thanked: 6 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post by Krakout »

Tried it today, works great and indeed behind other scripts which is great! Gonna try it with the boot sounds🙂
Thanks!!
314ter
Posts: 5
Joined: Mon May 25, 2020 10:28 am
Has thanked: 3 times
Been thanked: 1 time

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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:
NES Classic Mini Theme.mp3
(1.01 MiB) Downloaded 644 times
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! :mrgreen:
User avatar
Sigismond0
Posts: 339
Joined: Mon May 25, 2020 2:21 am
Has thanked: 1 time
Been thanked: 66 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post by Sigismond0 »

I just downloaded MP3s from this playlist: https://www.youtube.com/playlist?list=P ... tDYx75IC6c
gargos
Posts: 2
Joined: Wed Apr 13, 2022 10:47 pm

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
User avatar
Wave
Posts: 132
Joined: Tue Jan 04, 2022 6:57 pm
Has thanked: 93 times
Been thanked: 42 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.)
she/her
User avatar
barfood
Posts: 96
Joined: Thu Jun 18, 2020 6:55 pm
Location: new user: felleg
Has thanked: 87 times
Been thanked: 20 times
Contact:

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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!
gargos
Posts: 2
Joined: Wed Apr 13, 2022 10:47 pm

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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?
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
User avatar
pepito
Posts: 68
Joined: Tue Jul 20, 2021 10:07 am
Has thanked: 5 times
Been thanked: 8 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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?
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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)
User avatar
Wave
Posts: 132
Joined: Tue Jan 04, 2022 6:57 pm
Has thanked: 93 times
Been thanked: 42 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
she/her
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 243 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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...
User avatar
Wave
Posts: 132
Joined: Tue Jan 04, 2022 6:57 pm
Has thanked: 93 times
Been thanked: 42 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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!
she/her
Reg
Posts: 126
Joined: Mon Mar 22, 2021 11:38 am
Has thanked: 63 times
Been thanked: 34 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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
AntialiasedPixel
Posts: 44
Joined: Mon May 25, 2020 2:17 am
Been thanked: 2 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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.
AntialiasedPixel
Posts: 44
Joined: Mon May 25, 2020 2:17 am
Been thanked: 2 times

Re: MiSTer BGM - Background Music for the MiSTer Menu

Unread post 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!
Post Reply