Bugzilla – Bug 1633
Spectral Selection Toolbar incorrect above 100 kHz
Last modified: 2018-08-20 11:46:03 UTC
For high sample rate tracks, spectral selection may be 100 kHz or higher, which overflows the available range in the Spectral Selection toolbar and shows incorrect frequencies. Example: Click and drag a spectral selection from about 140 kHz to 101 kHz. Both high and low frequencies show 1 kHz. In my opinion, it is not unreasonable to limit the display to 99.999 kHz and truncate the leading "1" when 100 kHz or higher (because this is an exceptional case for audio), but overflow is clearly not being handled correctly, and that is the essence of this bug report.
This seems to happen (on Windows too) whenever the upper bound lies about 100 000 Hz, whether it was created there or moved there. Steve wrote: > In my opinion, it is not unreasonable to limit the display to 99.999 kHz and > truncate the leading "1" when 100 kHz or higher (because this is an exceptional > case for audio), Should VI users be disadvantaged though? Please see the discussion at http://audacity.238276.n2.nabble.com/Accessibility-of-Spectral-Selection-Toolbar-at-high-frequencies-td7579573.html .
(In reply to Gale Andrews from comment #1) I was thinking that trimming the "100 kHz" unit might provide an easy fix, but having looked at the code it's probably not that simple, so please disregard that comment. Regarding VI users. it would probably be easier for them to use conventional plug-ins with numeric input in the effect UI rather than navigating to the spectral toolbar (but this is going somewhat off-topic from the bug).
DEVEL-FIX MADE https://github.com/audacity/audacity/commit/80928bfe6198d30c329536d1fcc2b7d4396f83d9
Another behaviour to check when testing the fix. A reported symptom was that if you clicked above 100 000 Hz and dragged the spectral selection down, the High Frequency stopped changing and showed the correct value (leading value truncated) when the Centre Frequency fell to Nyquist/2 (assuming the maximum frequency displayed was the maximum possible). So the correction happened when centre frequency fell to 96000 Hz at 384000 Hz sample rate.
REOPENED. We have a good feature extension for kHz, but the original user complaint that was partially described here when viewing in Hz is unfixed.
DEVEl-FIX MADE for residual https://github.com/audacity/audacity/commit/24c2c6e070ab94d676f1c70b615d92269a939889
RESOLVED - QUICKFIXED This works as I would have hoped with mouse and keyboard adjustment of the spectral selection. Thanks, James. Tested dragging one spectral boundary or both in both directions, setting maximum frequency of spectrogram below maximum possible, using audio above 200 000 Hz or not. I see the Low and High Frequency are correct in Spectral Selection Toolbar in Hz at boundaries above 100 000 Hz, with allowance that the first digit of the value can't be shown. Using keyboard adjustment in Hz, I see that incrementing High Frequency upwards with UP arrow jumps back to the Low Frequency when it would reach 100000 Hz. That seems good. Incrementing High Frequency in kHz does not work correctly but that is bug 891.