This is a port of Per-Olov Jernberg's JS1K entry "1024 byte sequencer" ( http://js1k.com/2013-spring/details/1506 ) including the same song. The source code is somewhat longer.
It generates 44.1kHz audio and plays via winmm.
The song can be edited in song.inc using the same N and C helper functions as described in the JS1K entry.