Trying to program SOS sound with Piezo buzzer without using delay.

Grumpy_Mike:
he is trying to generate an SOS message automatically, initiated by pressing a button. No one gives a flying fig how long the button is pressed for, just that once it is pressed the message is produced.

That is exactly what I wrote.