This is intended for musicians who want to see if they can continue playing locked into the rhythm of a backing track even if that supporting track drops out for a short while.
audio-gapper runs in an endless loop (exit with ctrl-c) and mutes
the master output after a configurable amount of seconds (default 20).
The silence lasts for a configurable time (default 4 seconds). The
output volume is restored and the loop restarts.
Just switching between muted and unmuted audio periodically might end up placing the silence at the exact same place in a looped song every time. To avoid this and to practice inner timing at different places of a song, a random amount of seconds can be added to the silence (default up to 4 seconds).
It's just a shell script. Put it somewhere (e.g. on your $PATH),
ensure that it is flagged executable and run it.
audio-gapper uses WirePlumber's wpctl command to mute and unmute
audio. If you happen to use a different sound system (jack, pulseaudio
etc.) you might need to adapt the calls in the mute and unmute
shell functions.
audio-gapper [unmuted seconds] [muted seconds] [max random seconds]
Type ctrl-C to exit.
Version 1.0 2026-04-17
License GPLv3
(C) 2026 Claus Brunzema
https://www.cbrunzema.de/software.html
https://github.com/replrep/audio-gapper