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.4k 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.
    • wmarcioW
      wmarcio
      last edited by

      What is the purpose of folders A-SIDE e B-SIDE, only to save MP3 files?

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

        @wmarcio Those are your dedicated Default playlist folders. If Enabled, they will be played at Startup. Those BGM settings are also respected when selecting Start All Music. So if you have only B-Side 0n, then only B-Side songs will be included in the playlist when Starting All Music, and at Startup.
        If no BGM is enabled, IMP will continue the song you left off, @position you left off, or if in LITE mode, continue with the last Playlist.
        They are not needed as you can put MP3s anywhere in the music folder, but they are optional for always starting up with a dedicated soundtrack if you want.

        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
        • DTEAMD
          DTEAM @RapidEdwin08
          last edited by DTEAM

          @rapidedwin08

          Wow!! I tested it and it works very well. Great job. @Folly look at that. It's great.

          I installed the first option Default RetroPie / ES. Could you clarify the other options for RetroPie. For example, for a Pi4, is it better with option # 5 (Pro (Pi4 20200401) or with option # 1 Default RetroPie / ES.

          Capture.PNG

          Also, is there an option to have music when we choose systems, but not when we choose a game. When I choose a game, the video sound is played with the IMP track. It becomes cacophonous.

          NEW EDIT: Major issue on my Pi4. I couldn't launch games anymore !!! When I uninstalled IMP, games worked again.

          F RapidEdwin08R 3 Replies Last reply Reply Quote 0
          • F
            Folly @DTEAM
            last edited by

            @dteam

            Looks cool indeed.

            In time, I will try it too ;-)

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

              @dteam Those options are referring to the Image you are using, whether it's a Stock RetroPie image, or a custom pre-made image, the installer will try to accommodate based on your Image. I will be updating the OP with a Video soon that should help explain more.

              Do you mean the Video Snaps? No IMP options there, but you can UI Settings -> Gamelist View Style from Automatic to Detailed instead to Not load Snap Videos?

              Pi4 not launching games anymore: Can you elaborate? What Image are you using? What System not loading, all?
              IMP does modify the es_systems.cfg, but if there was an issue there chances are ES would not have loaded at all.

              The Volume Fade at Game Setting might be your issue.
              Are you getting just a black screen when attempting to load a ROM?
              Try Turning OFF Volume Fade at Game Setting.

              I suspect 1 of 2 things might be happening:

              • The Volume fade is unable to locate the current Volume, and the script is just hanging.

              • The script that runs on game end does not wait for the Fade to complete (ends with &) and includes a Delay. The Result is if you try to start a ROM too quick after Ending a ROM and the Volume Fade has not completed yet, the x2 scripts could end up in a Tug of War of trying to Fade the Volume Up vs Down.
                In short, if you start another ROM before the Music kicks back in, you may encounter this issue.
                Wait for the music to continue playing before starting another ROM.

              You should be able to CTRL-C out of it with a Keyboard in either of these cases.
              I will address this in the next release, possibly even remove the Delay at Game End if not needed. I can't really remember why I added it in the first place, I think I read a post somewhere about it being needed. Feel free to weigh in on whether or not the Delay Playback at Game End Setting is even needed.

              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

              DTEAMD 1 Reply Last reply Reply Quote 0
              • DTEAMD
                DTEAM @RapidEdwin08
                last edited by DTEAM

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

                Can you elaborate?

                When I'm trying to load a game with any emulators, they doesn't load. Black sceen with no possibility to exit. Doesn't work with lr-fbneo and Drastic

                My image is the official Retropie one. My theme is Cygnus-Blue-flames. It works well with that theme. The problem seems to be when games are loading

                RapidEdwin08R 1 Reply Last reply Reply Quote 0
                • DTEAMD
                  DTEAM
                  last edited by

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

                  Try Turning OFF Volume Fade at Game Setting.

                  I'll try that

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

                    @dteam
                    Can you confirm your HW Pi4 2GB/4GB/8GB, and what version of RetroPie? Latest 4.7.1 or older?

                    If Turning OFF Volume Fade at Game resolves, I think I know where the issue is.

                    Can you run these two commands and tell me which one works for you? (replace HDMI with whatever you are using eg. PCM):

                    awk -F"[][]" '/dB/ { print $2 }' <(amixer sget HDMI) | cut -d '%' -f 1
                    
                    awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget HDMI) | cut -d '%' -f 1
                    

                    One of those commands should give you the current volume.
                    I'm guessing the 2nd command (the one with '/Left:/') will work for you.

                    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

                    DTEAMD 1 Reply Last reply Reply Quote 0
                    • DTEAMD
                      DTEAM @RapidEdwin08
                      last edited by DTEAM

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

                      @dteam
                      Can you confirm your HW Pi4 2GB/4GB/8GB, and what version of RetroPie? Latest 4.7.1 or older?
                      If Turning OFF Volume Fade at Game resolves, I think I know where the issue is.
                      Can you run these two commands and tell me which one works for you? (replace HDMI with whatever you are using eg. PCM):
                      awk -F"[][]" '/dB/ { print $2 }' <(amixer sget HDMI) | cut -d '%' -f 1

                      awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget HDMI) | cut -d '%' -f 1

                      One of those commands should give you the current volume.
                      I'm guessing the 2nd command (the one with '/Left:/') will work for you.

                      It's a Pi 4GB. If I turn OFF "Volume Fade at Game " it resolve the issue. Thanks!

                      For your two command lines, do you want a test with "Volume Fade at Game " = On or Off?

                      NEW EDIT:
                      with "Volume Fade at Game " = "On" This is what I got.

                      pi@retropie:~ $ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget HDMI) | cut -d '%                                                                                                                                                             ' -f 1
                      amixer: Unable to find simple control 'HDMI',0
                      
                      pi@retropie:~ $ awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget HDMI) | cut -d                                                                                                                                                              '%' -f 1
                      amixer: Unable to find simple control 'HDMI',0
                      
                      pi@retropie:~ $
                      
                      pi@retropie:~ $ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget PCM) | cut -d '%' -f 1
                      amixer: Unable to find simple control 'PCM',0
                      
                      
                      pi@retropie:~ $ awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget PCM) | cut -d '%' -f 1
                      amixer: Unable to find simple control 'PCM',0
                      
                      
                      
                      
                      RapidEdwin08R 1 Reply Last reply Reply Quote 0
                      • RapidEdwin08R
                        RapidEdwin08 @DTEAM
                        last edited by RapidEdwin08

                        @dteam Does not matter. Just try both and let me know which one produces a # that is your System Volume.
                        If HDMI or PCM not working, check your Audio Settings in ES visually.
                        Thanks for confirming.

                        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

                        DTEAMD 1 Reply Last reply Reply Quote 0
                        • DTEAMD
                          DTEAM @RapidEdwin08
                          last edited by DTEAM

                          @rapidedwin08

                          I'm on the headphone connection. Is it PCM? It's a handheld build, that's why.

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

                            @dteam Try replacing HDMI with Headphone:

                            awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Headphone) | cut -d '%' -f 1
                            
                            awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Headphone) | cut -d '%' -f 1
                            

                            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

                            DTEAMD 1 Reply Last reply Reply Quote 0
                            • DTEAMD
                              DTEAM @RapidEdwin08
                              last edited by DTEAM

                              @rapidedwin08

                              First line = 88
                              Second line = nothing

                              pi@retropie:~ $ awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Headphone) | cut -d '%' -f 1
                              88
                              pi@retropie:~ $ awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Headphone) | cut -d '%' -f 1
                              pi@retropie:~ $ 
                              
                              RapidEdwin08R 1 Reply Last reply Reply Quote 0
                              • RapidEdwin08R
                                RapidEdwin08 @DTEAM
                                last edited by RapidEdwin08

                                @dteam Thanks for confirming.

                                Does your volume respond to these commands, or error out?
                                One Lowers Volume, other Increases Volume:

                                amixer -q -c 0 sset "Headphone" 1db- unmet no cap
                                
                                amixer -q -c 0 sset "Headphone" 1db+ unmet no cap
                                

                                I have the same issue i think after changing my pi4 to Headphone for audio. Despite the mixer being identified as 'Headphone', those commands give me:
                                amixer: Unable to find simple control 'Headphone',0

                                I will work on implementing a different method for Volume Fade.
                                This alternative method of setting Volume seems to work with Headphone:

                                amixer --quiet set Headphone 0%
                                

                                Thanks for testing, and for the input.

                                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
                                • RapidEdwin08R
                                  RapidEdwin08 @DTEAM
                                  last edited by RapidEdwin08

                                  @dteam Major issue not launching games addressed in v2021.10b.
                                  Other issues previously mentioned regarding not waiting for the Volume Fade to complete also addressed.
                                  Feedback appreciated.

                                  Please Uninstall/Install from scratch as git was just updated.
                                  Remove any 0ld ~/imp-setup.tar.gz Files and ~/imp Directories first.

                                  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

                                  DTEAMD F 3 Replies Last reply Reply Quote 4
                                  • DTEAMD
                                    DTEAM @RapidEdwin08
                                    last edited by

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

                                    Major issue not launching games addressed in v2021.10b.

                                    Your update works with the headphone connection ! thanks

                                    1 Reply Last reply Reply Quote 1
                                    • F
                                      Folly @RapidEdwin08
                                      last edited by

                                      @rapidedwin08

                                      Just installed IMP !
                                      I only turned off fading and the delays to get the games get started faster.

                                      I must say, really nice job ;-)

                                      I will try some more.

                                      1 Reply Last reply Reply Quote 0
                                      • F
                                        Folly @RapidEdwin08
                                        last edited by Folly

                                        @rapidedwin08

                                        I turned off the fading and delay, but this only works if the music is turned on.
                                        If the music is turned off it does start the fading and delay procedure before booting the game.

                                        Is this an other setting or can this be fixed ?

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

                                          @folly If the music is turned off it does start the fading and delay procedure before booting the game.

                                          You found a bug.
                                          An Easy workaround for now is you can Start music, then leave it Paused.

                                          Or you can manually edit this file:
                                          /opt/retropie/configs/all/runcommand-onstart.sh

                                          Change this one-liner:
                                          if [ $(cat /opt/retropie/configs/imp/settings/music-over-games.flag) == "0" ]; then bash /opt/retropie/configs/imp/run-onstart.sh; fi

                                          To this instead:

                                          if [ $(cat /opt/retropie/configs/imp/settings/music-over-games.flag) == "0" ] && [ $(cat /opt/retropie/configs/imp/settings/music-switch.flag) == "1" ]; then bash /opt/retropie/configs/imp/run-onstart.sh; fi
                                          

                                          This will add an extra check for the music-switch.flag.
                                          This is only a band aid for the Fade Out, the Fade in script will still run at the end of game.

                                          The two main scripts with issue are in /opt/retropie/configs/imp:
                                          The one-liner that is supposed to exit in both scripts are not working.

                                          run-onstart.sh:
                                          if [[ "$fade_out" == "0" ]]; then pkill -STOP mpg123 && exit 0; fi

                                          if [[ "$fade_out" == "0" ]]; then
                                          	pkill -STOP mpg123
                                          	exit 0
                                          fi
                                          

                                          run-onend.sh:
                                          if [[ "$fade_out" == "0" ]]; then pkill -CONT mpg123 && exit 0; fi

                                          if [[ "$fade_out" == "0" ]]; then
                                          	pkill -CONT mpg123
                                          	exit 0
                                          fi
                                          

                                          I will fix the scripts with the issue and include this fix in next release.
                                          Thanks for testing and reporting the issue.

                                          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 Reply Quote 1
                                          • F
                                            Folly @RapidEdwin08
                                            last edited by

                                            @rapidedwin08

                                            Thanks for the quick reply.

                                            Nice to hear you can use my feedback to make it better ;-)

                                            I will have a look at your suggestion.

                                            1 Reply Last reply Reply Quote 1
                                            • 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.