Electrical or magnetic fields oscillating at specific frequencies can modulate functions of ion channels in excitable cells. For example, an alternating current (AC) at a frequency that resonates with a particular type of ion channel can be applied to modulate conductance of the channel.