Control ac current

There are digital pots that will handle an AC signal. If the signal is truly AC (both above and below ground) you must supply it with a bipolar supply.