Hi,
The finished project is
here but I believe TOF moved on to using a WAV file player for better results.
Certainly IMHO, using PWM is the way to go: It can operate in the "background" (whilst the program is doing something else) with potentially up to 4 channels ("tones") available at the same time. It may not even be necessary to use busby's trick (which potentially "wastes" two pins), because a
PWMOUT pin,256,512 can sound much louder than (say) a
PWMOUT pin,256,1 even though the fundamental frequency should be the same.
However, note that "square wave" sounds (as from a pWM output) can seem very "harsh", so a low pass filter may be beneficial. Personally, I would try a set different resistor values (perhaps in a ratio 1:2:4:8 or even greater) from different PWM output pins, "mixing" onto a single filter capacitor (and amplifier and/or sounder). That gives the potential for selecting different "cutoff" frequencies and/or multiple tones, etc.. But you may need a good "ear" and some persistence for successful results.
Cheers, Alan.