Push button code

Hi, I'm still a newbie on Arduino :frowning: . I didn't know if anyone knows a simple code that can allow a push-button to be pushed and can be held down and makes a single note play from a buzzer for a few seconds. The button will then have to be released and pushed again in order for that same note to be played again for a few seconds. I was going to try and build upon it and experiment with it once I found a simple code.

There is an example in the IDE ‘State Change Detection’ that you should learn about: