AFAIK, while you can vary volume of a piezo somewhat by modifying duty cycle, it’s pretty limited, since a 50% duty cycle is where the piezo wants to be vibrating/oscillating. Depending on the frequency, you may get more or less ability to control volume by duty cycle, but overall, you probably won’t get the results you want.
To truly control volume, you need to vary voltage, which I don’t think is possible with the onboard piezo. You could certainly rig something up with an external piezo or speaker, though.
Apparently, if the other pin of the Piezo was connected to another PWM pin instead of GND, I could drive 2 PWM out of phase to create up to twice the volume and vary it. Not gonna mod the board though.
Thanks for the thoughts.
Maybe I will just cup my hand over it to vary volume like playing a harmonica.