Ok, so the function is already written for you.
Odds are good you'll be specifying a frequency.
Try 440 and compare the output to
http://upload.wikimedia.org/wikipedi...e_wave_440.ogg
Otherwise, just guess & check, then interpolate.
Google for sheet music, and map it to frequencies.
Then you can have the thing play Free Bird for 10 impressive minutes
