diff --git a/play.sh b/play.sh new file mode 100644 index 0000000..9d5d52e --- /dev/null +++ b/play.sh @@ -0,0 +1,27 @@ +#!/data/data/com.termux/files/usr/bin/zsh +# +# Alarm Volume Increase Script +# +# This script plays an alarm sound with increasing volume using the mpv player. +# It iterates through different volume levels, starting from 20 and increasing by 10 until reaching 100. + +# Header information +# Created: 06.02.2024 +# Description: Script to play an alarm sound with increasing volume. + +# Loop to play the alarm sound with increasing volume +for ((volume = 20; volume <= 100; volume += 10)); do + echo "Current volume: $volume" + + # Terminate any previous mpv processes + /system/bin/pkill mpv + + # Start the new mpv process with the specified volume + /data/data/com.termux/files/usr/bin/mpv --replaygain=track --volume="$volume" /data/scripts/your-new-morning-alarm.ogg & + + # Wait for the completion of the current mpv process before starting the next one + wait +done + +# End of the script +