• 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.4k 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.
  • C
    Cjax08
    last edited by 12 Oct 2017, 14:23

    I’m curious how this works in a set up with video snaps. Will the music pause or fade out when you are previewing a game video in the game select list? Or will it play over it and I should just wait until this is ironed out?

    F 1 Reply Last reply 21 Oct 2017, 20:44 Reply Quote 1
    • S
      SSimmers
      last edited by SSimmers 13 Oct 2017, 00:23

      I believe I might've missed something or typo'd somewhere. RPI3 starts up and song starts in the 10 seconds. Go into game and when I exit said game, mpg123 does not continue at all. How do you go about editing this sort of thing? Thanks! ^.^'

      Edit: I had checked and found that "[[ $(tty) == "/dev/tty1" ]] && pkill mpg123" was typo'd and missing a "K" in pkill. However that didn't resolve the issue.

      J 1 Reply Last reply 13 Oct 2017, 00:42 Reply Quote 0
      • J
        jonnykesh @SSimmers
        last edited by jonnykesh 13 Oct 2017, 00:42

        @ssimmers In /opt/retropie/configs/all/runcommand-onstart.sh it should say:

        pkill -STOP mpg123
        

        In /opt/retropie/configs/all/runcommand-onend.shit should say:

        pkill -CONT mpg123
        
        S 1 Reply Last reply 13 Oct 2017, 00:45 Reply Quote 1
        • S
          SSimmers @jonnykesh
          last edited by 13 Oct 2017, 00:45

          @jonnykesh Awesome! That's exactly what it was. For whatever reason, I had "/pkill -CONT mpg123". No clue why I hit the forward slash the first time around. Thanks!

          J 1 Reply Last reply 13 Oct 2017, 00:46 Reply Quote 0
          • J
            jonnykesh @SSimmers
            last edited by 13 Oct 2017, 00:46

            @ssimmers Not a worry. Happy to help.

            1 Reply Last reply Reply Quote 0
            • F
              fnkngrv @Cjax08
              last edited by 21 Oct 2017, 20:44

              @cjax08 no, this still plays because it is an independent application running. What I have done to deal with this is I have re-encoded all the audio files that I use in my builds to be set at 50-60% gain. This allows for the audio of the video snap to come through clearly while you can still hear the bgm "behind" it for lack of better term.

              1 Reply Last reply Reply Quote 0
              • F
                fnkngrv
                last edited by 21 Oct 2017, 20:51

                anyone notice an issue where if you use the commands in bash script that music doesn't start up again when you go back into ES from terminal?

                1 Reply Last reply Reply Quote 0
                • C
                  COOL_IRON
                  last edited by 24 Oct 2017, 15:19

                  Is it possible to create custom launch file for specific rom that will not disable music?

                  C 1 Reply Last reply 24 Oct 2017, 15:29 Reply Quote 0
                  • C
                    cyperghost @COOL_IRON
                    last edited by cyperghost 24 Oct 2017, 15:29

                    @cool_iron YES and NO

                    I created two bash files that Continous or Disable Background music by using USER MENU from runcommand. If you launch a ROM then the grey box apperas... Press a button and you enter the runcommand menu list. Now you can enable/disable Background music by using User Menu item.
                    Take a look here and add a exit 2as last line!

                    The way I descripe is not 100% the method you asked here - it's a small workaround. Of course it is possible to add music for a specific ROM.... You can modify this code and add to runcommand-onstart.sh

                    C 1 Reply Last reply 30 Oct 2017, 11:15 Reply Quote 0
                    • M
                      monstergubl
                      last edited by 25 Oct 2017, 17:47

                      i have done all commands on the rp3 direct
                      my big problem is where is the folder that i was created , when i type in mkdir /home/pi/bgm it say to me the folder already exists. But i cannot find the Folder on my PC or USB ...

                      1 Reply Last reply Reply Quote 0
                      • C
                        COOL_IRON @cyperghost
                        last edited by COOL_IRON 30 Oct 2017, 11:15

                        @cyperghost I did not quite get it past the user menu step.
                        What should I do next? Can you explain this more please?
                        Maybe you could add some pictures?

                        C 1 Reply Last reply 30 Oct 2017, 17:48 Reply Quote 0
                        • C
                          cyperghost @COOL_IRON
                          last edited by cyperghost 11 Feb 2017, 18:25 30 Oct 2017, 17:48

                          @cool_iron
                          Add 2 bashfiles to dedicated folder descriped in the Wiki: runcommand functions
                          One with pkill mpg123 -STOP and the other with pkill mpg123 -CONT to User Menu. One file is called Stop BGM.SH the other is called Continue BGM.sh
                          Then you select one oft these files in User Menu and can manually enable or disable music. If you follow the link that I gave you to the bash script then you can automate the process by using a custom collection as trigger event.
                          But this needs some coding skill...

                          Feel free to ask ;)

                          C 1 Reply Last reply 6 Nov 2017, 08:56 Reply Quote 0
                          • C
                            COOL_IRON @cyperghost
                            last edited by 6 Nov 2017, 08:56

                            @cyperghost Oh, sorry, I didn't read the topic of this discussion :P
                            The problem is that I am using different method for background music. Is it possible to make this two .sh scripts woking with this method?

                            C 1 Reply Last reply 11 Nov 2017, 06:32 Reply Quote 0
                            • R
                              retroprogrammer
                              last edited by 9 Nov 2017, 07:47

                              This is a very good tutorial I have quiet a few tutorials to so check them out :)

                              [TUTORIAL]How to add draStic ds emulator and configure it and add ROMS with RetroPie-Manager
                              https://retropie.org.uk/forum/post/90803

                              [TUTORIAL]How to install kodi and add to main menu
                              https://retropie.org.uk/forum/post/90609

                              [TUTORIAL]How to install and use RetroPi-Manager
                              https://retropie.org.uk/forum/post/90596

                              Here is me converting the original Xbox for a case:
                              https://retropie.org.uk/forum/topic/15232/converting-original-xbox-into-case-for-raspberrypi/15
                              Check out my GitHub: https://github.com/retro-programmer

                              H 1 Reply Last reply 9 Nov 2017, 14:08 Reply Quote 1
                              • H
                                herb_fargus administrators @retroprogrammer
                                last edited by 9 Nov 2017, 14:08

                                @retroprogrammer please don't spam. The official docs are there for a reason

                                If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                                Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                                1 Reply Last reply Reply Quote 2
                                • C
                                  cyperghost @COOL_IRON
                                  last edited by cyperghost 11 Nov 2017, 06:51 11 Nov 2017, 06:32

                                  @cool_iron I think there is no problem to install mpg123 as background player just for in game music. This would be the easiest solution.... And if there are occouring problems you can easily remove it.
                                  As you use the python method the python code checks for process PID of a running emulator in background so it seems to be impossible without altering python code. But that's out of my class.


                                  EDIT:
                                  Maybe you can act like this!
                                  I think about a code like this ...

                                  Enable ingame BGM.sh

                                  #!/bin/bash
                                  # PSEUDOCODE!
                                  # DISABLE python check for running processes of emulators by pausing the python script!!!!
                                  # OMXPlayer will still run in background and will play music!
                                  pkill -STOP "python backgroundplayer"
                                  

                                  and by editing runcommand-onend.sh you always set the -CONT condition.


                                  But why don't you give the mpg123 no chance? Imho it is the easiest method for BGM but keep in mind that mpg123 is just a small player with a small bunch of command line arguments...

                                  @retroprogrammer Before spamming this thread you can ask @meleu if he want's to add your tuts into his Useful topics thread

                                  1 Reply Last reply Reply Quote 1
                                  • R
                                    retroprogrammer
                                    last edited by 12 Nov 2017, 06:11

                                    sorry for spamming guys just wanted to say that their are some other tutorials other sorry :(

                                    Here is me converting the original Xbox for a case:
                                    https://retropie.org.uk/forum/topic/15232/converting-original-xbox-into-case-for-raspberrypi/15
                                    Check out my GitHub: https://github.com/retro-programmer

                                    1 Reply Last reply Reply Quote 1
                                    • S
                                      Skyfire
                                      last edited by 18 Nov 2017, 15:10

                                      Having some issues after getting music playing in the background via this tutorial. On launch of any ROM I am getting an audiomanger error stating the device or resource is in use. Once the game loads I have no game audio.

                                      1 Reply Last reply Reply Quote 0
                                      • Z
                                        zerojay
                                        last edited by 27 Nov 2017, 00:08

                                        Created an alternative guide for using vgmplay instead of mpg123 to play directly emulated audio rips from game consoles and arcade machines. Much smaller file sizes than mp3s.

                                        https://retropie.org.uk/forum/topic/14682/quick-and-easy-guide-for-adding-emulated-music-to-emulationstation-on-retropie

                                        J 1 Reply Last reply 27 Nov 2017, 00:12 Reply Quote 1
                                        • J
                                          jonnykesh @zerojay
                                          last edited by 27 Nov 2017, 00:12

                                          @zerojay How much room does it save? For example a track I use is 1:39 and 2.4MB. Would this really save a significant amount of space?

                                          Z 1 Reply Last reply 27 Nov 2017, 00:22 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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received