Page 3 of 4

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sun May 01, 2022 3:38 pm
by wizzo
djvj wrote: Sun May 01, 2022 3:57 am They are named like this:
/media/fat/music/_Sega Dreamcast - Boot.mp3
/media/fat/music/_Sony PS1 - Boot.mp3

My playlists are in subfolders with a pls file. Everything else works great. The boot sounds need to be in a playlist as well? I thought they just need to be prefixed with an underscore.
These 2 files in particular look good. So when I say playlist I mean the subfolders. You should only have .pls files for internet radio.

For those 2 boot sounds to play, your playlist in the BGM GUI needs to be set to "none". If you have a different subfolder set as your playlist, you'd need to have the boot sounds in that subfolder for them to run on boot.

Does that make sense? I'm realising it's a bit confusing now so maybe it needs some changes to be more intuitive.

If you've got everything set correctly and they're still not playing, can you add the line "debug = yes" to the bottom of your bgm.ini file. Then reboot. And then upload a copy here of the file "/tmp/bgm.log" and that'll show some more detail. You need to copy it off your mister while it's on. The file gets deleted on shut down

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sun May 01, 2022 8:04 pm
by djvj
That isn't very intuitive to be honest. Way everything is setup now with playlists and folders for diff music is great. I can launch bgm and tell it what playlist to use, whether local files or internet radio. Only thing I wanted to tack on was a boot sound for that one time at boot only. I want a folder with all diff boot sounds and for it to choose a random one. After that, then move onto the playlist I had set last.

Doesn't sound like that's possible w/o duplicating all those boot sounds in each folder, which I have like 30 or so. How about designate a /music/boot/ folder for boot sounds and whatever is in there it will randomly pick one then move onto the normal playlist the user had set?

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sun May 01, 2022 10:43 pm
by Wave
To slightly modify the above suggestion, perhaps the script could look at a specific /bootsounds folder first, but then also look for any additional boot-designated sounds in the current "playlist" folder. Maximum flexibility that way.

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri May 13, 2022 11:24 pm
by blacklistedcard
Using the script. It's working great for Internet Radio

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Wed May 18, 2022 4:04 am
by kirabate
It's me or the script is broken after the least update?

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Wed May 18, 2022 5:09 am
by wizzo
kirabate wrote: Wed May 18, 2022 4:04 am It's me or the script is broken after the least update?
I have another person on github having issues since an update as well but was not sure what's going on with it. What happens when you try to run bgm from the script menu? Does it show any error message?

I can't reproduce the problem. It works fine for me with a fully updated mister and no need to reinstall.

I will try my best to help but I'm super busy with work atm and haven't got much time to work on the scripts for a while.

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Wed May 18, 2022 10:50 pm
by kirabate
The sound is off, and sometimes can't reproduce anything, i Will try to reinstall.

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Jun 17, 2022 12:27 pm
by Juri
Hi i removed the old version and copied the new bgm.sh to scripts folder, but when i run it from script menu i get this:

Code: Select all

Traceback (most recent call last):
 File "/media/fat/Scripts/bgm.sh", line 750, in <module>
   if player.total_tracks(include_boot=True) == 0:
 File "/media/fat/Scripts/bgm.sh", line 257, in total_tracks
   return len(self.get_tracks(playlist, include_boot=include_boot))
 File "/media/fat/Scripts/bgm.sh", line 249, in get_tracks
   for root, dirs, files in os.walk(folder):
 File "/media/fat/Scripts/bgm.sh", line 342, in walk
TypeError: expected str, bytes or os.PathLike object, not NoneType
whet's wrong?
thanks

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Jun 17, 2022 12:39 pm
by wizzo
Juri wrote: Fri Jun 17, 2022 12:27 pm Hi i removed the old version and copied the new bgm.sh to scripts folder, but when i run it from script menu i get this:
If you haven't updated in a long time you should probably delete the bgm.ini file in the music folder and try run it again. If that doesn't work, try rename your music folder to something else and run the script, see what it says

I'm not quite sure what this error message means. It looks like something has slipped through my checks

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Jun 24, 2022 7:14 pm
by tr88
wizzo wrote: Fri Jun 17, 2022 12:39 pm
Juri wrote: Fri Jun 17, 2022 12:27 pm Hi i removed the old version and copied the new bgm.sh to scripts folder, but when i run it from script menu i get this:
If you haven't updated in a long time you should probably delete the bgm.ini file in the music folder and try run it again. If that doesn't work, try rename your music folder to something else and run the script, see what it says

I'm not quite sure what this error message means. It looks like something has slipped through my checks
I was having the same problem. I deleted the bgm.ini and remade the music folder, but the music would not play. I had to make a subfolder first (I called it playlist). There was no music in this subfolder, but adding it allowed the music to start playing again.

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sun Jun 26, 2022 3:25 pm
by wizzo
I've released an update for BGM. This fixes some minor bugs, adds some compatibility stuff needed for SAM and adds a couple new requested boot sound features.

You can now create a folder called "boot" in the music folder and put tracks in there. They will be included in the pool of boot tracks used in any playlist, rather than just being restricted to the current active playlist.

I've also added the ability to add core-specific boot sounds. So let's say you launch the SNES core, you can make it play a boot sound while that's launching (and then stop playing music like normal).

Check the docs for more details on how these work. They won't affect any existing setups people have, so don't worry about them if you don't wanna use em.
tr88 wrote: Fri Jun 24, 2022 7:14 pm I was having the same problem. I deleted the bgm.ini and remade the music folder, but the music would not play. I had to make a subfolder first (I called it playlist). There was no music in this subfolder, but adding it allowed the music to start playing again.
Thanks for the tip but unfortunately I still could not reproduce this. I've added some error handling for the specific error Juri posted, which might help, but it's hard to say. At the very least the script will no longer crash at this point and might give some more hints.

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sat Jul 02, 2022 7:13 pm
by PistolsAtDawn
wizzo wrote: Sun Jun 26, 2022 3:25 pm I've also added the ability to add core-specific boot sounds. So let's say you launch the SNES core, you can make it play a boot sound while that's launching (and then stop playing music like normal).
I appreciate this project, and I especially like this addition. I'm thinking that first up is something like a sample of Solid Snake dialogue for the PlayStation core boot sound.

Thank you!

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Wed Jul 13, 2022 1:57 am
by warham
love this. especially the mister boot up sound option.. scares my wife every time she hears the police yelling open up this is the police haha

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Thu Aug 11, 2022 8:54 am
by blacklistedcard
Still enjoying the background music. So far I'm fully updated and have not experienced any problems. It plays the internet streams perfectly.

Thanks for this effort.

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Mon Aug 15, 2022 8:36 am
by eLLuiGi
Any ini example for playing internet stream please ;-)

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Mon Aug 15, 2022 12:27 pm
by prom

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Mon Aug 15, 2022 11:10 pm
by wizzo
Thank you for the feedback!
eLLuiGi wrote: Mon Aug 15, 2022 8:36 am Any ini example for playing internet stream please ;-)
If you check the readme page on github in the Supported files section there's an explanation for this. Basically make a new playlist folder and put a .pls file in there. No ini changes required

Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Thu Dec 01, 2022 2:36 am
by Tritopher

So the BGM script won't start automatically after a reboot, is there something else I need to do to configure it? I'm having a similar issue with SAM, wondering if there's something basic I messed up that might interfere


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Thu Dec 01, 2022 4:27 am
by wizzo
Tritopher wrote: Thu Dec 01, 2022 2:36 am

So the BGM script won't start automatically after a reboot, is there something else I need to do to configure it? I'm having a similar issue with SAM, wondering if there's something basic I messed up that might interfere

Hi mate. It should just be automatic. Can you please post the contents of your user-startup.sh file? it should be in the linux folder on the sd card if you check on your computer or /media/fat/linux/user-startup.sh if you're going over the network.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Thu Dec 01, 2022 5:39 pm
by Tritopher

Thanks, this is what I have in the file:

#!/bin/sh

Startup MiSTer_SAM - Super Attract Mode

[[ -e /media/fat/Scripts/.MiSTer_SAM/MiSTer_SAM_init ]] && /media/fat/Scripts/.MiSTer_SAM/MiSTer_SAM_init $1

Startup BGM

[[ -e /media/fat/Scripts/bgm.sh ]] && /media/fat/Scripts/bgm.sh $1


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Thu Dec 01, 2022 7:31 pm
by Tritopher

So I had bought a preconfigured MiSTer, I decided to try just doing a fresh install on a new SD card with the newest versions of everything and it worked no problem. Thanks for the replies, still wondering what the issue was but happy to have it working as expected.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sat Dec 03, 2022 7:32 pm
by blacklistedcard
eLLuiGi wrote: Mon Aug 15, 2022 8:36 am

Any ini example for playing internet stream please ;-)

Check out the zipfile on the "2" tab in this thread. It has examples that I'm using.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Dec 09, 2022 12:36 am
by mrchrister

80.pls

Code: Select all

[playlist]
NumberOfEntries=1
File1=http://server5.radio-streams.net:8001/live
Length1=-1

This is the stream Super Attract Mode is playing when enabling BGM.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Sat Dec 10, 2022 11:23 am
by pbsk8
prom wrote: Mon Aug 15, 2022 12:27 pm

Try this for a selection of synthwave : https://hubble.shoutca.st:2199/tunein/synthwave.pls

I played it in my pc this playlist, looks nice recommendation


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Dec 30, 2022 9:14 am
by Yopachi

I've started using BGM and I have some questions. I downloaded:
Blank Banshee - Music For Menus
from bandcamp. The _boot mp3 plays followed by a random looping track. Super super cool!

  1. The music is almost twice as loud as the cores but the BGM volume is controlled by the master volume. Is there a way to change volume to the main menu core?

  2. The boot mp3 and music take some time to start, 20 seconds. The wifi and other mister features all seem to come on at the same time with the music. Is there a way to start it sooner?

Sorry if I'm asking something already covered in the github, I'm more artist than engineer :ugeek: I could edit the mp3s in audacity if I really need to change the volume. Xox great script regardless!!


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Dec 30, 2022 10:11 am
by neogeo81

I have also the same issue with the volume.

The starting time is something that can't be changed i think as the mister needs to startup befor the scripts start running.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Mon Jan 02, 2023 12:39 pm
by wizzo
Yopachi wrote: Fri Dec 30, 2022 9:14 am
  1. The music is almost twice as loud as the cores but the BGM volume is controlled by the master volume. Is there a way to change volume to the main menu core?

  2. The boot mp3 and music take some time to start, 20 seconds. The wifi and other mister features all seem to come on at the same time with the music. Is there a way to start it sooner?

Hi. Glad it is mostly working well for you.

For number 1: I believe there actually is a way now to control the main volume via script, so this may finally be fixed. I have to investigate the best way to handle it though, because I still need to make the script manually manage the main volume, and make a decision on how to best decide that volume or receive an input for a setting. Anyway, quickest solution is to change the volume on all your songs manually, but watch this space.

2: Nothing I can do about that one from my end sorry. It's just the nature of mister's current boot process. I think you could probably make it start faster yourself, maybe by moving the scripts launch to inittab or making a custom service file. Problem with this is that your changes may disappear after a linux update, and on my end it's actually a good thing to wait for the network to come up because some people use radio streams with the script.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Tue Jan 03, 2023 12:03 am
by Malor

If you're starting the music player with a script in /etc/init.d, just renaming it would change the boot order. The scripts are run in SXXscriptname order, so that S30dbus runs before S40network. If you rename the music player script to be something like S39whatever, it will launch before the network script runs.

However, between Linux updates and whatever wizzo's management script is doing, these changes could disappear, or end up launching the player twice. Expect pain if you start dabbling.


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Tue Jan 03, 2023 8:36 am
by Yopachi

If anyone else is editing their mp3s in Audacity, I used the dropdown for "Effects" then "Amplify" -13 db
Dropping my tracks about 13 decibels seemed to match the other cores for me. I'm getting used to the music starting with wifi. It's a nice audio que that I can start transferring files ;)


Re: MiSTer BGM - Background Music for the MiSTer Menu

Posted: Fri Jan 06, 2023 12:24 am
by wizzo

Recently I added support for BGM to change the global volume at core/menu launch. So you can set a custom volume while in the menu. This is a workaround for the problem where people's music plays too loud/quiet compared to the cores.

See here for instructions to use it: https://github.com/wizzomafizzo/MiSTer_ ... me-control

Basically just update bgm to latest version, turn your mister off and on again, then set the 2 new "Menu volume" and "Default volume" settings from the bgm gui.

This has been buggy, so I'm curious for feedback about it. I have had a report that the feature introduces a "popping" noise on core launch that I can't reproduce. In general it works well though.

Malor wrote: Tue Jan 03, 2023 12:03 am

However, between Linux updates and whatever wizzo's management script is doing, these changes could disappear, or end up launching the player twice. Expect pain if you start dabbling.

For me, all I do is add a line to user-startup.sh to launch the BGM script as a daemon. It checks if it's running already, so I think should be no harm my end messing about and trying to make a new init script without any other changes. I did actually try to do this a long time ago, but for some reason it the script still didn't start playing until network came up, and I gave up. I don't know if I goofed something up or if it was some other issue.

If someone made a working init script that launches before bluetooth and network I would be happy to add it to the repo and mention in the docs about it as an option.