A Mini Piano

You need to look at the Tone example. From there you can see the it needs a certain library that has all the tones in it. Now once you understand how that example works, you can modify it to output a tone if a certain "pin" goes HIGH and go silent if the pin is LOW.

Also if your familiar with a normal piano, Do to Do is an octave, and there are also different scales that you can program into the code too, if you want to get fancy.