You can use pulse width modulation from a DC source, obviously, to power an AC motor by varying the length of the width of the pulse every time and using some circuit, generally an H-bridge, to quickly invert the voltage. Why this is not being used by more DIY'ers, I cannot be sure.
It's hard to see the bars here because they are not shaded, but the voltage is applied the longest at the peak of the curve. The AC motors will just see this as AC current because it is switched so quickly.
I had to program one of those systems using an MC9S12 micrprocessor as a sophomore in mechanical engineering; in other words, it's not difficult and someone must have it already made.
You get the advantage of the AC motor being well into the 90% efficiency range, where brushed DC motors are 75-80% often.