The tutorial about automatically turning speakers on and off with mpd and the Raspberry Pi shows the basics of responding to mpd’s play, pause, and stop events. By design, that script reacts immediately when mpd’s state changes. This way it remains general and applicable to other situations as well, not just turning speakers on and off. There are, however, cases when you don’t want to act immediately. For example, when you pause the music to answer a phone call, it’s better not to turn speakers off immediately.
Automated speakers with mpd — how to tolerate pauses
Feb 27, 2014