Anesthesia control using midlatency auditory evoked potentials