0
0

I’ve build a waveform display that shows the visualisation of a stream using getWaveData.

Peak- and weakdata are being read at a specified interval and stored in an array. When I show it at 100%, it’s perfect.

For zooming out, I’m retreiving the peakdata from the array at a larger interval. For example: zoom out x2 means retreive every second peakvalue in the array.

Works great, but when the waveform is drawed, it looks like the peaks in the waveform are not displayed. I’m sure it’s because there’s less peakdata to show which causes it to look like there are more ‘gaps’ than peaks.

Does anybody have a good head-up on this one?

  • You must to post comments
0
0

what i do, is instead of skipping every second value, you take the ‘max’ of each value, so then you keep the peaks and dont skip data.

  • You must to post comments
0
0

I just did a test where I averaged the values. Seems to have the same result. What’s better?

  • You must to post comments
0
0

I’d go with brett’s suggestion.
Using the highest, or max, in comparison is better in my opinon. This way you guarantee displaying peaks as close to accurate as possible.
With an average value you’d be displaying ‘false’ information, especially if the averaged values differ much.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.