Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2408 - A region label gets split on inserting audio when Sync-lock is turned on
A region label gets split on inserting audio when Sync-lock is turned on
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Labels
2.4.0
Per OS All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-30 11:05 UTC by Peter Sampson
Modified: 2020-05-31 12:51 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
1) Turn on sync-locking 2) get 3 minute song 3) create region label from 1 min to 2 mins 4) create a region label from 2min30secs to 3 mins 5) set cursor to 1min 30 secs 6) Generate>Chirp of 30 seconds (or paste 30 seconds of previously cut audio here) 7) Observe: the label splits either side of the chirp, the chirp (or copied audio) remains unlabelled (see attachment) 8) Observer the final 30 seconds remains intact labelled as before
Release Note:
Group: Editing *When sync-lock is on, if you insert audio into the rage of a region label: the label is split into two separate labels, both labels have exactly the same text, only the original audio is "labelled" and the inserted audio is unlabelled.
First Git SHA:
Group: ---
Workaround:
If you don't require accuracy: 1) click on the circle at the right hand border of the left label and drg that label to extend its range to the right border of the right hand label. 2) Then delete the right label. There are no yellow snap guides in the label track ta aid accuracy. If you require total accuracy: 1) accurately select the audio from the left of the left label to the right of the right label - the yellow snap guides will aid accuracy 2) add label at selection (Ctrl+B, or Cmd+B on Mac) 3) copy the text from either the left or right labels 4) paste this text into the new label 5) delete the left and right labels
Closed: 2020-05-31 00:00:00
james.k.crook: Must‑Test‑All‑OS-
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
Split region label bug (70.31 KB, image/png)
2020-04-30 11:05 UTC, Peter Sampson
Details
3 SLTGs for testing Bug 2408 (129.72 KB, image/png)
2020-05-31 11:14 UTC, Peter Sampson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2020-04-30 11:05:33 UTC
Created attachment 967 [details]
Split region label bug

When sync-lock is on, if you insert audio into the rage of a region label
a) the label is split into two separate labels
b) both labels have exactly the same text
c) only the original audio is "labelled"
d) the inserted audio is unlabelled

Expected behavior: the range label should remain a single label ad should be extended to encompass the original audio and the inserted audio, this to maintain track synchronization as per the "on" Sync-lock setting.


Note that it is quite tricksy to accurately restore the two labels to be a single label of the required length - doable but takes a fair few steps (if you want or need to maintain positional accuracy).

This was originally reported user mafg1953 on the Forum:
https://forum.audacityteam.org/viewtopic.php?f=46&t=110497&p=393106

This does not appear to be a regression, rather it is long-standing behavior

-------------------------------------------------

This does not affect audio insertion within the range of a Region label when Sync-lock is off (default Audacity setting)
Comment 1 Peter Sampson 2020-04-30 11:33:22 UTC
I have graded this as P3 but I think it is marginal P2
Comment 2 Peter Sampson 2020-05-10 07:10:58 UTC
>I have graded this as P3 but I think it is marginal P2

I upgraded this to P2 - the lack of proper observance of the sync-lock, plus the tricksiness involved in the user correcting this warrant P2 IMO
Comment 3 James Crook 2020-05-29 17:43:47 UTC
DEVEL - FIX MADE
https://github.com/audacity/audacity/commit/d6f8410d566527f10ae697c47fe34fdc81b09116

This fixes the steps to reproduce, but I am a bit concerned it may have undesirable consequences when sync lock is on.  

It should be tested with three sync lock groups, and labels before, at and after the selection point, with the label track both selected and unselected when pasting.  My first attempt at a fix would modify label tracks in other sync lock groups as well as the label track(s) [note the possible plural] in the sync lock group being modified.
Comment 4 Peter Sampson 2020-05-31 06:53:54 UTC
(In reply to James Crook from comment #3)
testing on W10 with Audacity 2.4.2 b5e0565

This does NOT fix the steps to reproduce 

I still get the split label with the unlabelled 30 seconds in the middle

So marking as REOPENED
Comment 5 James Crook 2020-05-31 07:33:02 UTC
Dang.  It's fixed for paste, but not for generate.
Working on it.
Comment 6 Peter Sampson 2020-05-31 07:44:24 UTC
(In reply to James Crook from comment #5)
I'm not sure it's "fixed for paste" either.

What happens with paste is that the label remains a single label but it is not extended by the length of the pasted audio.

So that means that some audio previously carefully labelled by the user is no longer labelled.
Comment 7 Peter Sampson 2020-05-31 07:47:19 UTC
(In reply to Peter Sampson from comment #6)
IGNORE Comment #6

I forgot to turn on sync-lock  <blushes deeply>
Comment 8 James Crook 2020-05-31 08:01:23 UTC
I should be blushing for not trying all the steps.

DEVEL - FIX MADE
https://github.com/audacity/audacity/commit/9d5befc196f08fe7c314136e7007d8929829551e
Comment 9 Peter Sampson 2020-05-31 08:58:17 UTC
(In reply to James Crook from comment #8)
Testing on W10 with Audacity 2.4.2 9d5befc1

The Steps to reproduce work with both Generate and cut/copy and paste.

I will do further testing around as outlined in James' Comment #3 later.
Comment 10 Peter Sampson 2020-05-31 11:14:16 UTC
Created attachment 986 [details]
3 SLTGs for testing Bug 2408

Attached is an image of the three STLGs I set up for testing as per James's request.

I tried adding a Chirp (and a paste) in each of the three "Test-x" labelled sections - all seemed fine where only the actual STLG that was being added to got affected, the other two SLTGs remained untouched.

With multiple tracks in an SLTG when you generate a chirp in one track the other track(s) in that SLTG get a silence inserted for the duration of the chirp.  But that is what I would expect in order to retain synchronization in that SLTG (silence of blank space is what I would expect).  You can see an example of this in the attachment with the second SLTG.

Looking good on Windows.

===========================================================


In the process I have uncovered a selection bug
1) click cursor in a track in SLTG-1
2) click a label in the label track in SLG-2
3) Observe: the label is created for the duration of the step 2 label - but the selection is wrongly in SLTG-1

I will be logging this.

It caught me out a lot, and confused me, when I was doing this SLTG testing
Comment 11 Peter Sampson 2020-05-31 11:40:54 UTC
Fore safety's sake I also tested this on Mac - all looks good there too
Comment 12 Peter Sampson 2020-05-31 12:51:42 UTC
(In reply to Peter Sampson from comment #10)
>In the process I have uncovered a selection bug
>1) click cursor in a track in SLTG-1
>2) click a label in the label track in SLG-2
>3) Observe: the label is created for the duration of the step 2 label - but the >selection is wrongly in SLTG-1
>
>I will be logging this.

Logged as P2 Bug #2461