Changed waveform generating algorithm to use wav2png