Bugzilla – Bug 2616
Labelled Audio Cut and Delete disabled by Sync-Lock
Last modified: 2021-01-21 10:33:21 UTC
When Sync-Lock is "on" the two commands > Edit>Labeled Audio>Cut or >Edit>Labeled Audio>Delete Are grayed-out and unavailable. This contrasts with the situation when Sync-Lock is "off" whereby these commands can operate on the labeled audio - but note carefully that they only operate on the audio in this case and not the label track, thereby losing sync between remaining audio and labels. This is expected and documented behavior: https://alphamanual.audacityteam.org/man/Edit_Menu:_Labeled_Audio It would make better sense, and be more consisitent, if when Sync-Lock is "on" that the Labelled Audio Cut and Delete commands were available and usable - and would retain synchronization by cutting / deleting from both the audio track and the Label track. ---------------------------------------------------------------------- This ENH is the end result of a longish email discussion on the Quality thread. There David Bailes pointed out that 10 years ago Al Dimond had resonded to Bill regarding tghis: https://sourceforge.net/p/audacity/mailman/message/26197598/ Steve and I do not agree with that earlier statement.
Technically this is a regression on 1.3.6 In 1.3.0 there was no Edit > Labeled Region command In 1.3.2-1.3.5 I see Edit > Labeled Region command- there is no Sync-Locking Edit > Labeled Region> Delete just deletes the audio and not the labels -------------------------------------------------------------- In 1.3.6 we temporarily introduced sync locking, but it wasn't called that it was Tracks > Link Audio and Label Tracks a) there is no visual cue - no chains, no clocks b) it always defaults to "on" every time you relaunch But 1.3.6 exhibits the behaviors that Steve summarized in the quality email thread and I wrote up in the bug thread in Comment #0 i) with that "Link..." set "on" - then Edit > Labeled Region> Delete/Cut deletes both the audio and the labels - maintaining sync ii) with that "Link..." set "off" - then Edit > Labeled Region> Delete/Cut deletes just the audio and loses sync ------------------------------------------------- 1.3.10-1.3.13 (I do not have 1.3.8 or 1.3.9) the Tracks > Link Audio and Label Tracks is missing, removed. 1.3.14 proper Tracks > Sync-Lock Tracks gets introduced i) with Sync-Lock "off" (default) - then Edit > Labeled Region> Delete/Cut deletes just the audio and loses sync ii) with Sync-Lock set "on" - then Edit > Labeled Region> Delete/Cut are both grayed-out and inoperable This behavior obtains all the way through to 2.4.2 and alpha 3.0.0 The only change being that in 2.0.3 and onwards Edit > Labeled Region... was changed to Edit > Labeled Audio... So this is thus a regression on the behaviors in 1.3.6 - and in that version it was possible for the user who wanted to maintain sync between audio and label tracks when using Labelled Regions/Labelled Audio commands could do so by turning on Sync-Lock. And thus I believe we should restore this behavior and not just gray-oy the Labeled Audio>Cut/Delete commands when Sync-Lock is "on".
And raised to P2 due to the regression.
I've committed a change in: https://github.com/audacity/audacity/commit/086caca All it does is allows those two menu items to be enabled if sync-lock is turned on. I just wanted to get it enabled so you guys can have a go. However, when sync-lock IS on, I do not believe the "cut" or "delete" actions are working as you guys expect. I'll try to follow the QA thread, but some guidance on what is desired would be helpful.
Nevermind, I understand what's expected. I'll see if I can make it work as desired.
(In reply to Leland Lucius from comment #4) I was just about to start work on this - but on the basis of your comment, Leland, I'll hold off till you've worked on the "FIX"
Created attachment 1050 [details] Sample project (BTW: Much easier to attach sample projects now.) Notice in the sample project that ONLY the 1st label track is selected. Near as I can tell, none of the "Labeled Audio" items take into account Sync-Lock'd tracks. Open the unmodified project and select "Split Cut" from the "Labeled Audio" menu. Notice that audio from both audio tracks was cut. Shouldn't that be just from the 1st audio track or rather all audio tracks in the selected Sync-Lock'd group?
Comment on attachment 1050 [details] Sample project Replacing with uncompressed version.
Created attachment 1051 [details] Sample project Well, the plan was to attach an uncompressed version, but it's too big, so here's a zip'd version.
(In reply to Leland Lucius from comment #6) > Created attachment 1050 [details] > Sample project > > (BTW: Much easier to attach sample projects now.) > > Notice in the sample project that ONLY the 1st label track is selected. > > Near as I can tell, none of the "Labeled Audio" items take into account > Sync-Lock'd tracks. Open the unmodified project and select "Split Cut" from > the "Labeled Audio" menu. Notice that audio from both audio tracks was cut. > > Shouldn't that be just from the 1st audio track or rather all audio tracks > in the selected Sync-Lock'd group? I think the normal "Edit -> Remove Special -> Split Cut" does this correctly. It only processes the tracks within the selected sync-lock group(s). (This goes for the rest of the "normal" Edit items as well.)
Created attachment 1052 [details] Delete labeled audio before the delete Well strictly speaking the bug as described is fixed, as with Sync-Lock on the two commands Edit>Labelled Audio>Cut and Edit>Labelled Audio>Delete are no longer grayed out and can be used to make deletions. Whether they do what we want when Sync-Lock is on is another matter ... See my attached image her with two labelled sections selected in the label track just before using Edit>Labelled Audio>Delete. You'll need the next comment and attachment to see the result
Created attachment 1053 [details] Delete labeled audio after the delete This is the follw-on from Comment #10 Here we observe that indeed the "labelled audio" has been deleted. BUT the related label track which is a) sync-locked b) selected is left untouched. You might argue that strictly speaking the command has done "what it says on the tin" as it has deleted "labelled audio" - no mention in the command of related labels. However this flies in the face of sync-locking. If we want to maintain the behavior this way and are happy with it then I can document it - but it looks a bit odd to me.
I do like the way that if part of the selection is over only part of any of the labeled audio chunks then the Edit>Labeled Audio commands are all grayed out and inaccessible, including the Cut and Delete.
(In reply to Peter Sampson from comment #11) In contrast if you make the same selection as in the image in the attachment in Comment #11 (just selection in the label track - but sync-lock clocks in the audio) and then use Edit>Cut or Edit>Delete The the Sync-lock is honored and the deletion is made from both the label track and the audio track - thus keeping the two tracks in sync (particularly) the label "4" and its associated audio - the reverse chirp. This is why I think the behavior in Comment #11 is wrong - it is not consistent.
Further changes committed in: https://github.com/audacity/audacity/commit/26d8fcad66479754b1481b4136022379d2240030 These address the residual of the Label Audio items not acting the way they should. Please give each a try with and without sync-lock enabled. The only difference you should see with sync-lock enabled and not enabled is that all tracks in a sync-lock group, even it not specifically selected, will be modified. With sync-lock disabled, only the selected tracks will be modified. In both cases, selected labels still control what portions of a track get modified. (At least, I hope that's the way everything works. :-))
(In reply to Leland Lucius from comment #14) Testing on W10 with Audacity 3.0.0 f2abbce Testing using my project from Comment #10 It now works properly when Sync-Lock is set "on", with both the labelled audio and its associated labels being deleted. But when Sync-Lock is "off a major issue has been introduced. a) when selection is made in the label track and in the audio, then both labels and audio are deleted (I think this is probably fine - and better than what used to happen in 2.4.2 and earlier where only the audio was deleted and the labels were left untouched - if you want to just delete audio and leave labels then you can select the audio and use the normal Cut and Delete commands). b) BUT if you select in just the label track and use the labelled audio cut or delete then it is the labels in the label track that are deleted and not the audio. This is wrong. c) If you select in just the audio and use Edit>Labeled Audio you will observe that the commands are all grayed out, including the Cut and Delete. This was always the case previously (in 2.4.2 and previous 3.0.0 alphas) So: a) is, I think, an improvement c) stays the same b) is a serious residual bug that has been introduced and MUST be fixed.
(In reply to Peter Sampson from comment #15) > b) BUT if you select in just the label track and use the labelled audio cut > or delete then it is the labels in the label track that are deleted and not > the audio. This is wrong. > If sync-lock is off and you have only labels selected, which audio should it delete? With it off, there's basically no sync-lock groups, so should it just automatically delete from all audio tracks?
Try this commit on for size: https://github.com/audacity/audacity/commit/235cc24
Don't test this yet. My brain kicked in while in the shower and this is (slightly) incorrect. "Final" fix coming soon.
Okay, now give it a try: https://github.com/audacity/audacity/commit/e8b2602
(In reply to Leland Lucius from comment #19) Looks good on Linux.
(In reply to Leland Lucius from comment #19) Tested on W10 and macOS 11.1 with Audacity 3.0.0 b5ee77f This now looks good to me on both platform. 1) with sync-lock OFF a) Audacity deletes all audio in all tracks within the selected label ranges b) all label tracks are left untouched, including the selected labels 2) with sync-lock ON a) only the audio tracks in the SLTG(s) are deleted - all other audio tracks are unchanged b) the selected labels in the label track(s) for the STLG(s) are deleted, thereby maintaining sync in the SLTG(s) between audio and labels. c) multiple SLTGs can be selected - each is operated on independently. I will take a further look at the Manual to ensure that these behaviors are properly explained.