If it's got a lot of harmonics, a low-pass, or series of notch filters, can help. Mind that a filter necessarily increases the mains impedance at the fundamental (intended) frequency (i.e., more change in voltage for a change in current, for any change: more droop under load, more peak overshoot when a load is suddenly switched off..).
A ferroresonant transformer isn't much help, because although it will clean up harmonics and stabilize voltage, it won't stabilize frequency; in fact, the reason it works in the first place is because it's a frequency-dependent output, and mains frequency is normally so stable that it can be used as a reference. Unless your generator has a really good speed control, I'm guessing this isn't going to cut it.
That leaves some kind of frequency converter, which basically means as much hardware as the generator is already (there are low-tech ways to change frequency, but they require a special motor-generator set), or rectifying it to DC and inverting it back to (clean) AC with a true-sine-wave inverter.
You're much better off just replacing the power supplies in your CNC with wide-input types. Typical switching supplies do 90-250VAC and don't care about frequency, as long as it's not so slow that power drops out between cycles. Maybe it already uses them and you're fretting over nothing?
Tim