Seems like you could replace the switch with something electronic, you know, like a frequency generator.