Piano Program

tone is here just a variable, but please note there is also a tone() function - http://arduino.cc/en/Reference/tone -

With request to your output question:
What kind of speaker do you use?
You cannot just connect a 8 ohm speaker to any uProc.!

(just a check of code)
an A = 440 Hz ==> so the (micro) delay should indeed be about 1136 microseconds.