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.
    • cyperghostC
      cyperghost @ExarKunIv
      last edited by

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

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

        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
        • cyperghostC
          cyperghost
          last edited by

          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

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

            cyperghostC 1 Reply Last reply Reply Quote 0
            • cyperghostC
              cyperghost @strunx
              last edited by cyperghost

              @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 Reply Quote 0
              • S
                strunx @cyperghost
                last edited by strunx

                @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) &

                cyperghostC 1 Reply Last reply Reply Quote 0
                • cyperghostC
                  cyperghost @strunx
                  last edited by cyperghost

                  @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 Reply Quote 0
                  • S
                    strunx @cyperghost
                    last edited by strunx

                    @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

                    cyperghostC 1 Reply Last reply Reply Quote 0
                    • cyperghostC
                      cyperghost @strunx
                      last edited by

                      @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 Reply Quote 0
                      • S
                        strunx @cyperghost
                        last edited by strunx

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

                        1 Reply Last reply Reply Quote 0
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • ExarKunIvE ExarKunIv referenced this topic on
                        • S
                          sleve_mcdichael @cyperghost
                          last edited by

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