For those that wish to see what goes in and what comes out between
Class-D v Linear amplification which is closer to the original input, or
closer to "straight wire with gain" as what was the start of this
OK so here is the input, 1KHz
Test input:1khz perfect square wave
http://www.tronola.com/moorepage/Sine/1kHzsquare.jpg
But here we see a 10KHz waveform, which is difficult for many amplifiers. Imposed on top is the residual, which is about 250KHz, which is low by modern class D standards:
Output: Class-D:
https://www.stereophile.com/images/archivesart/406Halfig01.jpg
Note the scale on the left side of the image- its not there! There's no way to tell how strong this signal is, but the residual is a clue; its about 1/4 the total waveform amplitude. Since we don't know the power of the amp, we can't say how high this should be but if its 0.25 that would fit for an amplifier that makes 100 watts. If that is so, the amplitude here is half that of the waveform in the the next image, which is 1KHz instead of 10KHz!
Output:Linear Amp:
https://www.stereophile.com/images/archivesart/999A565fig2.jpg
George's attempt to put class D amps in a bad light on this account is debunked.
It appears instead there is an attempt to mislead people by a of slight of hand, which doesn't win street cred. The factor of 10 between 1KHz and 10KHz is pretty significant! In order to reproduce a 10KHz squarewave the amp needs bandwidth past 100KHz. That's hard for most amplifiers, tube, solid state or class D.
George, if you want to show how class D falls right flat on its face, show a 10KHz input waveform and the same 10KHz output waveform **at the same amplitude** of two example amplifiers. Make sure the outputs are shown at the same amplitude as well. Doing what you've done here is not just sloppy, its looks deceitful as well.