• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 46.6k 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.
  • E
    ExarKunIv @RapidEdwin08
    last edited by 11 Mar 2022, 13:53

    @RapidEdwin08 i get that, not sure if it can be done, but can the music folder just sit in the roms dir,
    that way the Pegasus does not see them, since using BGM script it does see the music folder at all since it sits in the roms dir.

    and yes Pegasus uses metadata, but there is no metadata for retropiemenu so im not sure if trying to make one will do much or not,

    i have tried look at the metadata and im lost on that.

    RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
    RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
    Maintainer of RetroPie-Extra .

    R 1 Reply Last reply 11 Mar 2022, 14:42 Reply Quote 0
    • R
      RapidEdwin08 @ExarKunIv
      last edited by 11 Mar 2022, 14:42

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

      @RapidEdwin08 i get that, not sure if it can be done, but can the music folder just sit in the roms dir,
      that way the Pegasus does not see them, since using BGM script it does see the music folder at all since it sits in the roms dir.

      The Main Reason I put everything including the MP3s in the retropiemenu, is to separate them from your actual Games/ROMs in ES.
      0therwise they will get grouped with AllGames/Favorites/LastPlayed.
      In addition, I did not want to create a custom System (es_systems.cfg) just for Music, because there is no Theme for RP that has an Entry/Artwork for Music.

      Keeping all that in mind, using roms/music was initially my plan.
      The Problem is ES did not like the symbolic link in retropiemenu to roms/music.
      It would crash when trying to load up.

      So I ended up putting the actual Music Folder in retropiemenu, and putting the symbolic link in roms/music instead.

      and yes Pegasus uses metadata, but there is no metadata for retropiemenu so im not sure if trying to make one will do much or not,

      I'd say the metadata or collection idea is still worth a shot...

      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 0
      • R
        RapidEdwin08
        last edited by 14 Mar 2022, 15:04

        @ExarKunIv you unknowingly helped me discover an issue with IMP.
        While looking around for gamelist options for PegasusFE, I realized I never added <folder> Tags for all the IMP Sub-directories in the retropiemenu gameslist.xml for ES.
        If you were to set Parse Gamelists 0nly to 0N, ES may fail to load.

        Incorrect <game> Tag for Sub-directory:
        <game>
        <path>./imp</path>
        <name>Music Player</name>
        <desc>[IMP] Integrated Music Player.</desc>
        <image>./icons/imp.png</image>
        </game>

        Correct Tag for Sub-directory should be <folder>:

        <folder>
        <path>./imp</path>
        <name>Music Player</name>
        <desc>[IMP] Integrated Music Player.</desc>
        <image>./icons/imp.png</image>
        </folder>

        I'll address this in next release, but for now if you have this issue,
        Here's a one-liner to Disable Parse Gamelists 0nly:

        sed -i 's/\"ParseGamelistOnly\"\ value=\"true\"/\"ParseGamelistOnly\"\ value=\"false\"/g' /opt/retropie/configs/all/emulationstation/es_settings.cfg
        

        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 20 Mar 2022, 18:22 Reply Quote 1
        • C
          cdaters
          last edited by cdaters 18 Mar 2022, 04:59

          I have created a directory called InternetRadio and a directory called PersonalMusic in /home/pi/RetroPie/retropiemenu/imp/musicand I have moved the Internet radio station directories into my new folder and all my music into the PersonalMusic folder.

          I have edited the splashscreen\gamelist.xml to reflect the appropriate paths for the new location of the Internet Radio stations. I've added new <game> and <desc> attributes for the Internet Radio and Personal Music folders, but none of these changes are reflected in ES after restarts, etc. and my graphics (which I created and put in the icons folder) are showing up...

          Is there somewhere else I should be editing files?

          Nevermind... I realized that I had copied this file from ~/.emulationstation/gamelists/retropie/gamelist.xml into ~\splashscreen for whatever reason in the past and that I have been working on the wrong file this entire time, lmao!

          1 Reply Last reply Reply Quote 0
          • C
            cdaters
            last edited by cdaters 18 Mar 2022, 06:08

            As I have been moving things around and adding Internet Radio station configs to my new Internet Radio directory, I have been swapping <game></game> attributes with <folder></folder> where those entries are actual folders, and now I am thinking of how I can easily create the requisite xml data for my actual music library to insert meta data and artwork for my music into the gamelist.xml file so it all looks pretty in ES, lol!

            Too bad that you cannot utilize <include></include> attributes in XML files? That would make it a lot easier to add custom Internet Radio and Personal Music libraries into IMP and keep the original ~/.emulationstation/gamelists/retropie/gamelist.xml file mostly intact/original?

            1 Reply Last reply Reply Quote 0
            • C
              cdaters @RapidEdwin08
              last edited by 20 Mar 2022, 18:22

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

              you unknowingly helped me discover an issue with IMP.
              While looking around for gamelist options for PegasusFE, I realized I never added <folder> Tags for all the IMP Sub-directories in the retropiemenu gameslist.xml for ES.
              If you were to set Parse Gamelists 0nly to 0N, ES may fail to load.

              I can attest to this <folder> tags issue, lol! I've been playing around with ES and Pegasus trying to work out the best way to accommodate .m3u files and hiding the multi-disk/tape/carts from showing in gamelist.xml files and when I went to turned on "Parse gamelists" only trying to troubleshoot that issue, I broke ES! It took me some digging and --debugging to figure out what was going on, lol! All fixed now, I just went in and swapped out all the <game> tags to their appropriate <folder> tags accordingly...

              R 1 Reply Last reply 23 Mar 2022, 15:01 Reply Quote 0
              • R
                RapidEdwin08 @cdaters
                last edited by RapidEdwin08 23 Mar 2022, 15:01

                @cdaters If you turn ParseGamelistsOnly ON, any/all Music files not in your gamelist.xml will not be visible in ES, unless you manually enter them or select them one-by-one to create the entry.
                For multiple disc ROMs you could try to rename them a different extension like .CD1 .CD2 and update the .m3u accordingly.
                This may work for some systems, like PSX, but may not work for others like SegaCD.
                You'll have to try it out and see what works...

                Update coming soon with fixed Folder Tags, and a set ParseGamlistsOnly to OFF Utility in the Installer Menu.

                Randomizer [ALL] will now pick a Random Track and make the sub-folder of that Track the current playlist. It will also respect the current BGM Settings.

                Ranomizer [BGM] option solely for BGM will be added, it will exclude all other music, pick a Random Track from BGM, and make either BGM A/B the current playlist.

                Adding a Shuffle Playlist at Boot option.
                Currently IMP retains your shuffled playlist (like an iPod), which is nice to have, but not all the time. This will give you the 0ption to shuffle your current playlist at boot.

                @buzzardbait you might have thought it shuffled the songs at boot if you were using LITE Mode, as it does NOT retain the current track at boot (just the current playlist), so it would have just played the 1st song in the playlist, which may differ from the track last playing depending it's last creation.
                EDIT: Actually having the BGM Flags re-creates the playlists at boot based on the content of the BGM Dirs, so this would have shuffled the playlist in that case.
                This will be updated to retain parity with the Shuffle Playlist At Boot option.

                Also adding another streaming station.
                Feel free to add any other recommendations or issues here.

                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 2
                • R
                  RapidEdwin08
                  last edited by RapidEdwin08 25 Mar 2022, 11:55

                  v2022.03 Released
                  Fixed incorrect <game> Tags for Sub-directories in [gamelist.xml]
                  Added [ParseGamelistOnly] OFF Option to [RP/ES] Utilites to Installer Menu
                  Updated mpg123 installer to include [v1.29.3]
                  Modified Music Randomizer and Added More Modes [ALL/BGM/PLS]
                  Added Shuffle Playlist at Startup Setting
                  Modified Pause mechanism of [run-onstart/end.sh] to improve continuing playback with Streams
                  Moved Internet Radio Stations to the Sub-directory [Streams]
                  Removed [.acc] Addresses from Streams Playlist creation

                  After adjusting the Randomizer, the more I used the it, the more I liked it, so it became a whole thing...
                  Feel free to Report any issues here, and 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

                  1 Reply Last reply Reply Quote 3
                  • R
                    RapidEdwin08
                    last edited by 26 Mar 2022, 02:15

                    Tested IMP on a clean install of latest RetroPie 4.8 on a Pi4.
                    Everything worked fine, but the Audio was Choppy when using the Music Over Game setting.
                    It looked like both mpg123 + RetroArch were using/0verworking ALSA.
                    I was able to resolve the choppiness by changing the Audio Driver in RetroArch from ALSA to SDL2.
                    RetroArchAudioSDL2.jpg

                    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

                    M 1 Reply Last reply 18 Jul 2022, 20:35 Reply Quote 1
                    • topic:timeago-later,4 months
                    • M
                      mrmadcatz @RapidEdwin08
                      last edited by 18 Jul 2022, 20:35

                      @RapidEdwin08 Just wanted to say that I'm still using and loving IMP in my Retropie builds! Thanks again for creating this.

                      R 1 Reply Last reply 23 Jul 2022, 18:52 Reply Quote 2
                      • R
                        RapidEdwin08 @mrmadcatz
                        last edited by 23 Jul 2022, 18:52

                        @mrmadcatz THANKS!

                        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 0
                        • topic:timeago-later,7 days
                        • F
                          fadorka
                          last edited by 31 Jul 2022, 05:34

                          So I tried to install IMP using the standard install option and everything seemed to work well except the first line after confirming the install is.

                          ln: failed to create symbolic link '/home/pi/RetroPie/roms/music': Operation not permitted

                          When I start emulation station the music player is there and works. The music that came with the install all works perfectly. However any custom music I try to add does not work, if I put the mp3 files in /home/pi/RetroPie/retropiemenu/imp/music When I try to play the music none of it works. I checked /home/pi/RetroPie/roms but there was no music folder, I tried to make the folder and put the mp3 files in there but that didn't seem to do anything. Did I just miss something? Everything seemed to be pretty straight-forward to install so I don't know what I messed up.

                          R 1 Reply Last reply 31 Jul 2022, 23:17 Reply Quote 0
                          • R
                            RapidEdwin08 @fadorka
                            last edited by RapidEdwin08 8 Jan 2022, 00:22 31 Jul 2022, 23:17

                            @fadorka Thanks for the feedback.
                            Any more info about your build you can share?...

                            Are you using External Storage for ROMs?
                            Maybe the roms directory is a symbolic link already?

                            IMP uses the music DIR in imp/ as it's source.
                            Then it attempts to create a symbolic link to that imp/music DIR.
                            Sounds like that's where it failed.

                            IMP won't recognize the music in /roms/music unless it's linked to the main /imp/music DIR.

                            Try making a sub-directory in imp/music/subDIR and putting .mp3 there.
                            Basically anywhere BUT the root /imp/music DIR.
                            Does it play then? (Restart ES after adding /subDIR/mp3s).

                            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

                            F 1 Reply Last reply 1 Aug 2022, 01:02 Reply Quote 0
                            • F
                              fadorka @RapidEdwin08
                              last edited by 1 Aug 2022, 01:02

                              @RapidEdwin08 Yes I am using a USB thumb drive to store my ROMs. If it already has a symbolic link I wouldn't know how to check if it does.

                              I don't think I tried to make a sub-directory, so I'll try that when I get home. (I'm away on a trip so I will be back to try in a few days.)

                              Also thank you for the response! I'm very new to working with RetroPie and ES so I am a bit in over my head!

                              1 Reply Last reply Reply Quote 0
                              • W
                                willyati
                                last edited by willyati 8 Apr 2022, 23:21 4 Aug 2022, 21:30

                                297650104_3131860813731660_8732901343260679246_n.jpg Hi! I installed this on my retropie, through PuTTY. However when i was looking for the folders, the A and B sides were missing (just found music, IMP and radio) and my rom folder was empty. Also no option to adjust music in my retropie menu. Turns out i had unplugged my USB with the Roms to be able to connect a keyboard before learning about PuTTY. I think maby this somehow have ruined my installation, and after the first install reboot, my raspberry will no longer connect to the internet, it sees the network we have available, but refuse to connect. Now i dont know what to do, im not shure what commands i need to use to uninstall, and have to internett to connect my retropie cabinet to my pc. Really hope i dont have to wipe my retropie that ive used hours, if not days, to set up... Help anyone?

                                Edit: When i restarted the arcade once more, with the USB unplugged again like it was during install, suddenly i got my internet back... If i again plug in my usb i loose connection.

                                Trying to use this code to uninstall, since its the only one provided, but says that ive got no such file in my directory:
                                To REMOVE the 0lder ~/imp Directory {and ~/imp-setup.tar.gz}:
                                cd ~ #Change to Home Directory
                                rm ~/imp -R -f #ALWAYS PROCEED WITH CAUTION USING rm .. -R -f
                                rm ~/imp-setup.tar.gz
                                EDIT p2: Yes, i just noticed i had to run the install script again to uninstall IMP, still having the internet connection issue though.!!!! (red line on picture shows up when usb is plugged in)
                                297650104_3131860813731660_8732901343260679246_n.jpg

                                R 1 Reply Last reply 4 Aug 2022, 23:11 Reply Quote 0
                                • R
                                  RapidEdwin08 @willyati
                                  last edited by RapidEdwin08 8 May 2022, 04:35 4 Aug 2022, 23:11

                                  @willyati Is there a custom [wpa_supplicant.conf] on that USB?

                                  Could be possible power issue?
                                  Maybe the Power source is lacking when you are +USB.
                                  Try unplugging any extra components that consume power, including JoyPad for testing, does the internet connect with +USB then?

                                  IMP does not modify any Network settings on install, so it should not interfere with anything Network related.

                                  Since you are using a USB, you may want to check these files for any variation in location:
                                  /etc/emulationstation/es_systems.cfg
                                  ~/.emulationstation/es_systems.cfg

                                  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

                                  W 1 Reply Last reply 9 Aug 2022, 01:20 Reply Quote 0
                                  • W
                                    willyati @RapidEdwin08
                                    last edited by 9 Aug 2022, 01:20

                                    @RapidEdwin08 I think the (new) USB itself caused the issue, problem still existed after a clean install. Im now up and running, and will just add games and music through a shared nettwork. Thank you for your response, the music player works great now that im ditching the usb! Sorry for any confusion, this hole ordeal is new to me.

                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      fadorka
                                      last edited by 10 Aug 2022, 04:15

                                      So I figured it out. Apparently FAT file systems can't create symbolic links. So I reformat my USB thumb drive to a different file system and the symbolic link worked correctly.

                                      But as it turned out that had nothing to do with why my music wouldn't play. Apparently if the mp3 does not have a specified length in it's metadata it will refuse to play.

                                      Honestly I have no idea why it works this way and the fact I managed to figure this out is a complete miracle. But hey I guess if anyone else is have similar problems make sure to check the metadata of your mp3.

                                      R 1 Reply Last reply 10 Aug 2022, 11:24 Reply Quote 1
                                      • R
                                        RapidEdwin08 @fadorka
                                        last edited by RapidEdwin08 8 Oct 2022, 12:34 10 Aug 2022, 11:24

                                        @fadorka Thanks for the info.
                                        Makes sense about the FAT filesystem...

                                        Anything else you can share about the mp3 metadata?
                                        Was it too much or too little metadata?
                                        Maybe some $P3C!AL characters were included in the metadata?

                                        One thing to try is check if the song plays IN a playlist...
                                        As in select a song you know works to form a playlist with the bad.mp3 in the same folder/ list somewhere.
                                        Then skip to that bad.mp3 using next/previous track.
                                        Does the bad.mp3 play then?

                                        If you're up for it, you can try to manually run an MP3 from the Home directory with mpg123 with this command, and see if it outputs an error:

                                        mpg123 ~/bad.mp3
                                        

                                        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

                                        F 1 Reply Last reply 10 Aug 2022, 23:27 Reply Quote 0
                                        • F
                                          fadorka @RapidEdwin08
                                          last edited by 10 Aug 2022, 23:27

                                          @RapidEdwin08 It seems that no other metadata needs to be available for the mp3 to play the only thing that matters is a listed length.

                                          Putting the bad mp3s and skipping to them in a playlist doesn't make them play either.

                                          If you want to try to emulate the problem to test yourself here's how I did it . Take something from youtube e.g

                                          then I used this youtube to mp3 website https://ytmp3.cc/e64c1/ although I'm sure other websites will do the same. Check the properties of the mp3 to see the metadata, it should be all blank. The mp3 will not work with IMP, to fix it import the mp3 in something like Audacity then export to apply track length to the metadata.

                                          Outside of this strange quirk IMP is an awesome program! Thanks for the help to get it set up and working.

                                          1 Reply Last reply Reply Quote 1
                                          86 out of 158
                                          • First post
                                            86/158
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received