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 332.6k 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.
    • Z
      zerojay @Livewire
      last edited by

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

      1. /home/pi/PyScripts/DisableMusic . If this location exists (either as a folder, OR as a file), the script will cease to play music. Once found, it waits 15 seconds before checking again, so after removing that file it may take up to 15 seconds for the script to resume playing music. Did this mostly because if you're disabling music, you're probably disabling it for a while, not just for 2 or 3 seconds, so why check it every second.

      This is a horrible idea. This means that if the file exists on an external hard drive, the hard drive will never spin down because it's constantly being accessed. This also bad if your pi does not have a constant power source.

      How about instead of looking for a file, it simply kills the script off and restarts it?

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

        To be truly honest, that I'm not actually sure how to do (without running an entirely separate script I mean, since there's not really a way to have a python script kill and restart itself at a later time that I know of). If you've got it running on an external HDD, I'd recommend not using 1.03 then.

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

          Hi. My English is very bad. Could you make a video tutorial? In this way, we would see how to do it and we would see progress.

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

            I followed step by step and it does not work. Version 3.7 Retropie in a Raspberry 3b. .mp3 and .ogg files. A video tutorial clarify everything. Thank you.

            1 Reply Last reply Reply Quote 0
            • cyberneticwiredC
              cyberneticwired
              last edited by

              I tried as well to no avail.

              1 Reply Last reply Reply Quote 0
              • N
                Nayin
                last edited by

                Hi! I need help, all works for me if I use in the console :

                sudo python /home/pi/PyScript/Test1.py

                But when I reboot the py, the music dont work.

                This is my /etc/rc.local file

                _IP=$(hostname -I) || true
                if [ "$_IP" ]; then
                printf "My IP address is %s\n" "$_IP"
                fi
                "(sudo python /home/pi/PyScript/Test1.py) &"
                exit 0

                N 1 Reply Last reply Reply Quote 0
                • N
                  Nayin @Nayin
                  last edited by

                  @Nayin Ok the problem are the "", sorry ah ah ah :P

                  1 Reply Last reply Reply Quote 0
                  • N
                    Nayin
                    last edited by

                    Music dont stop when I use the amiga emulator.
                    Can you help me?

                    1 Reply Last reply Reply Quote 0
                    • HoolyHooH
                      HoolyHoo
                      last edited by

                      Just add the Amiga emulator to line 25 in the script.

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        Nayin @HoolyHoo
                        last edited by

                        @HoolyHoo It is added by default, the same problem with pifba and it this also added :(

                        N 1 Reply Last reply Reply Quote 0
                        • N
                          Nayin @Nayin
                          last edited by

                          Ok the error is the "2", in uae4all2.
                          Delete the "2" in line 25 and works. Thx

                          1 Reply Last reply Reply Quote 0
                          • F
                            figolu31
                            last edited by figolu31

                            Amazing script, it work like a charm !!!
                            It's possible to configure buttons for activate and desactivate the script ??? or for configure a fast - rewind audio player ???
                            It would be amazing !!!!

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

                              Just wanted to say i love the BGmusic. works great every time and easy to tweak if need be

                              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
                              • M
                                manser87
                                last edited by

                                Oh boy... this sounds complicated. I was hoping for something a little more "pre packaged" lol. Setting up my raspberry pi with retropie and all my roms was a fun project but i also had google and some great youtube videos holding my hand in the process. Adding music to my pi would be the finishing touch to something i get excited to share with my friends everytime they come over. Ill try my best to wrap my head around this with my university of google.com education. I still hope for someone to simplify this as much as possible. I think a song selection in the emulationstation menu would be a great addition. Much like there is a theme selection built in.

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

                                  @manser87

                                  for the most part it is,

                                  he does a very good job of explaining what you have to do and how.
                                  Once you get a better handle on how to edit some of the files. this will be easy for you.

                                  it threw me for a loop for a min when the music did not cut for of the Emulators, but then looked and found where i needed to add 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 .

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

                                    @Livewire Works like a charm, except that it doesn't change to the ingame music when entering a game. The music stops and I have total silence :(

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

                                    1 Reply Last reply Reply Quote 0
                                    • fellegF
                                      felleg
                                      last edited by

                                      One strange thing is happening to me. For very specific songs, they are played at half speed for whatever reason. These songs include all music I tested from the Mario Kart 8 soundtrack, and the Melee 2 theme from Smash Bros for Wii U. I tried opening the song in Audacity and re-exporting them as mp3/ogg, and both attempts changed nothing.

                                      Anyone has an idea what is going on?

                                      ExarKunIvE 1 Reply Last reply Reply Quote 0
                                      • M
                                        manser87
                                        last edited by

                                        I did it!!! I'm so freaking excited! Thanks for this!

                                        1 Reply Last reply Reply Quote 0
                                        • _Who_Was_Phone__
                                          _Who_Was_Phone_
                                          last edited by _Who_Was_Phone_

                                          I've added "smw","supertux","cavestory" to my emulatornames= line, but only Cave Story is recognized. I suspect it's because it's a Retroarch core (lr-nxengine), rather than a standalone binary.

                                          Do I have the wrong process names for Super Mario War and Super Tux?

                                          Edit: I had everything right, I just needed to restart the Pi.

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

                                            @felleg dont know if this will fix it, but does any of the song have anything in the ID3 tags? if they do they clear them out.

                                            i had a problem with the Doom port seeing my MP3s before i cleared all the tag info.

                                            i dont know if it will help or not, just a thought

                                            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 .

                                            fellegF 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.