Updated BGM for ES Script
-
Hi,
I've been updating and tweaking @Rydra's version (https://github.com/Rydra/bgm-for-es) of the original BGM script by @Livewire (https://retropie.org.uk/forum/topic/347/background-music-continued-from-help-support).
It still uses pygame rather than the mpg123 binary as I wanted more control over playback (such as fade up/down).
My version utilises dummy py processes to notify the master script of a status change (ie, enabled/disabled) to prevent the need to repeatedly check for the presence of a file/folder. This change in approach has also allowed me to add in the ability to alter the volume without restarting the script.
I have also added the option to loop the first mp3 detected in the music folder, so that a single smaller track can be looped to provide bgm without a full tracklist (ie, such as you would hear from the NES or SNES Classic). When set, only the startsong (if it exists) and the first mp3 detected will be played. The startsong plays once on start, or on restart if the 'pause' option is disabled in the configuration settings.
In addition I've moved the list of processes that the script checks for from the code over to the config file for safer modification, and I've included menu entries in the ES Config menu to allow for quick Enable/Disable Toggle, Volume Adjustment, and full config changes.
This is the first time I've done anything with Python, so I'm sure my code is not as tidy as anything provided by @Rydra or @Livewire, but it works and doesn't seem to have any noticeable impact on the system. I've also never written menus in bash before so there is a lot of new stuff here for me and this was a fun learning experience.
I haven't forked this on Git yet as a) I have not spoken to @Rydra about it, b) I've never done that, and c) I do not currently have an installer, so it's a simple but manual process to install atm.
I thought I would post here first to see if there was any interest in me sharing this?
-
-
-
-
-
-
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.