OldSteve:
The A0 and 'analogRead()' stuff was due to bad advice in the first reply.
Indeed, I'm sorry, the 'buttonPinStatic' made me think it was some kind of alternative button to turn off the sound, and I wrongly assumed it was a sound level indicator with an analog output. My bad.
OldSteve's advice looks like the best solution.