Waveform decoding and detection in hdEEG