First part of a waveform histogram

some features are missing, but in general it should be usable already.