http://sk89q.therisenrealm.com/2008/11/dynamically-generating-a-wav-in-javascript/
This plays a song by generating (many) .wav files on-the-fly and playing them all through an EMBED tag linked by a data URI. No external files are used to play the song. You can save the source of this page and it will work anywhere you try it. Due to the length limit of data: URIs, multiple .wav files are used.