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

Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!

Scheduled Pinned Locked Moved General Discussion and Gaming
musicbgmsynackguide
165 Posts 59 Posters 112.7k 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.
  • E
    Emerikant @cyperghost
    last edited by 3 Feb 2019, 08:27

    @cyperghost Thanks, new to all this, just saw it mentioned earlier in this post but was so long ago wasn't sure if anything had changed.

    1 Reply Last reply Reply Quote 0
    • N
      Naprosnia
      last edited by 8 Feb 2019, 19:20

      Hi everyone, i made a simple installer to implement mpg123, plus options menu on RetroPie settings menu to change volume and turn music on/off.
      Feel free to try it.
      https://github.com/Naprosnia/RetroPie_BGM_Player

      Tomorrow i will record a video to post on youtube, showing the installation steps and usage.

      N 1 Reply Last reply 10 Feb 2019, 13:54 Reply Quote 1
      • N
        Naprosnia @Naprosnia
        last edited by 10 Feb 2019, 13:54

        @Naprosnia said in Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!:

        Hi everyone, i made a simple installer to implement mpg123, plus options menu on RetroPie settings menu to change volume and turn music on/off.
        Feel free to try it.
        https://github.com/Naprosnia/RetroPie_BGM_Player

        Tomorrow i will record a video to post on youtube, showing the installation steps and usage.

        Installation video:

        C 1 Reply Last reply 10 Feb 2019, 14:15 Reply Quote 4
        • C
          cyperghost @Naprosnia
          last edited by cyperghost 2 Oct 2019, 16:39 10 Feb 2019, 14:15

          @Naprosnia Nice video and really noob friendly
          You are using tons of sudo commands and I would advise you to avoid the unneeded usage of these whenever possible. The idea with the volume is realy nice - sadly mpg123 does not support inline volume change.

          You can take a look at my RetroPie Shares scripts here. Everything starting with BGM has something to do with mpg123 and background music. There is a realtime Volumefading and a Music Selection scripts available. The selection topic includes some hints discovered during coding phase.

          N 1 Reply Last reply 13 Feb 2019, 07:37 Reply Quote 0
          • N
            Naprosnia @cyperghost
            last edited by 13 Feb 2019, 07:37

            @cyperghost Thanks for your feedback. Im rewriting all the code and applying your fade method (works like a charm, thanks), and add new settings (enable / disable fade; enable / disable "BGM stop" on emulator start [some people want their music playing while they play games] ). Now im using a settings file to save user choices, and reduce the number of files used, for a clear environment.
            Im trying to finish this today.

            If anyone has more ideas of new options that can be added please say.

            C 1 Reply Last reply 13 Feb 2019, 16:31 Reply Quote 0
            • W
              WarC0zes
              last edited by WarC0zes 13 Feb 2019, 11:05

              @Naprosnia

              Hi,
              I install your script, but I don't have the Background Music Settings option on RetroPie settings menu.
              Otherwise, how uninstalling your script.

              My config:
              pi3B
              Retropie 4.4.7
              Emulationstation 2.8.1rp

              RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

              N 1 Reply Last reply 13 Feb 2019, 13:00 Reply Quote 0
              • N
                Naprosnia @WarC0zes
                last edited by 13 Feb 2019, 13:00

                Hello @WarC0zes, when RetroPie and EmulationStation loads, press F4 to access command line, then,
                execute this code:

                sudo ls RetroPie/retropiemenu/
                
                • next, a list of files will appear, check if there is one called "Background Music Settings.sh"
                  • if yes, execute the following code to open Emulation Station again emulationstation press Enter
                    • next, inside Emulation Station press the button ("start") to access Main Menu, go to "OTHER SETTINGS" and check if "PARSE GAMELISTS ONLY" is set to ON, if it is, please put it to OFF and restart your system, and check if the Background Music Settings appear.
                  • If no, you can execute the following command on command line to disable BGM touch /home/pi/.bgmstop

                Please leave some feedback.

                1 Reply Last reply Reply Quote 0
                • W
                  WarC0zes
                  last edited by 13 Feb 2019, 14:00

                  @Naprosnia

                  You have solved my problem, I had the option "PARSE GAMELISTS ONLY" set to ON.
                  I put it to OFF and restart my system and I have the option now.
                  Thanks

                  sorry for my english.

                  RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

                  1 Reply Last reply Reply Quote 0
                  • C
                    cyperghost @Naprosnia
                    last edited by cyperghost 13 Feb 2019, 16:31

                    @Naprosnia said in Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!:

                    @cyperghost Thanks for your feedback. Im rewriting all the code and applying your fade method (works like a charm, thanks),

                    You're welcome, please add the link to the original code into your modification if you make heavy use of these scripts.

                    new settings (enable / disable fade; enable / disable "BGM stop" on emulator start [some people want their music playing while they play games] )

                    I would avoid such settings. Therefore we have the User Menu from runcommand. There you can select to enable BGM again and with exit 2 you finsh runcommand and load your ROM. I think this makes more sense.

                    Read here about the Runcommand menu

                    sudo ls RetroPie/retropiemenu/

                    There is really no need to execute scripts with root level. Your scripts need heavy code review to avoid right privilege errors.

                    Then make the code more lightweight. If there is a action you are doing again and again then use functions and loops.
                    A good example the the dowload of the config files -- Use an array with a loop
                    Or the download of the example music use the expression {1..7} to count from 1 till 7

                    1 Reply Last reply Reply Quote 0
                    • N
                      Naprosnia
                      last edited by 13 Feb 2019, 17:20

                      Hello @cyperghost , has I said, I'm rewriting everything from scratch. I'm trying to follow some of your tip, such as reduce sudo a lot.
                      I will certainly put your name and git link in the description of the scripts.

                      C 2 Replies Last reply 13 Feb 2019, 17:53 Reply Quote 1
                      • C
                        cyperghost @Naprosnia
                        last edited by cyperghost 13 Feb 2019, 17:53

                        @Naprosnia You are welcome
                        I will comment on your github account.

                        EDIT: Added my first comment as "issue"

                        1 Reply Last reply Reply Quote 0
                        • C
                          cyperghost @Naprosnia
                          last edited by cyperghost 14 Feb 2019, 17:08

                          @Naprosnia Added annother "Issue" for code cleanup ;) the second regards the volume control. This is a real interesting feature ;)
                          As long as your coding works for you it is okay. But look if you might change a path or a call you've to edit it 10x in your scripting. With my solution it's just one edit.
                          Issue #2
                          Issue #1

                          1 Reply Last reply Reply Quote 0
                          • N
                            Naprosnia
                            last edited by 17 Feb 2019, 20:10

                            New version released, now with fade effect , and possibility of listen your musics while playing games.
                            Special thanks to @cyperghost for the fade script!

                            Video:

                            C 1 Reply Last reply 17 Feb 2019, 21:01 Reply Quote 2
                            • C
                              cyperghost @Naprosnia
                              last edited by 17 Feb 2019, 21:01

                              @Naprosnia A nice set of scripts that will surly help less advanced users to quick install a mp3 BGM player. There is still room for improvements to the code but this looks much better now. You are heavily mixing shell and bash expressions together ... try to use one style.

                              Btw: for variables it is not needed to seperate them
                              like BGM=$PATH1"/more/pathes/"$PATH2
                              just use BGM="$PATH1/more/pathes/$PATH2" so you will avoid globbing even if it's very uncommon in every other programming language I know but you will appreciate this behaviour.

                              1 Reply Last reply Reply Quote 0
                              • J
                                johnholmes
                                last edited by 18 Feb 2019, 13:05

                                Thank you for this nice tutorial. Have followed all instructions and i will be glad now playing my favourite music in background.

                                1 Reply Last reply Reply Quote 0
                                • W
                                  WarC0zes
                                  last edited by 20 Feb 2019, 04:53

                                  @Naprosnia Nice update, I love it.

                                  RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

                                  1 Reply Last reply Reply Quote 0
                                  • W
                                    WarC0zes
                                    last edited by WarC0zes 20 Feb 2019, 09:03

                                    @Naprosnia After testing, when I start a game the music is cut and when I leave the game the music doesn't come back.

                                    My setting in emulationstation / Sound setting:
                                    Audio card = Default
                                    Audio device = PCM
                                    Enable navigation sounds = On
                                    Enable video audio = On
                                    Omx player audio device = Both

                                    RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

                                    B N 2 Replies Last reply 20 Feb 2019, 09:31 Reply Quote 0
                                    • B
                                      Brigane @WarC0zes
                                      last edited by 20 Feb 2019, 09:31

                                      @WarC0zes Are you using any kind of USB Sound card?

                                      I cannot elaborate what my problem is at the moment because I'm in school, but I have a similar problem with my setup and I think it has to do with the fact that I'm using 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
                                      • W
                                        WarC0zes
                                        last edited by 20 Feb 2019, 09:55

                                        @Brigane No, I don't use a USB sound card. I use that of the pi.

                                        RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

                                        1 Reply Last reply Reply Quote 0
                                        • N
                                          Naprosnia @WarC0zes
                                          last edited by 20 Feb 2019, 12:47

                                          @WarC0zes hello, i did a fresh installation on my system to check if it throw me the same problem, but no, it work normally.

                                          - First, i need you to install RetroPie BGM Player again, you can install it over the current installation (dont need to uninstall).
                                          [ Q. Why install again? A. Because, i have updated some code, and it could correct your problem. ]
                                          -- And check if you got the same problem.

                                          --- If yes:
                                          ---- I need to know if this occurs with fade effect, without fade effect or both.
                                          ---- I need you to check configs/all/ folder and check if you got this file-> runcommand-onend.sh
                                          ----- if yes, send me the code you find inside [if any] (you can open this file with any text editor).

                                          --- If no:
                                          ---- Nice.

                                          1 Reply Last reply Reply Quote 0
                                          110 out of 165
                                          • First post
                                            110/165
                                            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