Bugzilla – Bug 2367
Change Pitch effect may create spurious clip at end
Last modified: 2020-09-22 06:15:07 UTC
Tested on Linux but probably all platforms. After applying Change Pitch effect, selected audio clips may gain short, or zero length clips at the end. The problem is most noticeable when the HQ setting is not enabled. The problem is most dangerous when using the HQ setting as this is more likely to produce zero length clips which are invisible unless zoomed in to samples. This is a regression against 2.2.1 As the Change Pitch effect aims to keep the original length of the audio, any "extra" samples returned should be deleted rather than being in a separate clip.
I've upgraded this to P1 because we know that zero length clips can cause very hard to find problems for users.
Created attachment 938 [details] unnecessary clip line in 2.2.1 >This is a regression against 2.2.1 Actually even 2.2.1 seems to have an issue too. It adds an unnecessary clip line at the end of where the original audio was. The audio in Steve's steps causes a shrinkage in the audio of 180 samples
(In reply to Peter Sampson from comment #2) >It adds an unnecessary clip line at the end of where the original audio was. And this is a regression on 2.0.5 - the single extraneous clip line at the end was introduced in 2.0.6
(In reply to Peter Sampson from comment #2) This bug is not producible in Audacity 2.2.1 on my (Linux) machine. If the Change Pitch effect returns more or less samples than the selection, the processed audio is trimmed or padded to exactly the same length as the original selection. In my opinion this is the "correct" behavior.
DEVEL - FIX MADE https://github.com/audacity/audacity/commit/0fe483f0e27be937c793d6c5f82a781c8ceeecdf
(In reply to James Crook from comment #5) Testing on W10 and macOS 10.15.3 with Audacity 2.4.0 a072e21 Works properly on both platforms - no clip is created at the end of the audio when using Change Pitch now. But testing around shows that Change Speed places an unnecessary Clip line at the end of the changed audio (on Win and Mac) Change Tempo however does not place such a clip line at the end of the audio. Do we want to treat Change Speed as a residual here or should I raise a new bug for it?
(In reply to Peter Sampson from comment #6) >Change Speed places an unnecessary Clip line at the end of the changed audio This is a regression on 2.3.3
*** STEPS UPDATED *** I fixed Change Speed too, though it should have been reported as a separate bug. I also fixed Change Pitch for Stereo, which was another residual. Must test both effects with mono and stereo since this is a P1 bug. DEVEL - FIX MADE https://github.com/audacity/audacity/commit/d809745a55b608b0796f9b24ea1a44ff47564368
(In reply to James Crook from comment #8) Tested on W10 and macOS 10.15.3 with Audacity 2.4.0 210fc28 Tested 1) Change Pitch 1) Change Speed 1) Change Tempo with mono and stereo tracks. All tested OK with no extraneous clip added at the end of the audio.
I see no extra clips on Linux either.
Created attachment 944 [details] End of waveform after Change Pitch While I didn't see any extra clips on Linux, I did notice on both Windows and Linux (didn't try it on OSX) that after the Change Pitch @ -10% is complete, the waveform is a tad bit shorter than before. If I recall correctly this can be normal for some effects. But, I did both tracks at the same time expecting the reduced length to be the same, but it wasn't. Steps to recreate 1) Delete all tracks 2) Generate square tone 3) Duplicate the new track 4) Change Pitch using -10%, no other changes. 5) Apply and zoom in to the end of the tracks.
(In reply to Leland Lucius from comment #11) > Created attachment 944 [details] > End of waveform after Change Pitch > > While I didn't see any extra clips on Linux, I did notice on both Windows > and Linux (didn't try it on OSX) that after the Change Pitch @ -10% is > complete, the waveform is a tad bit shorter than before. If I recall > correctly this can be normal for some effects. > > But, I did both tracks at the same time expecting the reduced length to be > the same, but it wasn't. Steps to recreate > > 1) Delete all tracks > 2) Generate square tone > 3) Duplicate the new track > 4) Change Pitch using -10%, no other changes. > 5) Apply and zoom in to the end of the tracks. Fix for this committed in: https://github.com/audacity/audacity/commit/5342d98 But, hold off on testing as further changes for this bug and bug #2534 will be coming.
(In reply to Steve Daulton from comment #4) > (In reply to Peter Sampson from comment #2) > This bug is not producible in Audacity 2.2.1 on my (Linux) machine. If the > Change Pitch effect returns more or less samples than the selection, the > processed audio is trimmed or padded to exactly the same length as the > original selection. In my opinion this is the "correct" behavior. Steve, what do you expect to happen if you do something line: 1) Add 30 second tone 2) Select 5 seconds in the middle of the tone 3) Change pitch with +10 Percent Change As of now, this reduces the length of the entire track. If the intent is to keep the track the same length, should silence be added to the end of the track? Or should it be added to the end of the selection?
This is looking good on Linux. As we have previously seen platform dependent differences in this bug, best that we test on all platforms I think.
Testing on W10 with Audacity 3.0.0 e3bd5cf No spurious clips are created at the end of the tone a) mono without HQ b) mono with HQ c) Stereo without HQ d) Stereo with HW
Testing on macOS 10.15.6 Catalina with Audacity 3.0.0 e3bd5cf No spurious clips are created at the end of the tone a) mono without HQ b) mono with HQ c) Stereo without HQ d) Stereo with HQ