Waveform.js PHP port