This function plays musical tunes. Write your own musical tune and call the function to play it.
[CDEFGAB] keys, 5 full octaves
 key/rest duration, with the default  semiquaver,  quaver,  crochet and  minim
[#] sharp / [b] flat / [.] rest / [^] raise octave / [_] lower octave
The musical scores for Canon in D (Pachelbel), Prelude No 1 (Bach), The Globe Trotter and Fantasie Impromptu (Chopin) are also attached.
Hi John, I've taken your advice and added some examples and included the notation (above) in the help of playtune.
28 Jun 2006
I do wish the author had included a bit more help with playtune. For example, the notation is described in the website description, but not in the help for playtune. (Please fix this!) I've rated it a 5 anyway.
20 Jun 2006
Edited the function for a more natural sounding tone.
21 Jun 2006
Added residual phase to generating signals.
22 Jun 2006
Added the musical score of Prelude No 1 by Bach.
27 Jun 2006
Enabled customizable tone generator; at the same time, set the lowest note to C(-2), i.e., two octaves below the middle C of the piano. Also added a new musical score "The Globe Trotter" which plays both right and left hands.