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 47.0k 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.
    • RapidEdwin08R
      RapidEdwin08 @trickarrow89
      last edited by

      @trickarrow89 Yes Uninstall current Version before installing newer IMP.
      You can see this process in the updated Video in the OP for reference.

      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

      buzzardbaitB 1 Reply Last reply Reply Quote 1
      • buzzardbaitB
        buzzardbait @RapidEdwin08
        last edited by

        @RapidEdwin08 Just did a fresh update of RetroPie 4.8.2, with the updated Pixelcade software (I have an LED marquee), and this update of IMP. I had been waiting to do this on a fresh MicroSD card because I already had a completely stable system running with RetroPie 4.7.21 and didn't want to break anything.

        The new IMP features are GREAT! Thanks for all the hard work. I now have a fun startup mp3 that plays before IMP plays a randomized selection from EITHER my A-Side or B-Side folders.. Music stops when the screensaver starts, fades in/out going in and out of games.. I have a funny goodbye mp3 when it shuts down.. it is really awesome.

        Thanks again for all the thorough work on this- if anyone is on the fence about installing, let me just say IMP is a great choice. This is a really full-featured enhancement for RetroPie with a lot of options for whatever you might want to do with background music.

        FWIW- I am on a Pi 4B 4GB RAM running in an arcade cabinet with:

        • RetroPie 4.8.2
        • Pixelcade 4.4.5
        • IMP 2022.10
        1 Reply Last reply Reply Quote 1
        • buzzardbaitB
          buzzardbait @RapidEdwin08
          last edited by

          @RapidEdwin08 So I have noticed something, not sure if I have a setting wrong or if anyone else is experiencing this.

          I set up an mp3 as my "Quit mp3" for when I shut the Pi down from EmulationStation.

          What happens, is the BGM playing continues to play, and the Quit mp3 plays concurrently- both mp3s play until the Quit mp3 has played in full, and then the Pi shuts down.

          What I expected to happen- the BGM stops or fades out, and then the Quit mp3 plays, and then the Pi shuts down.

          My settings in IMP are:
          1. Music @ Boot - ON
          2. Delay - 5 sec.
          3. Startup mp3 - ON
          4. Quit mp3 - ON
          5. A-Side - ON
          6. B-Side - ON
          7. Shuffle playlist @ Boot - ON
          8. OMX Monitor - OFF
          9. Randomizer - BGM
          10. Stop IMP @ screensaver - VIDEO
          11. Lite Mode - OFF
          12. Infinite Mode - OFF
          13. Music Over Game - OFF
          14. Fade in/out - ON
          15. Delay @ Game end - OFF
          16. Stop at sleep - OFF

          Running:

          • RetroPie 4.8.2
          • IMP 2022.10
          • Pixelcade 4.4.5 (don't think this matters, but FYI).

          Any recommendations?
          Thanks!

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

            @buzzardbait Your attention to detail is uncanny and appreciated.

            I would suggest you use the [PC/0ther] Utilities in [~/imp/imp_setup.sh] and Apply this setting:
            Add [IMP-STOP] to Emulationstation [Quit]

            NOTE: This will stop IMP @Restart of ES as well.

            Long story short, adding the Quit song to Emulationstation's default quit/ Scripting location was the place I wanted to use to get the Quit song to play @Shutdown/Restart without diving into the system OS or using systemd ect...

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

              IMP v2023.01 Released

              Changed Play [quit.mp3] Song to a systemd Service to address Music 0verlapping issue (at ES Quit 0ption still Available in PC Utilities).
              Added Fade x1/x5/x10 Interval Settings for Adjustable Fade Speeds (to address Slow Fade issue on PlayBox V2 Vanilla).
              Modified Fade mechanism to perform Additional Check if Audio Device from [es_settings.cfg] not found in amixer check.
              OMX Monitor Version [RC1] (No Reports of Bugs, No Changes, Release Candidate).
              Updated mpg123 Utilities to include [v1.31.2]
              Fixed BGM A-Side/B-Side playback issue when set at boot.
              Adjusted errorcheck .sh, was too vague stopping at any error:

              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

              buzzardbaitB 1 Reply Last reply Reply Quote 1
              • buzzardbaitB
                buzzardbait @RapidEdwin08
                last edited by

                @RapidEdwin08 So I have installed the latest version on a fresh SD card, and I did get everything working fine, EXCEPT the quit.mp3.

                My setup is:
                RPi 4B, 4GB
                RetroPie 4.8.2
                IMP 2023.01 with these settings:
                1. Music @ Boot - ON
                2. Delay - 5 sec.
                3. Startup mp3 - ON
                4. Quit mp3 - ON
                5. A-Side - ON
                6. B-Side - ON
                7. Shuffle playlist @ Boot - ON
                8. OMX Monitor - OFF
                9. Randomizer - BGM
                10. Stop IMP @ screensaver - VIDEO
                11. Lite Mode - OFF
                12. Infinite Mode - OFF
                13. Music Over Game - OFF
                14. Fade volume out/in - 1X
                15. Delay @ Game end - OFF
                16. Stop at sleep - OFF

                I have A-SIDE & B-SIDE filled with music, a startup.mp3 file and a quit.mp3 file; upon boot, IMP will play my startup.mp3 and then select either A-SIDE or B-SIDE and play a random selection from it. So far, great!

                When I shutdown Emulationstation, the quit.mp3 will not play at all. Music just stops and then the Pi shuts down.

                Am I missing a setting in the new version?

                When I used the PREVIOUS version of IMP (2022.10), the behavior I was getting was the same, except in shutdown, when the quit.mp3 DID play but simultaneously with previously playing music; followed by normal shutdown.

                (The quit.mp3 file isn't the issue- it definitely works.)

                Thanks for any help!

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

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

                  @RapidEdwin08 So I have installed the latest version on a fresh SD card, and I did get everything working fine, EXCEPT the quit.mp3.

                  ...This is why I didn't want to use systemd in the first place; mixed results...
                  Not sure what the issue is, sounds like you have stock Raspbian/RetroPie image on pi4?

                  1st thing you can try is to Uninstall/Reinstall IMP...
                  As usual, I made a few fixes/changes after the initial release, and one of them pertained to the systemd quit service.
                  It's possible you have a version before I adjusted it Here

                  If you still have issues you can try these commands to troubleshoot:

                  cat /etc/systemd/system/impquit.service #Show Content
                  
                  sudo systemctl daemon-reload #Reload may show errors
                  
                  sudo systemctl stop impquit.service #Should hear quit.mp3
                  sudo systemctl enable impquit.service
                  sudo systemctl start impquit.service
                  
                  sudo systemctl daemon-reload #Reload may show errors
                  

                  If all else fails, for now you can apply the 0lder method from [~/imp/imp_setup.sh].
                  It is still retained in [PC/0ther] Utilities: Add quit song to ES Quit.

                  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

                  H buzzardbaitB 2 Replies Last reply Reply Quote 0
                  • H
                    hopwon @RapidEdwin08
                    last edited by hopwon

                    @RapidEdwin08 First off, thank you for IMP, I have been trying to get a BGM working on my setup for weeks, then I found this and minutes later I have the biggest smile on my face! I appreciate the work you put in, its fantastic. It works as advertised and I have even been able to add my own tunes!

                    I have a query I hope its easy enough for you to point me in the right direction.
                    I cannot get the BGM music to start automatically, if I go into the menu and select Start BGM, it works perfectly. But following a reboot it does not start. Where can I look to see that it is correctly configured to start post boot?

                    I have Rpi4, latest build of RetroPie & I am using a hifiberry-amp hat. I can confirm that all the other features work, in game sounds work fine etc.

                    I'm fairly adept at scripting, and have been playing with Pi's for years :)

                    
                    #cat  /opt/retropie/configs/imp/settings/music-startup.flag
                    1
                    -rw-r--r-- 1 pi pi   2 Feb 14 18:40 music-startup.flag
                    

                    Thanks in advance!

                    Screenshot from 2023-02-15 10-25-09.png

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

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

                      I cannot get the BGM music to start automatically, if I go into the menu and select Start BGM, it works perfectly. But following a reboot it does not start. Where can I look to see that it is correctly configured to start post boot?

                      Thanks for the feedback...

                      From your screenshot it looks like you already have BGM A Enabled, so it should be working, and playing only A-Side at boot.

                      I believe I found and fixed this issue about a week ago, but I could be wrong.
                      You might have installed before I made the changes Here.
                      You can try to uninstall, re-download ~/imp setup, and re-install.
                      I recommend fresh install as I made a few other changes/fixes since the release as well.

                      Or if you want, you can check the [boot .sh], and just #Comment# the bad lines out.

                      [/opt/retropie/configs/imp/boot.sh] Lines 83-86:

                      	# Replace rpMenu/music Path with roms/Music Path in Playlist files - No Longer Required - No Longer Works
                      	#sed -i s+$ESCmusicDIR+$ESCmusicROMS+ /dev/shm/abc
                      	#sed -i s+$ESCmusicDIR+$ESCmusicROMS+ /dev/shm/shuffle
                      	#sed -i s+$ESCmusicDIR+$ESCmusicROMS+ /dev/shm/init
                      

                      I also wanted to elaborate on the BGM Settings VS Randomizer at B00T while the topic is relevant.

                      BGM A-Side Enabled: Plays ONLY BGM A-Side at B00T overriding any previous playlist
                      BGM B-Side Enabled: Plays ONLY BGM B-Side at B00T overriding any previous playlist
                      BOTH A-Side/B-Side Enabled: Plays BOTH A/B Side together as single playlist at B00T

                      Randomizer Mode ON: Supersedes BGM at B00T
                      Randomizer ALL: Respects BGM A/B Settings allowing you to Include OR Exclude BGM from Randomizer playlist at B00T
                      Randomizer BGM: Plays 0nly EITHER BGM A-Side OR BGM B-Side at B00T overriding any previous playlist
                      Randomizer PLS: Plays only Random Playlist Files .PLS/.M3U

                      Also, a quick reminder about Music Over Games and RetroArch Audio Driver 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

                      H 1 Reply Last reply Reply Quote 0
                      • RapidEdwin08R RapidEdwin08 referenced this topic on
                      • H
                        hopwon @RapidEdwin08
                        last edited by

                        @RapidEdwin08 Thanks for getting back so soon. I did the fresh re-install and can confirm the hashed out lines above are indeed there.
                        The results are the same, no background music at startup.

                        One other thing I saw flash up when starting a game (I have FADE on) is a message stating "unable to get current volume" is this a symptom of this issue or something else?
                        I just wanted to reiterate that I have disabled onboard audio and am using (successfully) an audio hat. So in game sounds work, IMP works fine apart from the no music at startup. Just in case :)

                        Checked the mp3 files, they are consistently named i.e. all lowercase .mp3
                        Nothing in syslog or dmesg to indicate any issues either.

                        Where can I look now?

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

                          @hopwon You can check the IMP Output log file right after a Reboot before you Press anything IMP Related in ES.

                          /dev/shm/current-playlist
                          

                          You can also check the actual Playlist Files to confirm the Path to MP3s is correct.
                          (NOTE: the current-track Log file in this Location is only used when LITE Mode is DISABLED)

                          /opt/retropie/configs/imp/playlist
                          

                          Are you able to get Music playing at B00T at all?
                          Tried any other Settings with BGM Disabled?
                          Do you hear the startup.mp3 Play at B00T?
                          Trying to determine if the issue isolated to BGM settings, Audio device, or the Music Files themselves...

                          Are you sure ALL the songs in the BGM Folder play?
                          One known issue is that any File with a Double-Space will not play with mpg123 Issue#4
                          Another known issue is with Files that have no metadata mentioned Here.

                          The "unable to get current volume" is an issue with IMP Not being able to detect the audio device properly at FADE.
                          You can Disable FADE for now to get rid of the message
                          May be related to the audio hat in use, as I personally do not own or ever tested, but we can definitely troubleshoot that later as well if you're up for it.

                          Edit* Another thought regarding the audio hat, try increasing the Delay of IMP at B00T...
                          I'm guessing the audio hat has additional drivers/scripts being loaded at startup?
                          I wonder if IMP is starting playback before the audio hat is loaded.
                          Can you check the status of the # Current Playlist # after a Reboot?
                          If it's playing, you can try increasing the Delay.

                          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

                          H 2 Replies Last reply Reply Quote 0
                          • RapidEdwin08R RapidEdwin08 referenced this topic on
                          • H
                            hopwon @RapidEdwin08
                            last edited by hopwon

                            @RapidEdwin08 There is no startup.mp3 plays which makes me think delaying the start is a top suggestion.
                            It's a vanilla install and copied a few mp3 into the default folder as I did think that might have been an issue, but no.
                            Will dig into the issue tomorrow and feed back.
                            Thanks again!

                            1 Reply Last reply Reply Quote 0
                            • H
                              hopwon @RapidEdwin08
                              last edited by hopwon

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

                              @hopwon You can check the IMP Output log file right after a Reboot before you Press anything IMP Related in ES.

                              /dev/shm/current-playlist
                              

                              You can also check the actual Playlist Files to confirm the Path to MP3s is correct.
                              (NOTE: the current-track Log file in this Location is only used when LITE Mode is DISABLED)

                              /opt/retropie/configs/imp/playlist
                              

                              Are you able to get Music playing at B00T at all?
                              Tried any other Settings with BGM Disabled?
                              Do you hear the startup.mp3 Play at B00T?
                              Trying to determine if the issue isolated to BGM settings, Audio device, or the Music Files themselves...

                              Are you sure ALL the songs in the BGM Folder play?
                              One known issue is that any File with a Double-Space will not play with mpg123 Issue#4
                              Another known issue is with Files that have no metadata mentioned Here.

                              The "unable to get current volume" is an issue with IMP Not being able to detect the audio device properly at FADE.
                              You can Disable FADE for now to get rid of the message
                              May be related to the audio hat in use, as I personally do not own or ever tested, but we can definitely troubleshoot that later as well if you're up for it.

                              Edit* Another thought regarding the audio hat, try increasing the Delay of IMP at B00T...
                              I'm guessing the audio hat has additional drivers/scripts being loaded at startup?
                              I wonder if IMP is starting playback before the audio hat is loaded.
                              Can you check the status of the # Current Playlist # after a Reboot?
                              If it's playing, you can try increasing the Delay.

                              @RapidEdwin08 Check the following:

                              IMP Output post boot:

                              pi@SpaceInvader:~ $ uptime
                              10:33:13 up 0 min,  2 users,  load average: 1.01, 0.35, 0.12
                              pi@SpaceInvader:~ $ cat /dev/shm/current-playlist
                              cat: /dev/shm/current-playlist: No such file or directory
                              

                              Red Flag?

                              pi@SpaceInvader:/opt/retropie/configs/imp/playlist $ cat current-track 
                              High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
                              	version 1.25.10; written and copyright by Michael Hipp and others
                              	free software (LGPL) without any warranty but with best wishes
                              Decoder: generic
                              Trying output module: alsa, device: <nil>
                              
                              Directory: /home/pi/RetroPie/retropiemenu/imp/music/bgm/A-SIDE/
                              Playing MPEG stream 1 of 1: 08 - Confusion [Alternate Version] [Instrumental].mp3 ...
                              
                              MPEG 1.0 L III cbr320 44100 stereo
                              
                              Title:   Confusion [Alternate Version] [Instrumental]
                              Artist:  New Order
                              Comment:                             
                              Album:   Power, Corruption & Lies [Collector's Edition] Disc 2
                              Year:    2008                            Genre:  Alternative                   
                              > 04864+12622  02:07.05+05:29.72 --- 005=005 320 kb/s 1045 B acc    0 clip p+0.000
                              > 0000+0000  00:00.
                              
                              > 0000+0000  00:00.
                              
                              

                              No music playing at boot at all. I did put a 30 second delay in but no change

                              Listing of music directory:

                              pi@SpaceInvader:~/RetroPie/retropiemenu/imp/music/bgm/A-SIDE $ ls -l
                              total 253420
                              -rw-r--r-- 1 pi pi 12623967 Feb 14 18:36 '01 - Age of Consent.mp3'
                              -rw-r--r-- 1 pi pi 18104457 Feb 14 18:36 '01 - Blue Monday.mp3'
                              -rw-r--r-- 1 pi pi 16461878 Feb 14 18:37 '01 - Crystal.mp3'
                              ...... loads more
                              
                              

                              Lets forget the fade issue for now.
                              Regarding drivers for the hat, its included in the /boot/config.txt:

                              # Enable audio (loads snd_bcm2835)
                              #dtparam=audio=on
                              dtparam=audio=off
                              dtoverlay=hifiberry-amp
                              
                              

                              This is the correct config for this device, as I mentioned everything works as expected.

                              Current settings:

                              ,-------------------------------------------------------.               
                               | Music @Boot: ON  Delay: 030 |          LITE Mode: OFF | 
                               | startup.mp3: ON  @quit: ON  |      INFINITE Mode: ON  | 
                               | BGM A~SIDE:  ON B~SIDE: ON  |    Music OVER Game: OFF | 
                               | Shuffle Playlist @Boot: ON  | FADE Volume Out/In: x5  | 
                               | 0MXM0N:OFF  RANDOMIZER: BGM |    DELAY @Game End: OFF | 
                               | Volume%40 @Screensaver: VID |    Stop IMP @Sleep: ON  | 
                               `-------------------------------------------------------'  
                               http.server: [OFF] [http://192.168.1.85:8080] [STOPPED]
                               Music: /home/pi/RetroPie/retropiemenu/imp/music
                              
                              

                              My guess at this stage is that the audio driver is not loaded at startup, even with the 30 second delay.
                              More than happy to help troubleshoot/assist in making this work with you

                              H 1 Reply Last reply Reply Quote 0
                              • H hopwon referenced this topic on
                              • H
                                hopwon @hopwon
                                last edited by hopwon

                                @RapidEdwin08 Bit more info:

                                Running these from the cmd line:

                                bash /opt/retropie/configs/imp/boot.sh
                                
                                

                                Waits 30 seconds then starts playing music beautifully ,then gives me this error output:

                                sed: -e expression #1, char 0: no previous regular expression
                                sed: -e expression #1, char 0: no previous regular expression
                                sed: -e expression #1, char 0: no previous regular expression
                                pi@SpaceInvader:/opt/retropie/configs/all $ 
                                
                                pi@SpaceInvader:/opt/retropie/configs/all $ cat autostart.sh
                                #while pgrep omxplayer >/dev/null; do sleep 1; done
                                emulationstation --no-splash#auto
                                bash /opt/retropie/configs/imp/boot.sh > /dev/null 2>&1 & #auto
                                emulationstation #auto
                                
                                

                                Two ES entries, is this by design?

                                H RapidEdwin08R 2 Replies Last reply Reply Quote 0
                                • H
                                  hopwon @hopwon
                                  last edited by

                                  @RapidEdwin08
                                  Manually changed autostart.sh to

                                  #while pgrep omxplayer >/dev/null; do sleep 1; done
                                  bash /opt/retropie/configs/imp/boot.sh > /dev/null 2>&1 & #auto
                                  emulationstation --no-splash#auto
                                  
                                  

                                  And lo and behold it works! BGM happiness :)

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

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

                                    Two ES entries, is this by design?

                                    No, I'm pretty sure IMP added the Extra emulationstation #auto entry by mistake due to the installer not taking into account the emulationstation --no-splash#auto entry.
                                    Basically the autostart was loading Emulationstation Twice, and IMP was only set to start before the 2nd entry.
                                    In this state, if you were to Quit ES, it would have reloaded a 2nd time, this time with IMP playing.
                                    Glad you found this.

                                    There should be a backup named autostart.sh.b4imp
                                    Can you confirm the content of the Backup autostart.sh before IMP?
                                    I will try to update the installer to accommodate.

                                    cat /opt/retropie/configs/all/autostart.sh.b4imp
                                    

                                    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

                                    H 1 Reply Last reply Reply Quote 0
                                    • H
                                      hopwon @RapidEdwin08
                                      last edited by hopwon

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

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

                                      Two ES entries, is this by design?

                                      No, I'm pretty sure IMP added the Extra emulationstation #auto entry by mistake due to the installer not taking into account the emulationstation --no-splash#auto entry.
                                      Basically the autostart was loading Emulationstation Twice, and IMP was only set to start before the 2nd entry.
                                      In this state, if you were to Quit ES, it would have reloaded a 2nd time, this time with IMP playing.
                                      Glad you found this.

                                      There should be a backup named autostart.sh.b4imp
                                      Can you confirm the content of the Backup autostart.sh before IMP?
                                      I will try to update the installer to accommodate.

                                      cat /opt/retropie/configs/all/autostart.sh.b4imp
                                      

                                      Thanks for the Feedback

                                      Here you go:

                                      pi@SpaceInvader:/opt/retropie/configs/all $ cat autostart.sh.b4imp 
                                      #while pgrep omxplayer >/dev/null; do sleep 1; done
                                      emulationstation --no-splash#auto
                                      pi@SpaceInvader:/opt/retropie/configs/all $ 
                                      
                                      

                                      You are correct, I put the second ES line back in and tried what you suggested and indeed, when I quit ES, it restarted with BGM!

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

                                        @hopwon For the Fade issue...

                                        Are you able to Adjust/Retain Volume in ES Sound Settings?
                                        Or does the Volume setting get lost when you try to adjust from ES.
                                        If Volume does not retain, try to find the correct Combination of AudioDevice/AudioCard, then you can try to Enable Fade again in IMP and Test.

                                        If Volume is working fine and AudioDevice/AudioCard Settings are correct, can you confirm the output of these commands:

                                        cat /opt/retropie/configs/all/emulationstation/es_settings.cfg | grep "AudioCard"
                                        cat /opt/retropie/configs/all/emulationstation/es_settings.cfg | grep "AudioDevice"
                                        amixer | grep "Simple mixer control" | grep -v 'Capture'
                                        

                                        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

                                        H 1 Reply Last reply Reply Quote 0
                                        • buzzardbaitB
                                          buzzardbait @RapidEdwin08
                                          last edited by

                                          @RapidEdwin08 Took me a few days to get this tested. I ended up using the method from ~/imp/imp_setup.sh - selecting Add quit song option from the [PC/0ther] Utilities. And it did work!

                                          But before that, when I entered:

                                          cat /etc/systemd/system/impquit.service
                                          

                                          I did get this message returned:

                                          [Unit]
                                          Description=IMP Stop + Quit Song
                                          DefaultDependencies=no
                                          Conflicts=reboot.target power off.target halt.target shutdown.target
                                          After=network.target
                                          
                                          [Service]
                                          Type=oneshot
                                          RemainAfterExit=yes
                                          ExecStart=/bin/true
                                          ExecStop=/opt/retropie/configs/imp/impquit.sh
                                          
                                          [Install]
                                          WantedBy=multi-user.target
                                          

                                          I don't know enough to figure out what was going on from there, but if that's helpful, thought I'd pass it along.

                                          buzzardbaitB 1 Reply Last reply Reply Quote 0
                                          • H
                                            hopwon @RapidEdwin08
                                            last edited by

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

                                            @hopwon For the Fade issue...

                                            Are you able to Adjust/Retain Volume in ES Sound Settings?
                                            Or does the Volume setting get lost when you try to adjust from ES.
                                            If Volume does not retain, try to find the correct Combination of AudioDevice/AudioCard, then you can try to Enable Fade again in IMP and Test.

                                            If Volume is working fine and AudioDevice/AudioCard Settings are correct, can you confirm the output of these commands:

                                            cat /opt/retropie/configs/all/emulationstation/es_settings.cfg | grep "AudioCard"
                                            cat /opt/retropie/configs/all/emulationstation/es_settings.cfg | grep "AudioDevice"
                                            amixer | grep "Simple mixer control" | grep -v 'Capture'
                                            

                                            Hi, been away for a few days.
                                            The fade issue fixed itself once we worked out that that IMP was not starting due to the duplicate entries in autostart.sh.
                                            Everything is working perfectly now :)
                                            Massive thanks again for your time.

                                            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.