Bugzilla – Bug 1049
Spectral edit effects fail on 0 Hz low frequency.
Last modified: 2018-08-20 11:46:04 UTC
Fixed: https://github.com/audacity/audacity/commit/0a71291c99c294d3d7bacab5dfcb8e81ed4b5811
I'm seeing this error in the debug window when following the steps to reproduce: error: unbound variable - INF if continued: try evaluating symbol again 1> 1 1> "Audio Track" 1> "wave" 1> "Spectrum" 1> 1 1> 0 1> 30 1> 1 1> 0 1> 44100 1> 32 1> ((0 30)) 1> 0.799999 1> T 1> 4.3 1> 4.3 1> VALIDATE 1> WET 1> RESULT 1> "Low frequency is undefined." 1>
Bug reopened as it is not fixed. Parametric EQ and Multi tool should show a meaningful error when the lower frequency bound = 0. Currently it fails with the message: "Nyquist returned the value: <upper frequency limit>" To reproduce: 1) Set Spctral Edit Toolbar to show Upper and Lower frequencies. 2) Make a selection 3) Enter 0 as the lower frequency and say 1234 Hz as the upper frequency. 4) Apply either the "Parametric" or "Multi" Spectral effects. The reason that 0Hz is invalid is because when the lower frequency is zero, the bandwidth in octaves is undefined (it is a ratio in which the denominator is zero).
(In reply to Steve Daulton from comment #3) Also there is still a completely silent failure in multi tool if low frequency is 0 Hz and high is undefined. In Parametric EQ if low frequency is 0 Hz and high is undefined, the message states that Low Frequency is undefined, which is not actually true.
"Spectral edit parametric EQ" no longer fails silently as described in the steps to reproduce. It fails with a message: "Nyquist returned the value: 12000.000000" As this bug refers to more than one "Spectral Edit" effect, and the above change in symptoms, I've updated the bug title.
Created attachment 653 [details] Fix for bug 1049 I think this should fix all the issues detailed in the comments.
Given http://bugzilla.audacityteam.org/show_bug.cgi?id=1275#c7 should this be DEVEL - FIX MADE ?
(In reply to Gale Andrews from comment #7) Yes, DEVEL - FIX MADE. The issue in comment 2 no longer occurs. For a parametric ("mid-band") Eq, both the upper and lower frequencies 'must' be defined or an error is raised. Similarly error messaged are raised for "Spectral Multi-tool" when the settings create a dangerous error condition (invalid biquad filter values). For "Spectral Shelf" filters it is perfectly valid to have just one frequency defined. I think it is more useful to treat Nyquist and above as "undefined" than as an error. I think it is debatable whether 0 Hz should be treated as an error or as "undefined", but given if we are to treat Nyquist and above as "undefined" then it is more consistent to do the same for 0 Hz.
(In reply to Steve Daulton from comment #8) Moved to DEVEL - FIX MADE. I'm happy with Spectral edit multi-tool and Parametric EQ. > For "Spectral Shelf" filters it is perfectly valid to have just one frequency > defined. I think it is more useful to treat Nyquist and above as "undefined" > than as an error. I think it is debatable whether 0 Hz should be treated as an > error or as "undefined", but given if we are to treat Nyquist and above as > "undefined" then it is more consistent to do the same for 0 Hz. As per http://bugzilla.audacityteam.org/show_bug.cgi?id=1278#c9 we have Spectral edit shelves doing nothing on 0 Hz to Nyquist Frequency and 0 Hz to undefined but the Undo Stack history shows them, so arguably they are still failing silently on those 0 Hz cases.
(In reply to Gale Andrews from comment #9) > arguably they are still failing silently on those 0 Hz cases. As described in comment 2 and in the "Steps to Reproduce", there was previously an internal error (in Nyquist / Audacity). Now it does "nothing", but there is no internal error condition - the actual output is the same as the calculated output. I agree that it is debatable what we 'should' do when the user input is nonsense but is handled by the code without error. I'd suggest that we close this bug and raise any residual issues separately, subject to the outcome of this discussion: http://sourceforge.net/p/audacity/mailman/message/34724528/
Testing on Mac El Capitan on 01a95c5-2.1.3-alpha-13-feb-16 and Testing on W10 on audacity-win-r4d154c4-2.1.3-alpha-18-feb-16 Using the steps to reproduce on both these platforms I now get an apptropriate error message instead of a "silent fail"
Testing on Debian, Audacity 2.1.3 alpha. The bug as described is fixed.
Closing this bug that was tested an all three platforms a while back (and still works an alphas on Win and Mac