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

    Background Music [Continued from Help/Support]

    Scheduled Pinned Locked Moved General Discussion and Gaming
    musicbgm
    343 Posts 109 Posters 328.9k 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.
    • B
      backstander @jerryb1
      last edited by

      @jerryb1

      Instead you hear your mp3 while game on.

      You could follow steps 1 and 2 of @synack alternative background music script (leave out steps 3, 4 and 5):
      https://retropie.org.uk/forum/topic/347/background-music-continued-from-help-support/43

      This will make it continually play random MP3s from the /home/pi/bgm/ directory...even when you're playing games.

      Recap of the directions (steps 1 and 2):

      1. Install mpg123

      sudo apt-get install mpg123

      1. Edit /opt/retropie/configs/all/autostart.sh and add this before EmulationStation is called;

      nano /opt/retropie/configs/all/autostart.sh

      while pgrep omxplayer >/dev/null; do sleep 1; done
      mpg123 -Z /home/pi/bgm/*.mp3 >/dev/null 2>&1 &
      emulationstation #auto
      
      1 Reply Last reply Reply Quote 0
      • K
        Kristopherson05
        last edited by

        Hey I was wondering if there's a way to skip a song or turn off the music (at a push of a button). It's not too important but would be great if I could. BTW, for some reason it doesn't play the full repertoire of songs and the script picks favorites, can I fix this somehow? Thanks

        1 Reply Last reply Reply Quote 0
        • R
          retronerd
          last edited by

          I have noticed that in FBA for example the in game music stops for a second and after that resumes in random games... Ive tried to unistall theBGM but its still there? anyone

          1 Reply Last reply Reply Quote 0
          • L
            Linkseo
            last edited by

            Hello and Thank you for the script its great.
            Just a little help though. It still plays while launching daphne and Nintendo DS emulator. I checked the script and saw that daphne was on there with the others and I added Nintendo DS but music still plays over those 2.
            Sorry in advance if this issue has been resolved in this thread and I missed it. I skimmed through the entire thing but didn't see it.
            Thanks

            1 Reply Last reply Reply Quote 0
            • J
              jman
              last edited by

              I'm having a problem with Daphne for some reason it's not seeing the emulator and the music continues to play. I checked the script and Daphne is on the list all of the other emulators work. Any help would be greatly appreciated.

              M M 2 Replies Last reply Reply Quote 1
              • anasazi29A
                anasazi29
                last edited by

                great work man! works perfectly. I really like it that it mutes or pauses the mp3 once I start playing a game.

                1 Reply Last reply Reply Quote 0
                • H
                  huettmaster
                  last edited by

                  hello,

                  i have the same problem that the music is still playing when i start the C64 vice emulator. in line 25 of the script it is listed. how can i solve the problem?

                  BriganeB 1 Reply Last reply Reply Quote 0
                  • BriganeB
                    Brigane @huettmaster
                    last edited by

                    @huettmaster Are you using any external devices such as a usb sound card?

                    Systems: Raspberry Pi 0/2/3 Model B+
                    Os: RetroPie 4.5
                    Frontend: Emulationstation & Attract Mode

                    1 Reply Last reply Reply Quote 0
                    • H
                      huettmaster
                      last edited by huettmaster

                      no. all roms and the music are located on the sd-scard...

                      1 Reply Last reply Reply Quote 0
                      • J
                        jman
                        last edited by

                        I am loading my roms off a usb stick so far pifba and daphne do not work the music just plays right through.

                        ExarKunIvE 1 Reply Last reply Reply Quote 0
                        • ExarKunIvE
                          ExarKunIv @jman
                          last edited by

                          @jman

                          it just might not work. i have come across the port of prince of persia the music plays right thought also.

                          you might want to look in to using what @synack posted for a different way. Im going to be giving it a try my self. I still like @Livewire version more, but for what ever reason when i have DraStic in the list. my controller stop working.

                          sucks but what can you do.

                          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 .

                          1 Reply Last reply Reply Quote 0
                          • johnboywJ
                            johnboyw
                            last edited by

                            I have followed everything and triple checked it. I still have no sound though. I have the pi 3 if that makes any difference?
                            Can anyone throw any pointers my way?

                            1 Reply Last reply Reply Quote 0
                            • S
                              samuel95_54 @Darby
                              last edited by

                              @Darby
                              try
                              sudo apt-get update
                              then
                              sudo apt-get install mpg123

                              Should work after the update.

                              johnboywJ 1 Reply Last reply Reply Quote 0
                              • johnboywJ
                                johnboyw @samuel95_54
                                last edited by

                                @samuel95_54 said in Background Music [Continued from Help/Support]:

                                @Darby
                                try
                                sudo apt-get update
                                then
                                sudo apt-get install mpg123

                                Should work after the update.

                                I have tried op way and also the mpg123 way. Neither give me sound. I know everything sound related is working as I can hear noises when I navigate around the emulator menus.

                                ExarKunIvE B 2 Replies Last reply Reply Quote 0
                                • ExarKunIvE
                                  ExarKunIv @johnboyw
                                  last edited by

                                  @johnboyw

                                  we need a little more info to help. do you have the commands in /rc.local correct if you are useing the op way

                                  and for mpg123 do you have all the commands for runcommand-onstart.sh and runcommand-onend.sh correct

                                  also where is your music folder?

                                  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 .

                                  johnboywJ 1 Reply Last reply Reply Quote 0
                                  • B
                                    backstander @johnboyw
                                    last edited by

                                    @johnboyw
                                    If you're using HDMI cable sound, try forcing HDMI audio out by adding hdmi_drive=2 to your /boot/config.txt then restart your RPi.

                                    Here's some more sound troubleshooting:
                                    https://github.com/RetroPie/RetroPie-Setup/wiki/Sound-Issues

                                    johnboywJ 1 Reply Last reply Reply Quote 0
                                    • johnboywJ
                                      johnboyw @ExarKunIv
                                      last edited by johnboyw

                                      @ExarKunIv said in Background Music [Continued from Help/Support]:

                                      @johnboyw

                                      we need a little more info to help. do you have the commands in /rc.local correct if you are useing the op way

                                      and for mpg123 do you have all the commands for runcommand-onstart.sh and runcommand-onend.sh correct

                                      also where is your musIc folder

                                      0_1490291515518_IMG_0510.JPG

                                      B 1 Reply Last reply Reply Quote 0
                                      • johnboywJ
                                        johnboyw @backstander
                                        last edited by

                                        @backstander said in Background Music [Continued from Help/Support]:

                                        @johnboyw
                                        If you're using HDMI cable sound, try forcing HDMI audio out by adding hdmi_drive=2 to your /boot/config.txt then restart your RPi.

                                        Here's some more sound troubleshooting:
                                        https://github.com/RetroPie/RetroPie-Setup/wiki/Sound-Issues

                                        I have sound just no music playing.

                                        ExarKunIvE 1 Reply Last reply Reply Quote 0
                                        • ExarKunIvE
                                          ExarKunIv @johnboyw
                                          last edited by

                                          @johnboyw

                                          did you edit the music.py at all?

                                          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 .

                                          johnboywJ 1 Reply Last reply Reply Quote 0
                                          • B
                                            backstander @johnboyw
                                            last edited by backstander

                                            @johnboyw
                                            Unless you have already edited your music.py script, you should move just your Music files to /home/pi/RetroPie/roms/music

                                            Or if you don't want to move your Music files, you could just edit your /home/pi/RetroPie/roms/music/Script/music.py script to point to the actual music directory you are using like this:

                                            musicdir = '/home/pi/RetroPie/roms/music/Script'
                                            
                                            johnboywJ 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.