Bugzilla – Bug 511
Contrast tool gives incorrect error message for stereo tracks instead of analyzing.
Last modified: 2018-08-20 11:45:29 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.
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.
(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 )
Support for stereo tracks added. https://github.com/audacity/audacity/commit/03915b4
(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
(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.
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)
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.