Player status to digital pins on beaglebone black

I have a beagle bone black running volumio and I want to have the status of whether or not there is anything playing read as a true false to a digital pin. So I can activate my amp. Any ideas?
Ps I am very new to Linux and BBB.