Because of the frequent power outages here, I bought a cheap (in both senses) gasoline-powered generator a while back and connected it to my house via an inlet and utility interlock kit. It works about as you'd expect, but I notice that some LED lamps flicker and some motors make a buzzing noise when running on the generator. I had a bit of time on my hands today, so I thought I'd measure and compare my mains voltage waveform when powered by the utility vs. when powered by the generator.
This is residential split-phase 120/240 service; I was only looking at one 120 V leg of the service. The house load when I made the measurements was about 1200 W. Of that, approximately 900 W consisted of computer loads fed through double-conversion UPSes and the remaining 300 W were miscellaneous household items (about 80 W of incandescent decorative lights, plus LED lamps, clocks, wall warts, and so on).
First, the utility:

Not too bad, I think. The peaks of the sine wave look a little bit flattened, especially on the downward side. Maybe the rectifiers in my UPSes are contributing to that, or maybe it's normal with all the SMPSes that are around these days.
It looks like there are about 2 V (rms) at the 3rd harmonic, and about 3 V at the 5th. I do wonder what causes that; I guess I would have expected them to decline as the order increased.
Next, the generator:

Well, that's a bit less sinusoidal. Although, from just eyeballing the waveform, maybe not quite as bad as I had been expecting. It looks like there are about 22 V at the 3rd harmonic (I suppose that's where the buzz and flicker come from), 6 V at the 5th harmonic, 2 V at the 7th, and 5V at the 9th.
The generator being a four-stroke one-cylinder engine, I would imagine that some of the harmonics are caused by the momentary increase in the generator's rotational speed during the power stroke and momentary decrease during the compression stroke.
I haven't thought enough about how the windings on this generator are probably arranged to have a firm basis for this, but off the top of my head I can't think of an arrangement which avoid placing a varying torque on the engine during the rotation of the shaft. If correct, I imagine this would also contribute to the harmonics.
I do occasionally see advertisements for considerably more expensive non-inverter, single/split-phase, single-cylinder engine/generator sets which claim to have "clean" output and a low THD. I wonder how such generator sets accomplish that while still using single-cylinder engines and without the user of inverters.
Anyway, I just thought I would share these findings as they were somewhat interesting to me. Cheers!