Bugzilla – Bug 2096
High quality stretching in Change Pitch/Tempo causes the Preview to malfunction and remove the selection
Last modified: 2019-04-23 05:13:05 UTC
Using high quality stretching in Change Pitch and Change Tempo causes the Preview to malfunction and remove the selection - and it is not just a visual loss of selection - the selection is fully discarded, which means the Apply will not work after this errant preview. I have graded this as P2 as the user may have carefully made a selection and this is now lost and must be recreated. Assume all three platforms. This was originally caught and reported by a Forum user - See: https://forum.audacityteam.org/viewtopic.php?f=68&t=104395&p=368118
I don't see this with Audacity 2.3.2 alpha on Linux. I've not tested on Mac.
Testing on 2.3.2 latest alpha build jc002 with macOS 10.14.4 Mojave. I see the same symptoms on Mac as I see on W10 - except that on Mac the selection is removed while the preview is progressing, before it finishes
Does not happen on either platform when the "Use high quality stretching (slow)" is unchecked. Aside: But note that even with that off, Change Pitch is still extremely slow on Mac
This appears to have been caused by this commit by Paul: 0aad028 There's a fix in my fork which simply reverts the commit to fix the problem: https://github.com/DavidBailes/audacity/commit/fe22b2ae228ebd79f1ea0161bd33eb4ef2a47bf1 However, Paul or someone else may want to work out what was going wrong, and fix that, rather than just reverting the commit.
DEVEL - FIX MADE, per David's investigation. https://github.com/audacity/audacity/commit/fe22b2ae228ebd79f1ea0161bd33eb4ef2a47bf1 The old way of preview made a copy of the selection, and it was the copy that got changed, not the actual selection. And that is what we wanted. So went back to old way.
(In reply to James Crook from comment #5) Testing on W10 with audacity-2.3.2-alpha-237-fe22b2ae228ebd79f1ea0161bd33eb4ef2a47bf1 This mow works fine on Windows: a)cthe Previews for both effects play as expected b) the selction is retained c) the OK button can than apply the effect to the selection As this is flagged for single platform testing I shall mark this RESOLVED
(In reply to Peter Sampson from comment #6) > (In reply to James Crook from comment #5) > Testing on W10 with > audacity-2.3.2-alpha-237-fe22b2ae228ebd79f1ea0161bd33eb4ef2a47bf1 > > This mow works fine on Windows: > > a)cthe Previews for both effects play as expected > > b) the selction is retained > > c) the OK button can than apply the effect to the selection > > > As this is flagged for single platform testing I shall mark this RESOLVED There is a flag set: Must-Test-All-OS I think it should be tested on all platforms.
Re Comment #7 flags can be + or -, and it is set - to indicate there is no need to test on all platforms.
(In reply to James Crook from comment #8) > Re Comment #7 flags can be + or -, and it is set - to indicate there is no > need to test on all platforms. OK, I misread.
I'm still gonna be testing it on Mac when eventually I get a Mac build ...
I do not like David's fix, which reverted some of my earlier work. I will fix it differently.
Fixed as I prefer at commit https://github.com/audacity/audacity/commit/55f7c0f6af48ffe7c40919d292eb905c1c9ddf97 which is now just a one-line fix. (And a comment.)
(In reply to Paul L from comment #12) Testing on W10 with audacity-2.3.2-alpha-238-9df28dc5719436813c4a6bb4c1227abe9d734987 This is now NOT fixed. Yes the selection is preserved - but once again when using "High Quality Stretching" - the preview just plays at normal tempo/pitch - and so is no a preview
(In reply to Peter Sampson from comment #13) Actually the preview just starts up at normal speed and then partway through it just degenerates and breaks up. In fact, further testing shows that with the "high quality stretching" turned off the preview still has problems - both effects start off with a proper preview and then also degenerate and break up too.
Further testing shows that this is a regression on 2.2.2 - and was introduced in 2.3.0
It's a regression. I won't release with it. So P1.
I am not reproducing the problems Peter reports, for Mac. Do you observe that it is a bug only on Windows? Please specify precisely the length of the audio and example settings. Possibly the underlying problem is separate from the change of selection.
tested on my MacBook Pro with macOS 10.14.4 2min45sec song and 10 sec selection Pich change D3=>D7 and D3=>F#-3 Twmpo shange 259% and -95% And yes I do see the same problem on MacWith 2.3.1 and 2.3.2jc002 a) the preview plays at normal speed (s not a preview) b) the selection is lost Note carefully that this is only with the "high quality stretching" checked on - with that off (default) the preview works fine and the selection is not lost And on Mac it's also a regression on 2.2.2 as it works fine on that and earlier versions. The Mac implementation shows a slight improvement over the W10 in that there is no defradation of the preview part way through - the preview, when it plays, plays properly all the way through
(In reply to Peter Sampson from comment #18) More precision please... you tested with the 2.3.1 release or with a recent 2.3.2 build? If you mean a 2.3.2 build, does that not contradict what you say at comment #13 that selection is no longer lost, but other problems remain? When you use Pitch Change, playing at "normal speed" is what one should expect, though with change of pitch. I assume you meant, there was just no effect, on pitch or speed?
(In reply to Paul L from comment #19) I have reproduced the problem on Mac. I have completed the fix at https://github.com/audacity/audacity/commit/b83781ccde2fb79394e1e5f82a6fd7103908f4c5
(In reply to Paul L from comment #20) Testing on W10 with audacity-2.3.2-alpha-239-b83781ccde2fb79394e1e5f82a6fd7103908f4c5 It mostly works - but there is a visual residual (which does not affect the playback of the previews for the two effects. 1) get a 5 minute steeo song 2) Select a short section - or the whole track 3) Effect Change Pitch/Tempo 4) set the "high quality strectching" flag "on" 5) click Preview 6) observe the dialog "Applying High Quality Pitch/Tempo change" 7) also observe that while this temporary pitch/tempo change for the preview is being worked on that temporarily the selkection visually shifts from the actual selection to a smal strip about 0.3cm wide starting at T=0 (this 0.3cm size appears to be independent of the zoom level. This is the residual - it does not look good (and will alarm users) 8) after the temporary calculation has been made the preview starts 9) and the selection is returned to where it was in Step 2 10) The preview plays correctly
David's original fix in audacity-2.3.2-alpha-237-fe22b2ae228ebd79f1ea0161bd33eb4ef2a47bf1 on W10 works fine on W10 without that residula at Step 7 in Comment #21
Try it once more at 8d489b9c6f6078f700d5ecfdd9e1d1a5cc81732b
(In reply to Paul L from comment #23) Testing on W10 with audacity-2.3.2-alpha-240-28ce4e568b282e9e8d88c6be399bc651eb2e2741 The residual has been fixed, the selection remains intact throughout with both effects and the preview plays at the required changed tempo/pitch. Tested with short selections long selctions and whole track selections. Also tested the previews with "High quality stretching" turned off - all works fine there with bith effects,