Simulating the waking and sleeping EEG.