PersonalBash2

alsamixer-fader

Smooth audio volume fading for ALSA on Linux.

linuxaudioalsaautomationbash

What it does

A simple bash script that smoothly fades audio volume up or down using ALSA’s amixer. Useful for media installations, alarm clocks, or any scenario where you want gradual volume transitions instead of abrupt changes.

Key features

  • Smooth fading: gradual volume transitions in 1% steps with configurable speed
  • Fade in/out: supports both directions
  • ALSA native: works directly with ALSA mixer controls, no PulseAudio required
  • Lightweight: pure bash, no dependencies beyond amixer

Usage

# Fade to 80%, 0.05 s between steps
./fade.sh 80 0.05

# Fade to 0% (mute), 0.1 s between steps
./fade.sh 0 0.1

Commonly used in museum installations for smooth audio transitions between exhibition states.