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

Audacity Bugzilla



Bug 1633 - Spectral Selection Toolbar incorrect above 100 kHz
Spectral Selection Toolbar incorrect above 100 kHz
Status: RESOLVED QUICKFIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
unspecified
Per OS All
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
: test_single_OS
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-16 05:29 UTC by Steve Daulton
Modified: 2018-08-20 11:46 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
A1. Select the maximum project rate allowed. A2. Create a new track, DTMF A3. Go into spectrogram mode, set spectrogram settings for max frequency of half project rate, and spectral selection enabled. A4. Enable the spectral selection toolbar. Set to kHZ. A5. Make a selection in high frequencies, above 100KHz, using the mouse. Notice that the toolbar shows incorrect values. B1. Repeat steps A1 to A4 but in step A4 use Hz rather than kHZ B2. Make a selection in high frequencies, above 100KHz, using the mouse. B3. Attempt to set the upper frequency above 100KHz directly in the spectral selection toolbar. In B2 notice that the 'high frequency' may come out the same as the low frequency even though set higher. in B3 notice that higher digits of the Hz display are not accessible. In B, acceptable behaviour is that in Hz mode the upper digits are simply missing/unavailable, or that the entire display for that value is shown as dashes.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
gale: Test‑OK‑Win+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2017-04-16 05:29:30 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.
Comment 1 Gale Andrews 2017-04-16 13:02:57 UTC
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 .
Comment 2 Steve Daulton 2017-04-16 13:13:35 UTC
(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).
Comment 4 Gale Andrews 2017-04-16 14:01:43 UTC
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.
Comment 5 Gale Andrews 2017-04-16 16:17:07 UTC
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.
Comment 6 James Crook 2017-04-16 17:17:06 UTC
DEVEl-FIX MADE for residual
https://github.com/audacity/audacity/commit/24c2c6e070ab94d676f1c70b615d92269a939889
Comment 7 Gale Andrews 2017-04-17 23:06:08 UTC
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.