Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 511 - Contrast tool gives incorrect error message for stereo tracks instead of analyzing.
Contrast tool gives incorrect error message for stereo tracks instead of anal...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Built-in FX
2.0.1
PC All
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
: test_single_OS
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-27 16:03 UTC by Steve Daulton
Modified: 2018-08-20 11:45 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
create a stereo track
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
stevethefiddle: Accessibility+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2012-05-27 16:03:08 UTC
When used on one stereo track the contrast tool returns the error message:
"You can only measure one track at a time".

This error message is incorrect as the test case has only one track selected (but two channels).


WCAG 2.0 does not appear to specify what should happen in the case of stereo tracks. Neither is it clear whether rms weighting should be used, though the linked documentation suggests C weighting. The current effect measures unweighted rms.

In the absence of a clearly defined standard I would suggest that the best option would be that, in the case of stereo tracks, the plug-in should measure the root of the average squared sample values (all selected samples).

(Square root ((sum of all squares) / (total number of samples)))

I think that the error message is reasonable for when multiple tracks are selected.
Comment 1 Gale Andrews 2012-05-27 18:16:10 UTC
Users who could previously analyze the bottom channel of a stereo pair without splitting it are complaining (most of the WCAG guide examples show a stereo pair which now fails). The Manual has been amended to indicate the current restriction.      

I also asked David MacDonald his opinion of how a stereo track should be analyzed. Steve made the point on the Forum that a stereo track that had the voice panned into the left channel could "sound" quite accessible even if it failed the current test (on the right channel). Does the suggested averaging take such a scenario into account? 

If we cannot (or it will take a lot of effort to code) averaging of both channels) then when a single stereo pair is selected we could have:

"Stereo Pair selected. Contrast can only measure one selected channel at a time. Press "Cancel" then use the Track Drop-Down Menu to "Split Stereo Track", or press "OK" to analyze the bottom channel only." 

Or simplify the message and just analyze the bottom track when they press OK. 

Steve's suggestion seems better if possible, as it would be unclear how to interpret a separate result for left and right channel.
Comment 2 Steve Daulton 2012-05-27 20:45:25 UTC
(In reply to comment #1)

When looking at "loudness" the usual method employed is to take the square root of the average (mean) of the square of all samples.

For panned audio this method is a lot better than looking at only one channel, but will still provide only a rough approximation of loudness (there is a description of how ReplayGain calculates loudness here: http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification )
Comment 3 Steve Daulton 2016-06-21 17:19:06 UTC
Support for stereo tracks added.
https://github.com/audacity/audacity/commit/03915b4
Comment 4 Martyn Shaw 2016-06-21 19:58:41 UTC
(In reply to Steve Daulton from comment #3)
Thanks Steve.  I have only scanned your changes in code but they look good.

My only question is why change
"Difference = %.1f Average RMS dB."
to
"Difference = %.2f Average RMS dB."
since I don't believe any of us can hear 0.1dB differences, let alone taking it to another order.

Martyn
Comment 5 Steve Daulton 2016-06-21 21:02:42 UTC
(In reply to Martyn Shaw from comment #4)
> My only question is why change
> "Difference = %.1f Average RMS dB."
> to
> "Difference = %.2f Average RMS dB."
> since I don't believe any of us can hear 0.1dB differences, let alone taking
> it to another order.

Basically for testing purposes.
There were some subtle calculation errors hiding in that 0.1 dB. The extra decimal place allows us to spot errors 10x smaller than before.

I'll probably change it back to 1 decimal place before 2.1.3 release, but for testing purposes the extra decimal place is useful.
Comment 6 Peter Sampson 2017-08-10 06:33:22 UTC
Testing on w10 06Aug17 nightly and macOS 10.12.6 10Aug17

On both platforms a stereo track can be analyzed - and youget the proper error message if multiple tracks are selected.

Looks to be fixed

However we do still have the two decimal places og accury that Martyn and Steve discussed in comment #4 and comment #5 where it was felt that one decimal ppoint of accuracy was more that sufficient for general use (the two decimal places was used to facilitate testing by Steve of his fix)
Comment 7 Peter Sampson 2017-08-10 06:34:17 UTC
Steve, as the fixer, cannot close this bug - but if he tests and marks it as ok on Linux, then I will mark it resolved.