It's pretty much just a binary thing. The square waves are the bits. My father did not want to belief me when I told him that you could create a sawtooth with square waves, each one with the double frequency and half the volume of the previous one. I was completely sure, since that's pretty much just a binary thing, the square wave with the lowest frequency is the MSB, and in the binary system each bit has half the influence (= volume) on the final result and changes its value with double the speed then the previous one. So we tried it with his Korg Monopoly and a sound card oscilloscope program. This project should painfully remind him how wrong he was.
Yes, that orange "sawtooth" is just made with a few lines. I was lazy, but I also wanted the performance to be nice. Update: Now you can choose where the square wave is located with the add mode.