Waveform antialiasing

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
rambomhtri
Posts: 230
Joined: Thu Jan 02, 2014 11:05 am
Operating System: Windows 8 or 8.1

Re: Waveform antialiasing

Post by rambomhtri » Sun Aug 09, 2015 6:55 pm

steve wrote:
rambomhtri wrote:This one may be looks cool because of the colors and that, but I think it's less clear and quite more confusing than a monochromatic single and simple waveform:
I agree that it "looks cool", but what do the different color shades mean?

In the current waveform display...

Image

the light blue color within the darker blue waveform indicates the RMS level of the waveform.
Oh, I don't know, it's just a random picture, it's just there to illustrate what could an Audacity's waveform could become to.

You know, the actual point of all of this is screen resolution. We don't need anti-aliasing to make up bars and stuff. We need 8K displays in 15.6", and 16K displays in bigger screens. The problem is that we can still actually see a single pixel. We need much more density of pixels so we can draw in our screens perfectly smooth pictures and waveforms. But for that, we gotta wait 'till 2025 or so.

h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Re: Waveform antialiasing

Post by h-h » Mon Aug 10, 2015 1:04 am

In case someone believes rambomhtri's arguments against antialiasing I want to clarify it.
rambomhtri wrote:Excuse me if I'm wrong, but what you used right there is NOT anti-aliasing, or at least that's not a good anti-aliasing, cause you're adding quite a lot more bars than the original picture.
It was the best picture of a somewhat smooth waveform I could find.
rambomhtri wrote:Anti-aliasing never adds more information, it just blurs the image so it looks smoother. Blur is not always desired, specially if you are looking for precision, and I want precision in Audacity. ... I want the original waveform, as closest to the reality as it can be. And personally, I don't like anti-aliasing, it looks weird.
Maybe you should read about so called subpixels. Imagine a circle is drawn. The perfect circle in theory that is looked upon by the drawing algorithm dictates, e.g., that a pixel at some point is covered to 39 % by the circle. Because a pixel is the smallest unit to display something the information gets translated into an opacity value for the whole pixel in the range from, e.g., 0 to 255. That's definetly more information about the perfect circle in theory than just an on and off status of the pixels to represent the circle! It's no blurring! I would say antialiased rendering is always more precise than "monochrome" rendering.
rambomhtri wrote:This one may be looks cool because of the colors and that, but I think it's less clear and quite more confusing than a monochromatic single and simple waveform.
I don't propose more than two colors of a waveform. My suggestion would reduce the colors of a waveform to only one, but with many different "opacity values" according to the data. At's all about a better view of the data itself.
Last edited by h-h on Fri Aug 14, 2015 6:53 am, edited 1 time in total.

rambomhtri
Posts: 230
Joined: Thu Jan 02, 2014 11:05 am
Operating System: Windows 8 or 8.1

Re: Waveform antialiasing

Post by rambomhtri » Mon Aug 10, 2015 2:09 am

Wrong, anti aliasing is a visual effect that blurs the image. That's a fact:
Image

See?
A monochromatic line becomes a blurred image, with different opacity pixels that the effect is actually making up. The closest draw to the reality is the one that has no effects added. If it looks jaggy, it's because your display is not good enough to represent a decent draw of the line. The only cure is add more resolution, that actually uses the original information.

Blurry images are actually playing with opacity values around jaggy borders and lines.

You have a yellow circle with a black line around it. You only have two colors. This image shows that when anti-aliasing is applied, you're making up tones of yellow and black:
Image

You may want that because is prettier and that, but it's not original information. You wanna enhance the image and jaggy edges, then you gotta add resolution, that's the only way. You are viewing data "better", and that's subjective, at the cost of making up data.

Another example is interpolation, which is almost the same as anti-aliasing, or at least works pretty the same:
Image
Image

You may want that when watching videos or playing videogames, but when "working" with "precision" waveforms, it's just about making up information it's not there. For example, if there's a very short silence, you may end up with a smooth curve that looks nice but is a lie, while in reality, you have a one pixel column that is not filled with any color.

h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Re: Waveform antialiasing

Post by h-h » Mon Aug 10, 2015 2:40 pm

rambomhtri wrote:Wrong, anti aliasing is a visual effect that blurs the image. That's a fact:
Image

See?
A monochromatic line becomes a blurred image, with different opacity pixels that the effect is actually making up. The closest draw to the reality is the one that has no effects added. ... You may want that because is prettier and that, but it's not original information.
I find information on the internet that also distinguishes between antialiasing and blurring. I've already answered the issue with "the closest to reality". Antialiasing is not an "effect", it's a kind of rendering that manifests information only available by looking on "the perfect circle in theory". Thereby no information is artificially made up. It's not less accurate than a "monochrome" rendering with less manifestations of the circle in theory by means of less shades.
rambomhtri wrote:You may want that when watching videos or playing videogames, but when "working" with "precision" waveforms, it's just about making up information it's not there. For example, if there's a very short silence, you may end up with a smooth curve that looks nice but is a lie, while in reality, you have a one pixel column that is not filled with any color.
I can somehow understand your point of view that there are cases were some information could be made up at a zoom level where you can't see the individual samples. But I don't propose that kind of rendering. I propose applying per-pixel opacity values according to the data.
Last edited by h-h on Fri Aug 14, 2015 6:55 am, edited 1 time in total.

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Waveform antialiasing

Post by steve » Mon Aug 10, 2015 4:34 pm

Waveform with and without blurring:
trackblur.gif
trackblur.gif (21.64 KiB) Viewed 1221 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

cyrano
Posts: 2629
Joined: Fri Apr 17, 2015 11:54 pm
Operating System: macOS 10.13 High Sierra

Re: Waveform antialiasing

Post by cyrano » Mon Aug 10, 2015 5:12 pm

Please, no blurring, anti-aliasing or whatever. A waveform should be as true as possible to the waveform. It doesn't matter if it doesn't look good. It needs to be accurate, not good looking!

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Waveform antialiasing

Post by waxcylinder » Mon Aug 10, 2015 10:33 pm

cyrano wrote:Please, no blurring, anti-aliasing or whatever. A waveform should be as true as possible to the waveform. It doesn't matter if it doesn't look good. It needs to be accurate, not good looking!
+1 8-)
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

h-h
Posts: 110
Joined: Tue Jul 28, 2015 2:37 am
Operating System: Please select

Re: Waveform antialiasing

Post by h-h » Tue Aug 11, 2015 1:13 am

cyrano wrote:Please, no blurring, anti-aliasing or whatever. A waveform should be as true as possible to the waveform. It doesn't matter if it doesn't look good. It needs to be accurate, not good looking!
I don't like these no-sayers. You can't say no to an additional option that you won't choose. And it seems your view of antialiasing is: "No, surely it's a bad thing." It won't make you glad that it is already considered elsewhere to implement it in some way.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Waveform antialiasing

Post by Gale Andrews » Tue Aug 11, 2015 7:56 am

Blurring looks terrible to me.

If you are zoomed in to see the samples I think you can see what is going on, however the lines between samples are joined. So for me the argument turns on which image in this set https://twistedwave.com/doc/WaveformAntialiasing.png is the most accurate.

The antialiased images in that group look better to me - knowing relatively little about is as I do, they antialiased seem as if they have "higher resolution" in some sense. But if the added peaks are spurious then it's misleading.

I think h-h should show us waveform images of anti-aliased and not that show the kind of antialiasing he or she proposes.

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Waveform antialiasing

Post by steve » Tue Aug 11, 2015 9:20 am

h-h wrote:You can't say no to an additional option that you won't choose.
Everyone is entitled to give their opinion about proposals.
Whether or not a proposal every gets added to Audacity largely depends on whether someone has the time, enthusiasm and ability to do it.
Decisions about what is enabled by default based on should be based on what is in the best interests of Audacity users. These are often difficult choices, but we try.

When feature requests are transferred from the forum to the list on the wiki "feature requests" page, only votes in favour of the proposed feature are counted, Objections to a proposed feature may be noted in the comments, but votes against a feature are not counted.

h-h wrote:And it seems your view of antialiasing is: "No, surely it's a bad thing." It won't make you glad that it is already considered elsewhere to implement it in some way.
I think that you may be slightly misinterpreting what was said here and on the developer's mailing list.

There is broad agreement from both users and developers that improving the appearance of Audacity is generally a good thing, and I don't think that any of the comments made here detract from that. The crux of the argument against this particular proposal is that accuracy of the visual information is favoured over whether or not it looks pretty.

As James (developer) said, this proposal is an approximate antialiasing technique that does not address situations where (visual) antialiasing matters the most, and that there are many changes to visual presentation that have a bigger impact for the work put in. Federico then suggested that rather than applying antialiasing to the graphics, an effective way to improve the waveform display would be to draw the waveform based on interpolated data.

What is being suggested on the developers mailing list is to approach the issue from the opposite direction from this proposal:
Currently, the zoomed out waveform is plotted using a simple and fast method of plotting the closest pixel to peak data points, and the zoomed in waveform is drawn based on simple and fast linear interpolation between sample values. The proposal here on the forum is to "smooth" the resulting graphical representation. What has been suggested on the developers mailing list is to use more accurate algorithms for translating the audio data points into pixels (parabolic interpolation of the peak data, and sinc interpolation of the zoomed in waveform).

The difference in approach is easiest to see in the case of the zoomed in waveform (where individual sample values are visible):

This is how we draw the waveform now. The waveform is a linear interpolation between the sample points:
linear.png
linear.png (8.54 KiB) Viewed 1207 times
This image is using the same data points and the same linear interpolation, but the waveform graphic has been antialiased.
dithered.png
dithered.png (26.69 KiB) Viewed 1207 times
This image interpolates between the data points with spline interpolation (sinc interpolation would be better, but this is an approximation for illustration purposes).
The important difference here is not "smoothing the graphic", but smoothing the data from which the graphic is drawn. This final version not only looks prettier (in my opinion) but provides better information to the user as it provides a more accurate visual representation of the analog waveform that is produced when the sound card converts the (digital) sample data into a band limited (analog) waveform.
interpolated.png
interpolated.png (19.47 KiB) Viewed 1207 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked