Added processWaveform method.