ajax script to get waveform data from server