Just a quick note that an article I helped research and contribute to, “PC Speaker Music: An Introduction“, is now online over at Shiru’s 1-bit Music News blog. The article covers many different ways to coax something more out of the PC speaker than a simple beep, with a focus on music creation. The article does not go into deep technical depth, but it provides a lot of program links, screenshots, and music samples.
You may want to poke around 1-bit Music News for some previous entries; the entire blog is dedicated to creating polyphonic music with only a single speaker interface and no hardware other than the ability to pulse the speaker on and off at various intervals. This leads to, no surprise, a lot of pulse waveforms. The predominant platform for exploring this is the ZX Spectrum, where the technique was made popular through some of the amazing compositions of Tim Follin. Some of the music can be slightly harsh and/or an acquired taste, but others are respectful of the platform and composed specifically for it. Just remember to turn down your speakers before listening to an example.