Bugzilla – Bug 525
Spectrogram log (f) displays incorrectly until zoomed on vertical scale
Last modified: 2018-08-20 11:51:22 UTC
Works correctly in 1.3.13 but not 1.3.14.
(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
(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 ).
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.
(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.