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

Audacity Bugzilla



Bug 525 - Spectrogram log (f) displays incorrectly until zoomed on vertical scale
Spectrogram log (f) displays incorrectly until zoomed on vertical scale
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.0.1
Per OS All
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
http://audacity.238276.n2.nabble.com/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-07 23:23 UTC by Gale Andrews
Modified: 2018-08-20 11:51 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1 New Audacity session, use default Spectrograms Preferences (http://manual.audacityteam.org/man/Spectrograms_Preferences) 2 Generate 10s 1kHz sine tone 0.1 amplitude 3 Choose Spectrogram log(f) in Track Control Panel 4 The white frequencies appear centred around 400 Hz instead of around 1000 Hz. 5 Left-click the vertical scale to zoom in and the white frequencies now appear centred around 1000 Hz as expected 6 Jump of frequency bands appears to be replicable if entering other frequencies.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
gale: Regression+


Attachments
Two-line fix for bug 525, affects startup and changes of preferences. (725 bytes, patch)
2014-09-05 19:56 UTC, Paul L
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2012-06-07 23:23:12 UTC
Works correctly in 1.3.13 but not 1.3.14.
Comment 1 Martyn Shaw 2012-11-05 20:09:41 UTC
(In reply to comment #0)

Confirming the bug here.  Ruler and Spectrogram (log f) scales do not match when first fired up.  Zooming in fixes it.

> Works correctly in 1.3.13 but not 1.3.14.

Useful information!

What revisions do 1.3.13 and 1.3 14 correspond to?  If we had a good means to find that it would be very useful.  And then find all the changes between those revisions.

Clearly there is a disconnect between the zoom/prefs and the spectrogram drawing which was there and got lost.  Once found, it should be easy to fix.

TTFN
Martyn
Comment 2 Gale Andrews 2012-11-06 13:44:17 UTC
(In reply to comment #1)
Release Notes for obsolete versions always show the dates of currency.  

http://wiki.audacityteam.org/wiki/Release_Notes_1.3.13 shows that 1.3.13 was available from 11 April 2011 until 10 December 2011. I guess I could add the r numbers too, anyhow 1.3.13 tag is r11097 ( http://code.google.com/p/audacity/source/detail?r=11097 ) and 1.3.14 tag is r11364 ( http://code.google.com/p/audacity/source/detail?r=11364 ).
Comment 3 Paul L 2014-09-05 19:56:52 UTC
Created attachment 507 [details]
Two-line fix for bug 525, affects startup and changes of preferences.

TrackArtist::mLogMinFreq was changed in two places.

One is TrackPanel::HandleVZoomButtonUp whose many paths all insure that its value is not less than 1.

The other is TrackArtist::UpdatePrefs which may default the value to less than 1.  (If the minimum frequency preference for spectrograms is unchanged from 0, then the value is 0.)

I simply changed UpdatePrefs to guarantee that this value is not less than 1, consistently with HandleVZoomButtonUp.

I added a comment about a line I believe becomes unreachable, and which was the cause of the very different vertical scale in this bug, but was a necessary guard against taking logarithm of 0.
Comment 4 Martyn Shaw 2014-10-14 19:31:19 UTC
(In reply to comment #3)

Paul L's patch is minimally invasive and fixes the problem, so I committed it.

I see ongoing discussions on Forum
http://audacity.238276.n2.nabble.com/Problem-with-the-fix-for-bug-85-td7564144.html
and stand by my comments on bug 85
gPrefs->Read(wxT("/SpectrumLog/MaxFreq"), -1);
looks like an unfinished feature (well, actually, not started much :-)), there are lots of options here, but this isn't the place to discuss them.