• 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.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.
  • D
    DTEAM @RapidEdwin08
    last edited by DTEAM 13 Oct 2021, 20:13

    @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

    R 1 Reply Last reply 13 Oct 2021, 21:59 Reply Quote 0
    • D
      DTEAM
      last edited by 13 Oct 2021, 20:19

      @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
      • R
        RapidEdwin08 @DTEAM
        last edited by 13 Oct 2021, 21:59

        @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

        D 1 Reply Last reply 13 Oct 2021, 23:47 Reply Quote 0
        • D
          DTEAM @RapidEdwin08
          last edited by DTEAM 13 Oct 2021, 23:47

          @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
          
          
          
          
          R 1 Reply Last reply 14 Oct 2021, 00:00 Reply Quote 0
          • R
            RapidEdwin08 @DTEAM
            last edited by RapidEdwin08 14 Oct 2021, 00:00

            @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

            D 1 Reply Last reply 14 Oct 2021, 00:02 Reply Quote 0
            • D
              DTEAM @RapidEdwin08
              last edited by DTEAM 14 Oct 2021, 00:02

              @rapidedwin08

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

              R 1 Reply Last reply 14 Oct 2021, 00:05 Reply Quote 0
              • R
                RapidEdwin08 @DTEAM
                last edited by 14 Oct 2021, 00:05

                @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

                D 1 Reply Last reply 14 Oct 2021, 00:09 Reply Quote 0
                • D
                  DTEAM @RapidEdwin08
                  last edited by DTEAM 14 Oct 2021, 00:09

                  @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:~ $ 
                  
                  R 1 Reply Last reply 14 Oct 2021, 00:29 Reply Quote 0
                  • R
                    RapidEdwin08 @DTEAM
                    last edited by RapidEdwin08 14 Oct 2021, 00:29

                    @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
                    • R
                      RapidEdwin08 @DTEAM
                      last edited by RapidEdwin08 14 Oct 2021, 05:05

                      @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

                      D F 3 Replies Last reply 14 Oct 2021, 15:15 Reply Quote 4
                      • D
                        DTEAM @RapidEdwin08
                        last edited by 14 Oct 2021, 15:15

                        @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 15 Oct 2021, 16:49

                          @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 15 Oct 2021, 17:27

                            @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 ?

                            R 1 Reply Last reply 15 Oct 2021, 18:32 Reply Quote 0
                            • R
                              RapidEdwin08 @Folly
                              last edited by RapidEdwin08 15 Oct 2021, 18:32

                              @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 15 Oct 2021, 19:07 Reply Quote 1
                              • F
                                Folly @RapidEdwin08
                                last edited by 15 Oct 2021, 19:07

                                @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
                                • wmarcioW
                                  wmarcio
                                  last edited by wmarcio 22 Oct 2021, 22:50

                                  When you update the script, how will we know, will you let us know here on the forum?
                                  Sorry to be away from the forum a bit, my daughter was born 20 days ago, and I'm out of time.

                                  R 1 Reply Last reply 23 Oct 2021, 17:05 Reply Quote 0
                                  • R
                                    RapidEdwin08 @wmarcio
                                    last edited by RapidEdwin08 23 Oct 2021, 17:05

                                    @wmarcio Congratulations and Good Luck!
                                    Yes I will post updates here.
                                    Waiting a bit for more feedback regarding issues and/or suggestions.
                                    It's been pretty quiet here lately, so either no one is using it, or IMP is working as expected.
                                    Either way next release planned is 2021.11.

                                    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
                                    • ExarKunIvE ExarKunIv referenced this topic on 1 Nov 2021, 20:49
                                    • R
                                      RapidEdwin08
                                      last edited by RapidEdwin08 11 Feb 2021, 02:24 2 Nov 2021, 02:10

                                      v2021.11 Released
                                      Fixed issue with Fade Not Respecting the Settings when Music is Stopped
                                      Added 0ffline Install 0ption
                                      Cleaned up the Main Menu
                                      Streamlined the Custom Installer
                                      Added mpg123 Utilities

                                      If you are [Upgrading] to a Newer Version of IMP:
                                      UNINSTALL [IMP] FIRST using the SETUP Script CURRENTLY INSTALLED

                                      Feedback appreciated.

                                      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
                                      • wmarcioW
                                        wmarcio
                                        last edited by 11 Nov 2021, 13:21

                                        I'm using the updated script in version v2021.11.

                                        I would like to know how I can delete the default music files that come with the installation?
                                        I delete them, but after the system restarts, they are in the same place.

                                        Can you help me?

                                        R 1 Reply Last reply 11 Nov 2021, 19:29 Reply Quote 0
                                        • R
                                          RapidEdwin08 @wmarcio
                                          last edited by RapidEdwin08 11 Dec 2021, 05:02 11 Nov 2021, 19:29

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

                                          I'm using the updated script in version v2021.11.

                                          I would like to know how I can delete the default music files that come with the installation?
                                          I delete them, but after the system restarts, they are in the same place.

                                          Can you help me?

                                          You found a bug.
                                          It's a new feature added to prevent overheating in case of an infinite loop of trying to start mpg123 when there's no music available.
                                          But it is 0nly supposed to do that if there are NO MP3s found (and on Install).

                                          v2021.11.11 Released.
                                          I have adjusted the scripts accordingly and updated git.
                                          You can Re-install IMP to update...

                                          Thanks for reporting the issue.
                                          For now, I plan on continuing to follow this thread for issues and update git accordingly.

                                          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 4
                                          • 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.

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