Excellent work.
Are you trying to drive a speaker? It will be awfully quiet, you get at most 5V x 40mA = 200mW of power out. If you can connect to a powered speaker, like an amplified computer moniter speaker, the sound will be much more impressive.
Or you can build up your own amplifier, I have this circuit for my Arduino to drive with a Tone melody.
Is just a classic MOSFET AC amplifier, as found here: http://fourier.eng.hmc.edu/e84/lectures/ch4/node13.html

Only in this case, we are not worrying about trying to stay in any linear region, we are just letting the output swing peak to peak from the +12V supply ground. I only have it warble from between C6 & A5 a few times, sounds nice thru a high power 2.5" speaker. Plenty loud :-)
Ignore the 2nd RL resistor, I was playing with switching 2 resistors to make a hi/lo volume control. 68 ohm/34 ohm does not make much difference.
