Wavesurfer.js: How to get peaks with recommended Audiowaveform program?

Created on 17 Mar 2017  路  4Comments  路  Source: katspaugh/wavesurfer.js

Hi.
I understand that loading prerendered image to load function requires an array of peaks, but cannot find out how to do it with recommended audiowaveform program. I get .png or .dat or whatever format, but don't know how to get peaks from these formats. Any advice?

Thanks for all the help.

question

Most helpful comment

I found the solution to my problem: In audiowaveform (bbc) program you get peaks data from 0-127. I normalized it (0-1 float ) and imported it into load function. Now it's working fine.

All 4 comments

@ognjiscar if you need to dynamicly generate the peaks data, you can use a server to generate it with php or even nodejs.

I found the solution to my problem: In audiowaveform (bbc) program you get peaks data from 0-127. I normalized it (0-1 float ) and imported it into load function. Now it's working fine.

@ognjiscar How did you normalize?

Divide all numbers with maximum number in the table.

Was this page helpful?
0 / 5 - 0 ratings