"back in the day"( 1979 or 1980 i think), Sony came out with an Application Note for one of their audio amplifiers. it was a real eyebrow raiser at the time
but it works and sounds extremely similar to what you're trying to accomplish. the app note said to take one of their larger (300W into 8Ω) amplifiers and simply wire a transformer and an AC outlet box to the speaker terminals. then input a sine wave from an oscillator to the amp. the volume control of the amp becomes your "variac" control, and the oscillator allows you to generate "line voltage" at whatever frequency you desire. you could do the same thing with a soundcard and a suitable amplifier. Sony's app note also suggested using the amp in bridge mode for 220V output.