High contrast of spectrograms

Anything you think is missing, or needs enhancement, goes here.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

High contrast of spectrograms

Permanent link to this post Posted by Piotr Grochowski » Tue Sep 12, 2017 12:15 pm

Spectrogram contrast? Horrible. Why? 2 things.

1. Logarithmic volume scale used

This means that 1 volume is black, but 0.5 volume is only slightly brighter. This makes the contrast horrible.

2. Super narrow bands are incorrect

Narrower time or frequency bands are actually quieter, but Audacity thickens bands to 1 pixel, making it misleading.

Extra things that should be fixed: Steep diagonals (when you zoom out) are literally broken, Audacity doesn't let its players use it while spectrograms are loading and you can't use fractional frequencies (which makes a difference in low frequencies).
Piotr Grochowski
 
Posts: 76
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: High contrast of spectrograms

Permanent link to this post Posted by Trebor » Tue Sep 12, 2017 1:28 pm

Piotr Grochowski wrote:Spectrogram contrast? Horrible. Why? ...

More colors in the spectrogram , (i.e more bit-depth), would require more processing-time to render.

Bear-in-mind Audacity is free-software: designed for people on a low/no budget.
The assumption will be such users do not have an expensive powerful computer,
(or graphics card), which could cope with rendering high-resolution high-bit-depth graphics in real-time.
Trebor
 
Posts: 3773
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: High contrast of spectrograms

Permanent link to this post Posted by Piotr Grochowski » Tue Sep 12, 2017 1:56 pm

I don't mean to make it more complex, in fact, I want it less complex.

I don't need a high bit depth. I just want brightness to directly correspond to volume instead of logarithmic volume scale, and for super narrow bands to be represented correctly, not thickened to 1 pixel which makes it seem louder.

So for grayscale colors, 0, 1, 2, ..., 255 correspond to equal steps in direct volume, not dB. Obviously not calculating logarithm is less complex than calculating logarithm.
Piotr Grochowski
 
Posts: 76
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: High contrast of spectrograms

Permanent link to this post Posted by Trebor » Tue Sep 12, 2017 3:43 pm

Piotr Grochowski wrote: I don't need a high bit depth ...

The more colours/shades the greater the visual bit-depth required to render them,
and more processing power to render the greater number of shades in a reasonable time.

Piotr Grochowski wrote: So for grayscale colors, 0, 1, 2, ..., 255 ...

Currently there's not 255 different colours/shades used : it's a limited-palette of 6 colours (~3 bit-depth). To render 255 colours you need 8 bit-depth.

It would be nice to have the option to select greater bit-depth on the spectrogram,
but you'll need plenty of processing power to render the spectrogram in a reasonable time.
Last edited by Trebor on Tue Sep 12, 2017 3:56 pm, edited 1 time in total.
Trebor
 
Posts: 3773
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: High contrast of spectrograms

Permanent link to this post Posted by Piotr Grochowski » Tue Sep 12, 2017 3:50 pm

Trebor wrote:
Piotr Grochowski wrote: I don't need a high bit depth ...

The more colours / shades-of-grey, the greater the visual bit-depth required, and more processing power to render the greater number of shades in a reasonable time.

Piotr Grochowski wrote: So for grayscale colors, 0, 1, 2, ..., 255 ...

Currently there's not 255 different colour/shades-of-grey being used : it's a limited-palette, looks less than 32 shades.


I didn't say 255. There are 256 integers from 0 to 255.

I don't notice limited palette. What you see is either poor contrast from logarithmic volume scale, low frequency resolution (blame Audacity for choosing "256 - default" by default and not 4096) or super narrow bands being thickened to 1 pixel. If you actually pick colors you may end up with a different conclusion.

Here is the first issue, logarithmic volume scale: http://i.imgur.com/zXIwuDp.png

The real sine wave is 0 to 1 volume, but it's mostly black. That would also suggest a loud click at the end.
Piotr Grochowski
 
Posts: 76
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: High contrast of spectrograms

Permanent link to this post Posted by Trebor » Tue Sep 12, 2017 4:19 pm

Piotr Grochowski wrote:I didn't say 255. There are 256 integers from 0 to 255.
Like that makes a difference.

Piotr Grochowski wrote:I don't notice limited palette
You need your eyes tested. It explicitly says in the manual "six color bands" ...
manual.audacityteam.org wrote:There are six color bands in spectrogram view: white, red, magenta, dark blue, light blue and gray.
http://manual.audacityteam.org/man/spectrogram_view.html

Six colors is a noticeably low-bit-depth, high-contrast, image ...

Donald reduced to 6 colours.jpg
Donald reduced to 6 colours.jpg (104.53 KiB) Viewed 84 times
Trebor
 
Posts: 3773
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: High contrast of spectrograms

Permanent link to this post Posted by Piotr Grochowski » Tue Sep 12, 2017 4:29 pm

Actually that's not what low bit depth means. If there are accurate gradients it's high bit depth. Low bit depth is when gradients are represented by steps. And 6 color bands are irrelevant in grayscale view (which I prefer, as volume is 1-dimensional). There are actually many colors. Regardless of what the color bands are, there are many colors between what you may think.
Piotr Grochowski
 
Posts: 76
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: High contrast of spectrograms

Permanent link to this post Posted by Piotr Grochowski » Tue Sep 12, 2017 4:38 pm

Also by default, the gain is -20. This means that 0.1 to 1 volumes all appear black. This is very unacceptable. Mapping volume directly to brightness instead of bothering with logarithmic volume scale would improve it a lot.

Currently, the default settings are:

anything above -20 dB is indistinguishably white (the tone at -10 dB in the image above is white)
levels from -40 dB to -20 dB transition from red to white (the tone at -30 dB in the image above is light red)
levels from -60 dB to -40 dB transition from magenta to red (the tone at -50 dB in the image above is magenta)
levels from -80 dB to -60 dB transition from dark blue to magenta (the tone at -70 dB in the image above is bluish purple)
levels from -100 dB to -80 dB transition from light blue to dark blue (the tone at -90 dB in the image above is light blue)
anything below -100 dB is gray.
Customizable: gray scale, maximum, minimum

This default would be much better:

maximum volume in spectrogram is white
volumes from 0 to maximum transition from black to white, with 2.2 gamma
0 volume is black
Customizable: max color, min color, gamma
Piotr Grochowski
 
Posts: 76
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10


Return to Adding Features to Audacity



Who is online

Users browsing this forum: No registered users and 2 guests