BGM Music mpg123 with fade in/out
-
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.
-
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
-
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...
-
@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..
-
@cyperghost thx for fast answering.
in emulationstation:
AudioCard: DEFAULT
Audio Device: PCM#!/bin/sh
home/pi/scripts/BGM_vol_fade.sh -stop#!/bin/sh
(sleep 2 && /home/pi/scripts/BGM_vol_fade.sh -cont) & -
@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 justbash 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!
-
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
-
@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. -
@cyperghost i will try it out ... thx for helping so fast
-
-
-
-
-
-
-
-
@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?
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.