need help with piezo project

Hi, I'm building a wire loop game, and could really need some help. I've created a melody with this code, and got it working fine with my piezo speaker. What I want to do, is to make the game play the music, but when you fail (the wires touch) it stops that song, and plays a buzzing sound. Then a reset switch to start over.

Really appreciate any help with this, David

Using the delay() function makes it impossible to do several things at once. (period)