RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More)

    Scheduled Pinned Locked Moved Projects and Themes
    backgroundmusicretropiempg123 bgmimp
    158 Posts 20 Posters 55.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mrmadcatzM
      mrmadcatz @mrmadcatz
      last edited by

      @RapidEdwin08 After playing around a bit I was able to add NightRide FM (internet radio station that plays SynthWave) to the Player! Not sure what the rules are on what you are and are not allowed to add as part of your official builds, but it's a really cool station if you're looking for more to add.

      Thanks again! I love this thing :)

      1 Reply Last reply Reply Quote 0
      • RapidEdwin08R
        RapidEdwin08 @mrmadcatz
        last edited by

        @mrmadcatz said in Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More):

        Music Player Volume may need to be turned down a bit. I have my system volume set to 100% and the Music Player at 60%. I control my speaker volume from and Amplifier inside my Arcade Cabinet and having the Music Player Volume at 100% was making my speakers clip pretty badly.
        ...
        I was able to add NightRide FM (internet radio station that plays SynthWave) to the Player!

        Thanks for the input, much appreciated.
        I don't have a Cabinet so I'm glad you shared the results.
        Thinking %50 or %60 Volume would be good for out-of-box Install Setting?

        For NightrideFM, I'm not too familiar, but if they are a reliable station, I might add in next release...
        Care to share how you implemented? Such as .pls/.msu file, and example address?

        Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

        mrmadcatzM 1 Reply Last reply Reply Quote 0
        • mrmadcatzM
          mrmadcatz @RapidEdwin08
          last edited by

          @rapidedwin08 Oh wow you replied! Feel like I'm meeting a celebrity cuz I gotta say I'm LOVING IMP. It's amazing. Thank you so much for making it. In response to your message:

          1. I was able to fix the audio clipping issue with some audio changes on my Retropie. Originally, I was running audio out through the audio jack. After switching to HDMI, I was able to get the volume up to 100% and not get clipping with most songs. What I did notice is that the E1M1 and E1M2 songs you have pre-installed clip for me on any volume above 50%, but it may just be how my cabinet's amplifier is handling the audio signal. Just wanted to mention that, otherwise I keep the volume at 80% most of the time. This helps avoid clipping but also keeps the music a little quieter than my video previews for the games I have installed.

          2. Anecdotally I've found NightRideFM to be extremely reliable when I save it as a .pls file just like the MP3 Radio station that comes pre-installed. I just dragged/dropped it into the /home/RetroPie/roms/music folder and then edited it's metadata via EmulationStation (was having a hard time getting the changes to stick when editing the .emulationstation/gamelists/retropie/retropie.xml directly). I haven't messed with Custom IMP yet, but I suspect if I were to edit some files/folders in the install folder I could get IMP to install those stations for me next time. I also added my own image for the station that I just downloaded from their site and saved in the /home/RetroPie/retropiemenu/icons folder.

          I ended up doing the same thing with another station called Rainwave.cc which plays awesome video game music, remixes and remakes all day long. I've also had success with it working consistently in the same way. They offer a downloadable .m3u you can use as well (like SLAYradio) which I used and seemed to work. I switched to a .pls because I wanted to see if it would also work (I like to tinker). It has and I just haven't changed back.

          Anyway, all of that to say I am absolutely loving IMP. This was my first RetroPie build, let alone an arcade, so I'm a little new to all of this. That said, IMP is going to be a staple in any of my builds forevermore. I love it. Thank you for making it!

          Here are how my .pls files are set up for the two stations I added. I basically just copy/pasted your MP3 Radio one and changed the URL to the streaming URLS offered by these two services:
          NightRideFM

          [playlist]
          numberofentries=1
          File1=http://stream.nightride.fm/nightride.mp3
          Title1=NightRide.FM Stream
          Length1=-1
          version=2
          

          rainwave.pls

          [playlist]
          numberofentries=1
          File1=http://allstream.rainwave.cc:8000/all.mp3
          Title1=NightRide.FM Stream
          Length1=-1
          version=2
          

          rainwave.m3u

          #EXTINF:0,Rainwave All: Random Relay
          http://allrelays.rainwave.cc/all.mp3
          #EXTINF:0, Rainwave All: Rainwave (Toronto) Relay
          https://relay.rainwave.cc:443/all.mp3
          

          Here are their site URLs respectively (different from streaming URL):
          https://nightride.fm/about?station=nightride
          https://rainwave.cc/all/

          Let me know if I can provide you any more info and thanks again!

          RapidEdwin08R 1 Reply Last reply Reply Quote 1
          • RapidEdwin08R
            RapidEdwin08 @mrmadcatz
            last edited by RapidEdwin08

            @mrmadcatz said in Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More):

            rainwave.m3u

            #EXTINF:0,Rainwave All: Random Relay
            http://allrelays.rainwave.cc/all.mp3
            #EXTINF:0, Rainwave All: Rainwave (Toronto) Relay
            https://relay.rainwave.cc:443/all.mp3
            

            You just helped me identify an Issue I missed with an already known issue...
            mpg123 does not handle https, and IMP currently accommodates for this by replacing [https] -> [http].
            But, if the address has :443 in it, it's still basically https and mpg123 will not play.
            IMP does not accommodate for :443 at the moment.
            I tested and you can simply remove :443 from the address and it will play.

            #EXTINF:0,Rainwave All: Random Relay
            http://allrelays.rainwave.cc/all.mp3
            #EXTINF:0, Rainwave All: Rainwave (Toronto) Relay
            http://relay.rainwave.cc/all.mp3
            

            I will accommodate for :443 in the next version of IMP.
            Thanks again for your input.

            Also, I am enjoying NightrideFM, particularly ChillSynth.
            Thanks for the recommendation.

            [playlist]
            numberofentries=1
            File1=http://stream.nightride.fm/chillsynth.mp3
            Title1=NightRide.FM Stream
            Length1=-1
            version=2
            

            Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

            mrmadcatzM 2 Replies Last reply Reply Quote 0
            • mrmadcatzM
              mrmadcatz @RapidEdwin08
              last edited by

              @rapidedwin08 I got a reply from you and I was helpful?! You're makin' my day! Haha.

              I'll definitely check out the Chill Synth one. I'll keep an eye out for next iteration of IMP! Let me know if I can of any more service.

              1 Reply Last reply Reply Quote 1
              • mrmadcatzM
                mrmadcatz @RapidEdwin08
                last edited by mrmadcatz

                @rapidedwin08 Sorry to keep blowing you up with messages, but one more thing I wanted to mention that I noticed:

                When trying to access the roms/music folder via \RETROPIE\roms\music in Windows File Explorer, it's permission protected and unable to be opened. I can access it via SSH just fine, or via RetroPie's command line. I've just been mv <temp/path/to/file/or/folder> /home/RetroPie/roms/music as needed.

                These permissions might be inentional, and if so, please disregard. Wanted to mention just in case!

                RapidEdwin08R 1 Reply Last reply Reply Quote 0
                • RapidEdwin08R
                  RapidEdwin08 @mrmadcatz
                  last edited by

                  @mrmadcatz said in Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More):

                  @rapidedwin08
                  When trying to access the roms/music folder via \RETROPIE\roms\music in Windows File Explorer, it's permission protected and unable to be opened. I can access it via SSH just fine, or via RetroPie's command line.

                  Another issue identified...
                  The music folder in roms/music is actually a symbolic link. (like roms/genesis)
                  The music folder is moved by IMP upon install to a new location:

                  ~/RetroPie/retropiemenu/imp/music
                  

                  You will need to add another entry to smb.conf if you want to access it.

                  sudo nano /etc/samba/smb.conf
                  

                  Add these lines to the bottom:

                  [music]
                  comment = music
                  path = "/home/pi/RetroPie/retropiemenu/imp/music"
                  writeable = yes
                  guest ok = yes
                  create mask = 0644
                  directory mask = 0755
                  force user = pi
                  

                  Restart samba service:

                  sudo systemctl restart smbd.service
                  

                  I will attempt to accommodate and have the IMP Installer add an additional samba share for the IMP Music folder in next version.
                  Thanks for your input... again...

                  Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                  C 1 Reply Last reply Reply Quote 1
                  • C
                    cdaters @RapidEdwin08
                    last edited by cdaters

                    @rapidedwin08, I just want to post this here to keep it all in one spot...

                    So i installed the latest RetroPie software on my Pi4, using the image from the site, on a new SD Card. Got it up and running, loaded some roms, etc. that I had scraped using ARRM so I could have images, box-art, videos, etc. Then I installed IMP for background music and the Bezel Project for those 4:3 emus. Things were great! Played some games, had a blast!

                    Then disaster...

                    I decided that I want to make sure everything was updated, so updated the install script and told it to update...after updated some of RetroPie. It asked if I wanted to update the underlying RaspberryOS. I said, sure! Why not?

                    Now I get this...

                    emulationstation: /home/pi/RetroPie-Setup/tmp/build/emulationstation/es-app/src/FileData.cpp:218: void FileData::addChild(FileData*): Assertion `mType == FOLDER' failed.
                    Aborted
                    

                    ...and a blinking cursor!
                    I've seen some mention of modifying gamelist.xml to get it working again, but I just plain removed those rom directories that had any content and restarted emulationstation. Same error...I've searched and googled and nothing comes up. Has anyone else encountered this issue?

                    Using --debug, ES is getting hung up on ~/.emulationstation/gamelists/retropie/gamelist.xml but I don't understand what I am looking for? Other posts relating to that error suggest paths should not refer to files, only directories? I wondered if perhaps it was the html entities you have in the XML for "less than" or "greater than" symbols? I am not sure.

                    Here is the pastebin of the gamelist.xml that ES is failing on. The offending block of XML is related to the IMP background music player. When I comment out any attributes/elements related to IMP, save, and launch ES, everything works just fine.

                    This was working just fine prior to updating the underlying OS, so I wanted to know if there is some sort of discontinuity going on that others may have encountered...

                    Here is a link to my post in the general help and support forum in case this is not an IMP issue and something comes up there that can help others here...

                    mrmadcatzM 1 Reply Last reply Reply Quote 0
                    • mrmadcatzM
                      mrmadcatz @cdaters
                      last edited by mrmadcatz

                      @cdaters I had the same issue! What I ended up doing was uninstalling IMP via the /home/pi/imp/imp_setup.sh. Then I rebooted my RetroPie and it was working after that. The issue is that there is an XML file that tells Emulation Station how to organize all of the various IMP menu items within the RetroPie menu. The XML specifically in question is/home/pi/.emulationstation/gamelists/retropiemenu/gamelist.xml. The update does something to the XML that makes EmulationStation forget that some items are folders in that IMP menu. Because it can't parse the XML properly, it freaks out and won't load into EmulationStation.

                      In the IMP Setup script there is also an option for [retropiemenu] gamelist.xml refresh. I believe that this was intended to fix the XML issue I am describing, but when I tried it myself it didn't work and the uninstall/reinstall was the only fix that worked for me.

                      One thing that made the uninstall/reinstall less painful was the fact that the /home/RetroPie/roms/music folder seemed to remain intact with anything I had added on my own, although creating a backup is always a smart idea.

                      @RapidEdwin08 Might have a more elegant solution to all of this, but thought I'd share what worked for me so you're not stuck without being able to use your RetroPie.

                      RapidEdwin08R C 2 Replies Last reply Reply Quote 0
                      • RapidEdwin08R
                        RapidEdwin08 @mrmadcatz
                        last edited by RapidEdwin08

                        @mrmadcatz @cdaters Thanks for the input.

                        I think the problem might be HTML character codes (or lack there of)...

                        The RetroPie update might have struggled to parse the [gamelist.xml] correctly because of special characters that were neglected to be input in HTMLCode/NameCode.

                        NOT the issue, as pointed out to me, I was confusing this with XML Character Set

                        Issue could be that the RetroPie update Removed the .mp3 extension from [es_systems.cfg]

                        The game list xml Refresh currently does Not accommodate for this.

                        Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                        1 Reply Last reply Reply Quote 1
                        • C
                          cdaters @mrmadcatz
                          last edited by cdaters

                          @mrmadcatz, thank you for the suggestion, I briefly saw this when I woke up in the middle of the night with the idea that I would try just what you suggested when I woke this morning and was preparing to do just that when I happened to see @RapidEdwin08's response in the Help and Support thread that perhaps the RetroPie upgrade might have removed the mp3 extension entries from the es_systems.cfg file in /etc/emulationstation/es_systems.cfg for the RetroPie Menu. By default, this is usually only .sh or .rp.

                          So I added those back in per @RapidEdwin08's suggestion and boom! Back up and running!

                            <system>
                              <name>retropie</name>
                              <fullname>RetroPie</fullname>
                              <path>/home/pi/RetroPie/retropiemenu</path>
                              <extension>.rp .sh .mp3 .MP3 .pls .PLS .m3u .M3U</extension>
                          
                          LolonoisL mrmadcatzM 2 Replies Last reply Reply Quote 1
                          • C
                            cdaters
                            last edited by

                            Okay...So I have overcome an update of RetroPie that had killed my [IMP] experience, and I have enabled SMB shares to get my music on my Pi via feedback from @RapidEdwin08 due to other feedback...

                            @mrmadcatz your feedback has gotten me back into streaming radio and I have to agree with your feedback, [IMP] is amazing and I think my go-to from here on!

                            I love! Love! Love! that we can create playlists, incorporate Internet Radio (I've already added a few of my own), etc. into our BGM experience! I am playing with the gamelist.xml file now creating "categories" for [Internet Radio]and [Personal Music] to sort of keep things nice and tidy...

                            @RapidEdwin08 , thanks again for this gem!

                            1 Reply Last reply Reply Quote 0
                            • LolonoisL
                              Lolonois @cdaters
                              last edited by

                              @cdaters to avoid further worries (and also for others stumbling across this): Place a customized copy of es_systems.cfg into ~/.emulationstation/ (user pi). This location takes precedence over /etc/emulationstation/ and is never changed automagically, neither by updates nor by adding extra emulators.

                              C RapidEdwin08R 2 Replies Last reply Reply Quote 3
                              • C
                                cdaters @Lolonois
                                last edited by

                                @lolonois, thank you very much, done! 😄

                                1 Reply Last reply Reply Quote 1
                                • mrmadcatzM
                                  mrmadcatz @cdaters
                                  last edited by

                                  @cdaters @RapidEdwin08 .mp3 being added as an extension in /etc/emulationstation/es_systems.cfg makes total sense! I'll keep this in mind. Glad everyone has things working :)

                                  1 Reply Last reply Reply Quote 0
                                  • RapidEdwin08R
                                    RapidEdwin08 @Lolonois
                                    last edited by

                                    @lolonois said in Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More):

                                    @cdaters to avoid further worries (and also for others stumbling across this): Place a customized copy of es_systems.cfg into ~/.emulationstation/ (user pi). This location takes precedence over /etc/emulationstation/ and is never changed automagically, neither by updates nor by adding extra emulators.

                                    The Installer is accommodating for Both locations already, but the 0nly time it does so is at Install.
                                    This explains why the Re-Install Resolved the issues @mrmadcatz , but the gamelist refresh did N0T @cdaters .

                                    New release coming soon, it will check es_systems.cfg(s) for this at B00T.

                                    Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                                    mrmadcatzM 1 Reply Last reply Reply Quote 1
                                    • mrmadcatzM
                                      mrmadcatz @RapidEdwin08
                                      last edited by

                                      @rapidedwin08 Just saw the new commit and that you've added NightRideFM and RainwaveCC to it! Thank you so much! So cool. I really like how RainWave's channels are all listed and available. I'm noticing that NightRideFM is set up as a station with all of it's stations within a single playlist and not selectable like RainwaveCC. Is this intentional? If not, just wanted to bring it to your attention!

                                      RapidEdwin08R 1 Reply Last reply Reply Quote 0
                                      • RapidEdwin08R
                                        RapidEdwin08 @mrmadcatz
                                        last edited by

                                        @mrmadcatz said in Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More):

                                        @rapidedwin08 ... I'm noticing that NightRideFM is set up as a station with all of it's stations within a single playlist and not selectable like RainwaveCC. Is this intentional? If not, just wanted to bring it to your attention!

                                        YES it is intentional.
                                        I included the [NightrideFM-x6.pls] as an Example for Multiple Songs/Channels in a Single Playlist File for Reference.

                                        Thanks for the feedback!

                                        Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                                        mrmadcatzM 1 Reply Last reply Reply Quote 0
                                        • mrmadcatzM
                                          mrmadcatz @RapidEdwin08
                                          last edited by mrmadcatz

                                          @rapidedwin08 This is so cool! Thank you very much for adding these :) Them just being there after the install was a pleasant surprise lol!

                                          On a separate note: I'm noticing a bug. When I have "Fade Volume at Game [ON]" it fades the ES System Volume down to about 22-24% before launching the game. Then, upon exiting the game, the System Volume in ES remains at that low level and has to be manually raised again so that games being emulated are not too quiet.

                                          In my testing, I found that if I don't touch the volume when returning to ES as it's stuck at 22-24%, the music will continue to play. If I adjust it to anything below what the Music Player volume is set to (in this instance 80%) the music will cut out, but will come back as soon as I put the system volume above that threshold.

                                          Would you prefer us report stuff like this here or on your GitHub page in the issues section?

                                          RapidEdwin08R 1 Reply Last reply Reply Quote 1
                                          • RapidEdwin08R
                                            RapidEdwin08 @mrmadcatz
                                            last edited by RapidEdwin08

                                            @mrmadcatz said in Integrated Music Player for RetroPie [IMP] 2021.10 (Background Music for RetroPie and More):

                                            @rapidedwin08 I'm noticing a bug. When I have "Fade Volume at Game [ON]" it fades the ES System Volume down to about 22-24% before launching the game. Then, upon exiting the game, the System Volume in ES remains at that low level and has to be manually raised again so that games being emulated are not too quiet.

                                            Would you prefer us report stuff like this here or on your GitHub page in the issues section?

                                            Here is fine.
                                            Volume Fade is the Unicorn of BGM Features...

                                            Was this occurring while Very Rapidly Selecting ROMs?
                                            If so, I guess you could call it a Known Issue with the Fade.

                                            If you are a Rapid-ROM-Selector, you can try to Increase the [Delay at Game End] Setting to avoid this issue.

                                            EDIT The Fade Scripts were definitely Not acting right, and have been Reverted to an 0lder known working version.
                                            Changes were Very Promptly Applied on github. (Reinstall if needed).
                                            Thanks for Reporting.

                                            Raspberry Pi B, Pi B+, Pi2 B, Pi3 B, Pi3 B+, Pi Zero W, Pi4 (4GB/8GB), Pi5 (8GB/16GB), Pi Zero 2 W, GPi V1, minisforum GK50 / RetroPie 4.8.x

                                            mrmadcatzM 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.