A reimplementation of JHWaveformView, in Swift