Not necessarily ... the resulting waveform would be quite fine ... imagine a 25 Hz motor on one side turning a shaft connected to a
60 Hz alternator.One RPM from the motor is one RPM for the generator, and so forth. To the alternator, it doesn't care if it's a 25 Hz motor or steam turbine or gerbils on a wheel driving its shaft (as long as the speed is correct and kept reaasonably stable under various loads, of course).
And it's fairly easy to pick an RPM which is a nice common multiple of
25 and 60 so the math works out OK.Meanwhile, the alternator output frequency relates to the angular spacing of the windings and shaft speed.
The alternator would produce nice clean 60 Hz relatively free of higher order harmonics and other non-linear trash.