This is not exactly a project, but a skill builder which talks about how to generate simple to complex sounds with and without using a digital to analog converter. We all know, that to PWM is the best method without any hardware complexity to generate any analog voltage you want. However it might be really tough to program to generate a musical tone that sounds good to ear. A bit banging is the most simplest of sound you can generate by simply connecting the pin to a speaker, and driving the pin high and low continuously.
Another method is to use a R2R ladder network for converting digital to analog data and then driving the speaker through its output. However there are chances of noise in this method. Moving further, you will find different listings in the code given, that has codes of creating notes, morphing waveform. It even feature filter capabilities that adds ‘waa’ and ‘yeow’ to the end of the sound by using coefficients of a Low pass filter. The Arduino is Arduino Nano, but if you use Arduino Due you can clock it to run at a frequency of 84 MHz which will be 5 times as faster than Arduino Nano. However I feel that Arduino should not be used for such a complex task as there are waveform generators available at a reasonable cost.