Polyphonic music player

Doing it the hard way, my latest project can play polyphonic music with the Arduino, using only a speaker. It does this by alternating the notes quickly. Fairly simplistic, but my code (mangled by my blog software below) allows the user to write songs using a long string. For example, 'shave and a haircut' could be written as:

Ceg,e,geg#egerqb,eC,e

The notation is note, followed by duration (e=eighth note). Sharps (#) and stacattos (,) are also noted.

See the following for code:
http://ghofulpo.com/james/index.php/2011/12/30/2009/Arduino_music