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

    How To Add Background MUSIC In Just 5 Commands!

    Scheduled Pinned Locked Moved Projects and Themes
    backgroundmusicretropie
    17 Posts 12 Posters 11.2k 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.
    • I
      installtekz
      last edited by installtekz

      So it took a while to create the script and everything and I also ran out of time for this project but here it is.

      How to add background music with just 5 commands.

      I have a script on my site that once downloaded and ran, it will setup the music with some options such as adult music on/off, manual on/off, boot-up with music on/off and also playing music over the games.

      https://installtekz.com/how-to-add-music-to-retropie-on-a-raspberry-pi/

      I hope to return to this project in the future for improvements if needed.

      #music #retropie

      C RapidEdwin08R ClassicGMRC T 5 Replies Last reply Reply Quote 2
      • C
        crawsome @installtekz
        last edited by

        @installtekz Any thoughts on adding a track-skip option to the menu? Maybe uploading to Github? Thanks! I love the tutorial and the work you did!

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

          @installtekz Thank You for all your work on this script.
          I installed on RetroPie v4.7.1 and it works flawlessly.

          For a "track-skip" Option, here's what I'm using for a Script 'Music Next Track.sh':

          #!/bin/bash
          pkill -KILL mpg123
          mpg123 -z /home/pi/RetroPie/music/*.mp3 &> /dev/null &
          exit 0

          Also, I wanted more visibility after changing Settings, so I'm calling your 'info.sh' after any scripts that modify the settings.
          Example of 'Startup With Music On.sh' calling your info script after :

          #!/bin/bash
          echo "1" > /home/pi/music_settings/onoff.flag
          BGM="/home/pi/RetroPie/retropiemenu"
          bash $BGM/info.sh
          exit 0

          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
          • ClassicGMRC
            ClassicGMR @installtekz
            last edited by

            @installtekz said in How To Add Background MUSIC In Just 5 Commands!:

            #music #retropie

            Just... wow. I tried a few different things to do what this does. I can't believe this is the first time I have found this particular thread considering how often I searched for BG Music for RetroPie!!

            I installed it just 10 minutes ago on a PiCade running Buster 4.7.16 I think. (It's fully updated as of this post). Works FLAWLESSLY with the Arcade Ambience MP3s.

            Thank you!

            Growing older is mandatory. Growing up is optional!
            Enjoy the ride!

            1 Reply Last reply Reply Quote 0
            • ExarKunIvE ExarKunIv referenced this topic on
            • ExarKunIvE ExarKunIv referenced this topic on
            • ExarKunIvE ExarKunIv referenced this topic on
            • ExarKunIvE ExarKunIv referenced this topic on
            • ExarKunIvE ExarKunIv referenced this topic on
            • ExarKunIvE ExarKunIv referenced this topic on
            • C
              chieferebus
              last edited by

              Just a heads up for people who are using a vertical screen setup through the Pi. This, unfortunately, broke the code and defaulted my screen to horizontal. I'd recommend backing up first before attempting this. There could be a way to revert the changes through the code, but for my case I'm just going to look up other alternatives.

              1 Reply Last reply Reply Quote 0
              • ExarKunIvE ExarKunIv referenced this topic on
              • T
                Turrican2k @installtekz
                last edited by

                Unfortunately this link is offline.

                1 Reply Last reply Reply Quote 0
                • ClassicGMRC
                  ClassicGMR @installtekz
                  last edited by

                  @installtekz said in How To Add Background MUSIC In Just 5 Commands!:

                  https://installtekz.com/how-to-add-music-to-retropie-on-a-raspberry-pi/

                  @Turrican2k said in How To Add Background MUSIC In Just 5 Commands!:

                  Unfortunately this link is offline.

                  I just tried it. It seems to be up.

                  Growing older is mandatory. Growing up is optional!
                  Enjoy the ride!

                  1 Reply Last reply Reply Quote 0
                  • G
                    Georodin 0
                    last edited by Georodin 0

                    EDIT
                    I fixed it, the runcommand-onstart.sh was somehow missing and then when I recreated it, I accidently used Windows EOL. So I did chmod +x and change to unix EOL. Works again :)
                    EDIT-END

                    Hey guys,
                    I have the problem that the music wont stop anymore when starting a game.
                    I also recognized that I only had the runcommand-onstart.sh.orig but the runcommand-onstart.sh was misssing in /opt/retropie/configs/all/.
                    So I created it again. But how and where is the runcommand-onstart.sh called? So maybe there lies the problem.

                    Anyway thanks in advance :)

                    1 Reply Last reply Reply Quote 0
                    • V
                      vXDclutch
                      last edited by

                      I had setup this earlier
                      Now I want to remove this , how do I ?

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        sleve_mcdichael @vXDclutch
                        last edited by sleve_mcdichael

                        @vXDclutch it looks like you're meant to run the script and select "(U)ndo changes". This will attempt to restore the original autostart & runcommand scripts, the original retropiemenu entries, and remove the music scriptfiles and directories.

                        1 Reply Last reply Reply Quote 0
                        • W
                          wtstreetglow1
                          last edited by

                          @installtekz This all works great!!! Thank you all for your sharing and how to mod, @RapidEdwin08, to the original submission/ idea!!

                          S 1 Reply Last reply Reply Quote 0
                          • W wtstreetglow1 referenced this topic on
                          • S
                            StuMcBill @wtstreetglow1
                            last edited by

                            @wtstreetglow1

                            I’ve just installed this and it’s working great. One question I have is, is it possible to control the volume of this?

                            I’ve put in an mp3 of ambient arcade sounds, and it’s very loud compared to my actual game.

                            I’d like to drop the background volume, and boost the in game volume if possible?

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

                              @StuMcBill probably not for this one. I know others allow you too.

                              I didn't like that lack of abilitys in this one. So I stopped using it.

                              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 .

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                StuMcBill @ExarKunIv
                                last edited by

                                @ExarKunIv said in How To Add Background MUSIC In Just 5 Commands!:

                                @StuMcBill probably not for this one. I know others allow you too.

                                I didn't like that lack of abilitys in this one. So I stopped using it.

                                Could you point me in the direction of ones that have the ability?

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

                                  @StuMcBill

                                  https://retropie.org.uk/forum/topic/31580/suggestions-for-ports-2?_=1700767814325

                                  My first post has a list of all the different ones that work

                                  https://github.com/Exarkuniv/RetroPie_BGM_Player

                                  Is the one that I have used and it has good options. I believe volume is one of them.

                                  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 .

                                  S W 2 Replies Last reply Reply Quote 0
                                  • S
                                    StuMcBill @ExarKunIv
                                    last edited by

                                    @ExarKunIv said in How To Add Background MUSIC In Just 5 Commands!:

                                    @StuMcBill

                                    https://retropie.org.uk/forum/topic/31580/suggestions-for-ports-2?_=1700767814325

                                    My first post has a list of all the different ones that work

                                    https://github.com/Exarkuniv/RetroPie_BGM_Player

                                    Is the one that I have used and it has good options. I believe volume is one of them.

                                    Nice one, thanks!

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      wtstreetglow1 @ExarKunIv
                                      last edited by

                                      @ExarKunIv Thank you for this post!! Agreed about the lack of volume control!

                                      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.