New color scheme for spectrogram

Overview
I suggest new color scheme for audacity spectrogram, which is more pretty and better representing audio.

It looks like this:
proposal.jpg
Original for comparison:
original-light.jpg
Motivation

To make spectrograms that are pretty, better represent audio, easier to read by those with colorblindness, and print well in gray scale.

Here is further readings:
https://bids.github.io/colormap/
https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html

Audacity’s default colormap is quite bad. Especilly when it’s printed in grayscale.
original-grayscale.jpg
Lightness of background and foreground is confusing.
viscm-audacity-light.jpg
As you can see, grayscale converted colorbar is chaotic. It should be simple gradient of white - black.

There is huge red bending, which makes spectrogram hard to read.

Thanks for the suggestion.

Audacity already offers greyscale rendering of the spectrogram, though it does not offer the full black to white range.
https://manual.audacityteam.org/man/spectrograms_preferences.html

The new colormap
viscm-proposal.jpg
Considerings while making the new colormap (in order of priority):

  • Wide range of lightness (almost full 0-255)
  • Colorful, wide range of hue, chroma
  • Originality, keep magenta-ish feeling
  • Aim to be perceptually smooth
  • Pretty

I wrote python code for generating the colormap.
https://github.com/dofuuz/audacity-colormap

Execute ‘gen_wheel.py’ to generate color wheel.

Change constants like ANGLE, OFFSET, CCW… and generate different color wheels.


Obstacles

There are problems for applying the colormap.


Transparency for sync-lock overlay
Currently, audacity spectrogram has transparency for sync-lock overlay
https://manual.audacityteam.org/man/sync_locked_track_groups.html

Without disabling this, spectrograms would look like this:
proposal-tp.jpg
It will affect color even if background is (0, 0, 0) black.

→ I suggest disabling transparency of spectrogram.


Restriction of Theme
Theme is not applicable for new colormap. A theme can use only 5 colors for spectrogram, which is too small for good colormap.

I tried to make 5-color version of the colormap.
viscm-proposal-5color.jpg
Color bendings are clearly visible.

Also, Audacity ignores the “Spectro1”, “Spectro1sel” and “SpectroBackground” colors for the sync-lock overlay.

→ So another suggestion: making option to select color scheme independent from theme.
color-scheme.png

I divided posting to attach more than 4 images… and admin replied between the posts. :joy:

This is not a feature request. I already wrote the code to apply it. Here is my pull request.
https://github.com/audacity/audacity/pull/830

I wanted opinions something about artwork, so I posted this post at ‘Audacity Artwork and Graphics’ forum.
And… admin moved this post to ‘Adding Features to Audacity’
I’m not sure where this post should go now.

Anyway, please give me your opinion about new spectrogram.

Thanks!

To admin: Please merge my PR!

Pulls requests are handled by the developers. This forum is primarily for end user support.

I moved this topic here because you are proposing an enhancement to Audacity’s feature set. It looks to me like a very viable enhancement and is more likely to attract the attention of the Audacity developers in this part of the forum.

I think they look terrific.

I agree. They look great :slight_smile:

Hello dofuuz,

As one if the Audacity development team, I say we are still very interested in your contribution.

Could you rebase these changes onto a more recent master branch tip, and force-push again you your fork?

Please also see your private messages on this forum.

Thank you.

Paul Licameli

I merged upstream master into changes.

BTW, I didn’t received any new PM on this form. :thinking:

I’m sorry, please check your inbox again now.

Do not merge master into your branch. Instead, checkout out your branch (at commit 558bf1e38be74325ee7f73a85ee9caf72d6a745b), and do

git rebase audacity/master

and then

git push -f origin spec-color

(or however you named your remote repos, substitute them for “audacity” and “origin”)

I have begun to make some comments on the commits. Please watch for more.

PRL

@Paul L

Okay, I checked your PM.

Please comment something related with the PR at GitHub. :grinning:
It’s not convinient to reponse here, because everything I write on this forum should be approved before posted.

Try now.

Pull request has been merged.

New spectrogram color scheme is going to be available from incoming Audacity 3.0.3.

Thanks for this dofuuz :smiley: :sunglasses:

Having worked with this over the past few weeks I’m finding I really like this new colorway.

Peter

Super :smiley:
Very nice it is too.

Congratulations.

I would also like to see you credited in the About Audacity… dialog, if you agree. Let us know how exactly we should spell your name. (In Unicode with whatever characters you prefer.)

Just to be certain, dofuuz — i took Keum as the family surname, so we should alphabetically sort under K.