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

BGM Music mpg123 with fade in/out

Scheduled Pinned Locked Moved Ideas and Development
cyperghostbgmbgm playercontrol
15 Posts 4 Posters 4.0k 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
    ExarKunIv
    last edited by 1 Nov 2018, 13:17

    will this work for retropie on the Pi3 or is it just for ORA/XU4?

    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 .

    C 1 Reply Last reply 1 Nov 2018, 15:13 Reply Quote 0
    • C
      cyperghost @ExarKunIv
      last edited by 1 Nov 2018, 15:13

      @ExarKunIv It's just tested on a Raspberry.
      I think for Odroid there should be a change in the channel-Volume and you need to install the volume mixer device..... I think XU4 uses pulseaudio so the mixer device is annother one.

      1 Reply Last reply Reply Quote 0
      • E
        ExarKunIv
        last edited by 1 Nov 2018, 16:10

        ok thanks

        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 .

        C 1 Reply Last reply 2 Nov 2018, 17:17 Reply Quote 0
        • C
          cyperghost @ExarKunIv
          last edited by 2 Nov 2018, 17:17

          Did a nearly complete rewrite with some nice features. Please update from github!

          1 Reply Last reply Reply Quote 0
          • E
            ExarKunIv
            last edited by ExarKunIv 12 May 2018, 20:43 5 Dec 2018, 20:27

            question for the onend and onstart

            do we put your command before or after what will be in there to start with just to get the mpg123 working?

            UPDATE Never mind i got it to work now.

            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
            • C
              cyperghost
              last edited by 12 Feb 2019, 17:58

              I've updated the script a bit
              We can now use -stop and -cont parameter to force stoping and resuming music.

              Updated first topic to

              1 Reply Last reply Reply Quote 0
              • S
                strunx
                last edited by strunx 16 Aug 2019, 17:09

                hi,

                i tried to use this fade in/out script with the GPi Image from supremeteam (basic-image with mpg123 backgroundmusic, no roms and bios), but it didn't work. Something must be incompatible. I think it cannot be a difficult thing, but i am a noob at all. Can somebody help me please? I tried to change the VOLUMECHANNEL-variable in the fade-script to pcm.monocard, but not getting a fade with that...

                C 1 Reply Last reply 16 Aug 2019, 17:34 Reply Quote 0
                • C
                  cyperghost @strunx
                  last edited by cyperghost 16 Aug 2019, 17:34

                  @strunx yes you have to identify the audio channel at first - what name is showen in EmulationStation if you enter its sound menu? It should be next to the sound volume..

                  S 1 Reply Last reply 16 Aug 2019, 17:54 Reply Quote 0
                  • S
                    strunx @cyperghost
                    last edited by strunx 16 Aug 2019, 17:54

                    @cyperghost thx for fast answering.
                    in emulationstation:
                    AudioCard: DEFAULT
                    Audio Device: PCM

                    my runcommand-onstart.sh:

                    #!/bin/sh
                    home/pi/scripts/BGM_vol_fade.sh -stop

                    my runcommand-onend.sh:

                    #!/bin/sh
                    (sleep 2 && /home/pi/scripts/BGM_vol_fade.sh -cont) &

                    C 1 Reply Last reply 16 Aug 2019, 17:57 Reply Quote 0
                    • C
                      cyperghost @strunx
                      last edited by cyperghost 16 Aug 2019, 17:57

                      @strunx Do you know how to execute commands?

                      Try bash /path/to/your/script/BGM_vol_fade.sh
                      Or if the script is already in same directory you are working with then just bash BGM_vol_fade.sh

                      From your description it should work out of the box. Then write back what the error is.
                      How did you get the script? with wget command?
                      And is the script located to /home/pi/scripts?

                      PS: The Shebang thing (#!...) is not needed!

                      S 1 Reply Last reply 16 Aug 2019, 18:00 Reply Quote 0
                      • S
                        strunx @cyperghost
                        last edited by strunx 16 Aug 2019, 18:00

                        @cyperghost

                        result of bash BGM_vol_fade.sh:

                        amixer: Unable to find simple control 'pcm',0´

                        typing: amixer -> result:

                        Simple mixer control 'PCM',0
                        Capabilities: pvolume pvolume-joined pswitch pswitch-joined
                        Playback channels: Mono
                        Limits: Playback -10239 - 400
                        Mono: Playback -2046 [77%] [-20.46dB] [on]

                        script is located to /home/pi/scripts

                        C 1 Reply Last reply 16 Aug 2019, 18:08 Reply Quote 0
                        • C
                          cyperghost @strunx
                          last edited by 16 Aug 2019, 18:08

                          @strunx Well usually it should work .... I've no Pi0 at hand and can't really help now. Maybe reinstalling alsa-utils will help. I think that nobody can support here hence you are using a premade ROM and nobody knows which build this is and what "special" patches were set.

                          I personally think it's not a big deal. Maybe you could try MASTER as volume input.

                          S 1 Reply Last reply 16 Aug 2019, 18:09 Reply Quote 0
                          • S
                            strunx @cyperghost
                            last edited by strunx 16 Aug 2019, 18:09

                            @cyperghost i will try it out ... thx for helping so fast

                            1 Reply Last reply Reply Quote 0
                            • E ExarKunIv referenced this topic on 1 Nov 2021, 20:49
                            • E ExarKunIv referenced this topic on 3 Dec 2021, 15:04
                            • E ExarKunIv referenced this topic on 14 Dec 2021, 16:25
                            • E ExarKunIv referenced this topic on 4 Jan 2022, 17:59
                            • E ExarKunIv referenced this topic on 4 Jan 2022, 18:03
                            • E ExarKunIv referenced this topic on 4 Jan 2022, 18:04
                            • E ExarKunIv referenced this topic on 10 Jan 2022, 17:02
                            • S
                              sleve_mcdichael @cyperghost
                              last edited by 25 Jun 2022, 01:26

                              @cyperghost I have a working scriptmodule that installs mpg123 and sets up the background music automatically. May I have your blessing to include a modified version of this volume fade script (with credit) in the distribution?

                              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.

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