• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 323.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.
  • S
    saddys @Concat
    last edited by 31 Jul 2017, 08:05

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

    Hmmm terminal is spitting out "ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred" now.

    did u have find a solution for this problem? i have it too and the sound every X minute stop for 1/2 seconds and freeze the entire station . thanks

    1 Reply Last reply Reply Quote 0
    • topic:timeago-later,8 days
    • E
      ejeebs @synack
      last edited by 7 Aug 2017, 21:55

      @synack

      This works great!

      Unfortunately, ever since I did this, my ES doesn't start loading until after my splash video ends, when before it used to be up and running by the time the video was over.

      Is it possible that mpg123 is waiting to run until after the video ends, thus also delaying the startup of ES?

      1 Reply Last reply Reply Quote 0
      • T
        theWinterDojer
        last edited by 11 Aug 2017, 17:13

        Using @synack 's method, does anyone know of a way to play songs in order, like a playlist, instead of randomly?

        1 Reply Last reply Reply Quote 0
        • C
          CheatKode
          last edited by CheatKode 13 Aug 2017, 18:13

          Hi, I recently made a modification to Livewire's python script to support pausing music when video playback starts in a window or screensaver, if you have this feature is enabled on an es theme. Essentially, it will now detect the omxplayer video process and pause accordingly. I have also tested timers to ensure music stays paused when loading between videos to ensure music does not go on and off as you browse through games.

          I hope this proves helpful, CK

          Pastebin link - Kode's retropie_music.py

          E 1 Reply Last reply 14 Aug 2017, 14:30 Reply Quote 1
          • E
            ExarKunIv @CheatKode
            last edited by 14 Aug 2017, 14:30

            @cheatkode

            nice work.

            i dont have any vids yet, but it is nice to know that i will not have over lapping sound.

            thx for this

            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
            • V
              Vinc3Has3
              last edited by Vinc3Has3 16 Aug 2017, 22:50

              @synack I love the simplicity. It worked instantly!

              After tinkering for a bit, my preference was to have a new piece of music start when returning from a game, instead of picking up the previous song where it left off. I changed the (runcommand-onstart) to simply kill mpg123, instead of pausing, and the (runcommand-onend) to re-open mpg123 with the same parameters you used in the autostart. Now, when I exit a game a new random piece of game music begins (I downloaded a slew of game music rips). The transition seems smooth (I was afraid that re-starting the player might throw me out of the Emulationstation screen for a moment, but it's a clean return to the game list.

              Hopefully, I did it right - no smoke emanated from my Pi... =)

              EDIT - Of course, after looking at the thread again - you already mentioned how to do that earlier in the thread (duh). But, I suppose tinkering on my own is the way to learn, right?

              T 1 Reply Last reply 17 Aug 2017, 16:43 Reply Quote 2
              • T
                theWinterDojer @Vinc3Has3
                last edited by theWinterDojer 17 Aug 2017, 16:43

                @vinc3has3

                Someone suggested that earlier and he did provide an update somewhere for that, it's a very long thread. Maybe with your tinkering powers you can help me!

                Do you have any idea as how to play songs in order, like a playlist, as opposed to a randomly chosen song?

                1 Reply Last reply Reply Quote 0
                • L
                  Lumpeidi
                  last edited by 18 Aug 2017, 12:45

                  Hi,

                  This works all fine! Thx!
                  But i have a question.

                  I have many songs in the rome file.
                  Also i set a startsong for the first boot from ES.
                  This all works great.
                  Song play at start and than random music.

                  But i wanna have a second "startsong" who plays if i leave the game /emulator.

                  for example:

                  RPI3 boot -> ES Starts -> Startsong "A" plays -> after song, random music starts -> Start game -> exit game -> Startsong "B" plays -> after song, random music starts

                  can someone help me?

                  System:

                  RPI3
                  Retropie 4.2.16
                  
                  T 1 Reply Last reply 18 Aug 2017, 20:21 Reply Quote 0
                  • T
                    theWinterDojer @Lumpeidi
                    last edited by 18 Aug 2017, 20:21

                    @Lumpeidi

                    Is the startsong only for Livewire's method or Synack's? That's exactly what I've been looking for!

                    L E 2 Replies Last reply 19 Aug 2017, 16:49 Reply Quote 0
                    • L
                      Lumpeidi @theWinterDojer
                      last edited by 19 Aug 2017, 16:49

                      @thewinterdojer

                      I use this methode:

                      1 Reply Last reply Reply Quote 0
                      • E
                        ExarKunIv @theWinterDojer
                        last edited by 21 Aug 2017, 13:04

                        @thewinterdojer

                        i think @Livewire is the only have that has the ability to pick a start song

                        but i think both have the ability to start a new song when exiting a game.
                        i just dont think you can have a second pick song to start like @Lumpeidi is asking for, but maybe someone can find a way

                        i use livewire's so i know that it works.

                        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
                        • N
                          Nayin
                          last edited by 22 Aug 2017, 20:43

                          I am trying to add the amiberry emulator without success.
                          What is the exact name of "amiberry" to add in emulators line?
                          Thx!

                          N 1 Reply Last reply 28 Aug 2017, 19:38 Reply Quote 0
                          • H
                            Hankola @Livewire
                            last edited by 24 Aug 2017, 03:53

                            @livewire
                            Run "sudo nano /etc/rc.local"
                            This file should have a bunch of commented stuff at the top, and "exit 0;" near the bottom. Above exit 0, put the following code, replacing the path with where you installed the script to earlier: "(sudo python /home/pi/PyScripts/Test1.py) &". For full disclosure, the & at the end runs the script in the background, which is necessary as it will run infinitely until the system shuts down.
                            As before, press control+x, y, and enter to save changes.

                            When I try to run this my file is empty. Can I simply type it in as it is written in other posts or videos?

                            E 1 Reply Last reply 24 Aug 2017, 13:12 Reply Quote 0
                            • C
                              cyperghost
                              last edited by 24 Aug 2017, 05:26

                              Here we can toggle/restart music via @synack method

                              1 Reply Last reply Reply Quote 0
                              • H
                                Hankola @synack
                                last edited by 24 Aug 2017, 13:11

                                @synack I am having an issue of where I edit the bashrc. File...I mean where do I put the text info in this long line of stuff...and how do I save that?

                                E 1 Reply Last reply 24 Aug 2017, 13:14 Reply Quote 0
                                • E
                                  ExarKunIv @Hankola
                                  last edited by 24 Aug 2017, 13:12

                                  @hankola

                                  it cant be empty, if it is retropie will not run. you much be mistypeing something ( i do it all the time)

                                  just type sudo nano /etc/rc.local

                                  #
                                  # rc.local
                                  #
                                  # This script is executed at the end of each multiuser runlevel.
                                  # Make sure that the script will "exit 0" on success or any other
                                  # value on error.
                                  #
                                  # In order to enable or disable this script just change the execution
                                  # bits.
                                  #
                                  # By default this script does nothing.
                                  
                                  # Print the IP address
                                  _IP=$(hostname -I) || true
                                  if [ "$_IP" ]; then
                                    printf "My IP address is %s\n" "$_IP"
                                  fi
                                  
                                  sudo python /home/pi/scripts/fan.py &
                                  sudo python /home/pi/scripts/HID.py &
                                  
                                  sudo python /home/pi/scripts/shutdown.py &
                                  
                                  (sudo python /home/pi/scripts/BGmusic.py) &
                                  
                                  "/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --dbus disabled --detach-kernel-driver --id 0 --led 2 --deadzone 4000 --silent --trigger-as-button
                                  exit 0
                                  

                                  this is mine. so as you can see there is a lot of stuff even before i add the line for muisc.

                                  to answer your other question. yes if you type
                                  sudo python /home/pi/PyScripts/Test1.py
                                  it will start the script

                                  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 1
                                  • E
                                    ExarKunIv @Hankola
                                    last edited by 24 Aug 2017, 13:14

                                    @hankola

                                    your using livewire or synack method?

                                    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 .

                                    H 1 Reply Last reply 24 Aug 2017, 13:50 Reply Quote 1
                                    • H
                                      Hankola @ExarKunIv
                                      last edited by 24 Aug 2017, 13:50

                                      @exarkuniv trying to use whichever will give me desired results. Which do you recommend?

                                      E 1 Reply Last reply 24 Aug 2017, 14:06 Reply Quote 0
                                      • E
                                        ExarKunIv @Hankola
                                        last edited by 24 Aug 2017, 14:06

                                        @hankola

                                        depends on how you feel doing the coding.

                                        livewires give you more ability to edit the script.

                                        synack is easier to set and go.

                                        personally i use livewires i like how it fades the song better then it just ending

                                        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 .

                                        H 1 Reply Last reply 24 Aug 2017, 14:11 Reply Quote 1
                                        • H
                                          Hankola @ExarKunIv
                                          last edited by Hankola 24 Aug 2017, 14:11

                                          @exarkuniv
                                          depends on how you feel doing the coding.

                                          livewires give you more ability to edit the script.

                                          synack is easier to set and go.

                                          personally i use livewires i like how it fades the song better then it just ending

                                          Okay, I am super green. Synack method worked to start and stop the music great. But editing the bash file has me confused. When I follow his directions I do get a file, but it isn't like the other .sh files. There is not a command to save, nor any directions on where to add the file; I assume it's not a random placing.
                                          So far I can undo everything by editing the .sh files...
                                          I can't uninstall mpg123...no idea how, I would love the live wires method, but I have no idea how to get my .rclocal file to show up with something in it.

                                          E 1 Reply Last reply 24 Aug 2017, 14:14 Reply Quote 0
                                          265 out of 343
                                          • First post
                                            265/343
                                            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