waveform visualization for html canvas