6.21 Please fix the waveform display artifacts...

GoldWave general discussions and community help
Post Reply
chrisjj
Posts: 115
Joined: Tue Feb 07, 2006 5:38 pm

6.21 Please fix the waveform display artifacts...

Post by chrisjj » Sat Jan 07, 2017 5:47 pm

... such as these:

Image

Oops, this forum cropped the image. Full: http://i.imgur.com/kZJMmRm.png

These dips to not exist in the waveform:

Image

Full: http://i.imgur.com/zzo8rzo.png

For a user doing precision work, such inaccuracies can lead to error, and waste time by requiring zoom in to check accuracy.

EDIT: Another example: This http://i.imgur.com/W2PNFmL.png clearbyl visible and also when zoomed out a little http://i.imgur.com/qYu4hBP.png ... then zoomed out further, gone: http://i.imgur.com/tzQ3EZU.png

chrisjj
Posts: 115
Joined: Tue Feb 07, 2006 5:38 pm

Re: 6.21 Please fix the waveform display artifacts...

Post by chrisjj » Mon Jan 16, 2017 11:20 am

EDIT: Another example:

Three spikes

Image

Zoom out loses #1

Image

Zoom out again restores #1 and loses #2 and #3

Image

Zoom out again loses all three

Image

DewDude420
Posts: 1164
Joined: Fri Mar 11, 2005 11:15 pm
Location: Washington DC Metro Area
Contact:

Re: 6.21 Please fix the waveform display artifacts...

Post by DewDude420 » Mon Jan 16, 2017 12:33 pm

Inaccuracies are to be expected when working at that zoom level. You're not looking at every sample, just an average.

DougDbug
Posts: 2036
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Re: 6.21 Please fix the waveform display artifacts...

Post by DougDbug » Mon Jan 16, 2017 12:36 pm

I was hoping Chris (the GoldWave Chris ;) ) could give you a more exact explanation, but in the 1st example I believe you're seeing aliasing, which is the result of downsampling without filtering. And, you have to downsample because there are not enough pixels to show all of the audio samples unless you zoom way-way in. In the case of the spike, again you're "running out of pixels" and it's probably just random that the particular spike-sample(s) got thrown away.

Since you can't possibly display all of the samples, the display is a compromise. You could show the peaks or the average, but that might not give you a good representation of the real waveform.

chrisjj
Posts: 115
Joined: Tue Feb 07, 2006 5:38 pm

Re: 6.21 Please fix the waveform display artifacts...

Post by chrisjj » Mon Jan 16, 2017 7:36 pm

DewDude420 wrote: You're not looking at every sample, just an average.
No, I'm not looking at an average.

GW isn't showing an average. If it were, I wouldn't have the problem.

I believe GW is just showing a pick of one the many sound samples that fall under that pixel column.

Tristan
Posts: 329
Joined: Mon Jun 01, 2009 8:20 pm
Location: Southeast Michigan

Re: 6.21 Please fix the waveform display artifacts...

Post by Tristan » Mon Jan 16, 2017 7:43 pm

chrissjj spent $45 of his hard-earned cash on GoldWave, dammit, and he expects results!
If I can read the manual, so can you.

GoldWave Inc.
Site Admin
Posts: 3903
Joined: Wed Mar 10, 2004 6:43 pm
Location: St. John's, NL
Contact:

Re: 6.21 Please fix the waveform display artifacts...

Post by GoldWave Inc. » Wed Feb 01, 2017 12:42 pm

To speed up drawing of the waveform, GoldWave may not scan every sample in the file. At higher zoom levels GoldWave scans only a limited number of samples relative to the pixel to be drawn.

If you were editing a 1 hour (44.1kHz) file zoomed all the way out, GoldWave would have to scan over 20,000 samples for every horizontal segment drawn (and almost 40 million samples in total) every time the waveform is redrawn.

The limit has been increased slightly in v6.25.

chrisjj
Posts: 115
Joined: Tue Feb 07, 2006 5:38 pm

Re: 6.21 Please fix the waveform display artifacts...

Post by chrisjj » Wed Feb 01, 2017 12:50 pm

GoldWave Inc. wrote:If you were editing a 1 hour (44.1kHz) file zoomed all the way out, GoldWave would have to scan over 20,000 samples for every horizontal segment drawn (and almost 40 million samples in total) every time the waveform is redrawn.
Not every time the waveform is redrawn. It would have to scan them all only once, then each that changed only once each change, and then a much less costly scan when zoom level changed.

GoldWave Inc.
Site Admin
Posts: 3903
Joined: Wed Mar 10, 2004 6:43 pm
Location: St. John's, NL
Contact:

Re: 6.21 Please fix the waveform display artifacts...

Post by GoldWave Inc. » Wed Feb 01, 2017 3:02 pm

Actually a 1 hour Wave file would have almost 160 million samples.

To get all the peaks information in a 1 hour Wave file would mean reading 640MB of data from the hard drive every time the file is opened and storing megabytes of peak data. Right now GoldWave reads less than 10MB from the hard drive to open and draw the file and does not require extra storage for the peak data. The only drawback is that not all peaks are visible until the user zooms in to about 1:1000 (or closer depending on the version of GoldWave being used). I can understand how that is a problem for your particular files, but scanning entire files and maintaining peak data is unnecessary for the vast majority of users. It requires far more storage and slows everything down due to the extra overhead.

Waffles
Posts: 8
Joined: Sat Oct 14, 2017 9:40 pm

Re: 6.21 Please fix the waveform display artifacts...

Post by Waffles » Sun Oct 15, 2017 12:23 am

Drawing to screen is a surprisingly cycle-expensive process.

I wrote a program that scans a directory looking for duplicate files. It does a byte-for-byte file comparison, and as soon as a non-matching byte is found it skips to the next file, but a matching file will be compared in its entirety. This turned out to be surprisingly fast when scanning tens of thousands of photos and videos, even when several large-video matches were found. (A lot of people seem to have the bad habit of copying their camera memory cards to random locations on their laptops multiple times and then are surprised when they get those out-of-space errors.)

A way to see that a process is progressing is nice to have, so next I added a textual progress display, something as simple as "Searching directory X, scanning file Y..." This slowed the program down to a crawl! I adjusted things so that the progress message was only updated after every 1000 files scanned, and the program got faster, but it was still slower then expected. I then made the progress message only update once every half second, which brought the process speed back much closer to the message-less version, even with all the extra number crunching needed for checking the elapsed time.

I once wrote a graphic editor that included a file preview. If the image was too large to fit in the small preview window, I scaled down the image. Drawing every overlapping pixel was a waste of processing, so I only drew the pixels that would show. For example, let's say the preview window as 100 pixels wide and I wanted to display an image that was 1200 wide. My program took the average visible pixel rate, in this case 12 (1200 divided by 100) and had the program only draw every 12th pixel. This worked much quicker than drawing the full image did.

I've always imagined that GoldWave's waveform drawing uses a similar principle when trying to display more samples than there are pixels on the screen, and it just made sense to think that when working with a large, zoomed-out waveform, GoldWave might be taking the average visible sample rate, say 8400, and only drawing lines between every 8400th sample for the sake of brevity.

Post Reply