tester wrote:should produce ideal pulse waves
The problem here is that when using a digital system there is not really any such thing as a perfect square wave.
A perfect square wave is made up of a series of harmonics that stretch all the way to infinity. But when using a sampled digital system, there is a maximum frequency (half the sample rate) that is the maximum you can generate.
Using a 0-1 'switching' system, all of the higher harmonics are still there - what happens to them is that they have their frequencies transformed into ones that your soundcard can
But those are not the right frequencies to make a good sounding square wave - they become nasty 'aliasing'. Aliasing is a horrible form of distortion because it has many frequencies that are not related to the pitch of your 'note', which sound out of tune (they go down when your note pitch goes up, for example).
The SM form of PWM does look rather complicated, I agree. But it is done that way because the saw oscillators used have had all of the 'too high' harmonics removed ('band-limited oscillators'). So the square wave produced also has no 'too high' harmonics.
Although the resulting square wave is not 'perfect' (if you look with the scope tool, you can see this) - it will sound much better, because it is not asking your soundcard to do the impossible thing of making frequencies more than half the sample rate.
It's a complex subject, and I doubt I have explained it very well - a quick google for 'aliasing' will find you many much better explanations.