Delete between labels

Imagine that you are editing some raw audio. As you’re listening to the playback you notice the beginning of an area that you wish to remove. You use “Stop Here”, search around a little bit and find the exact start point at which you wish to start deleting – you insert a label. You start listening again and find the endpoint for your deletion – you insert a label.

Now you start the process of deleting the unwanted audio. First you do some zooming out and in until both labels are visible on screen so that you may click at the point of one of the labels and drag select over to the other label (an alternative is to click on one of the labels and drag the selection toward the other label and allow the display to scroll automatically). No matter what method you use to select the audio you must be very careful to click right on the label. Now you press Delete and as often as not you want to insert a label at this point as well.

I propose a new function – added to the edit menu so that it may be accessed via a shortcut key: Delete Between Labels. This function would allow you to click anywhere between two labels (and/or label regions) and with a shortcut keypress delete all the audio between the two. It would also insert a new label at this point, the label would be empty and active so a single backspace keypress would delete it if unneeded. If there was no label at the start or end of the audio and you made your click such that the selection would fall between the label and the start/end a dialog would open asking if you wish to proceed as though there were a label at the start/end.

As it turns out I found this idea so attractive I wrote the code! It turned out to be very simple. First you must change the Menus.h header file by adding a single line (I have surrounded it with a little context and labeled it with my initials as a comment (I would suggest putting it at or near line number 244):

void OnSelectAllTracks();
void OnDeleteBetweenLabels();//efm5

        // View Menu

Next you have to add a line of code to Menus.cpp so that Audacity knows what to do when you choose the menu item-- this single line needs to go at about line number 502 (again I surrounded with some context and label with my initials):

c->AddItem(wxT("UnlockPlayRegion"), _("&Unlock"), FN(OnUnlockPlayRegion),
              PlayRegionLockedFlag,
              PlayRegionLockedFlag);

   c->EndSubMenu();

   /////////////////////////////////////////////////////////////////////////////

   c->AddItem(wxT("DeleteBetweenLabels"), _("Delete Between Labels"), FN(OnDeleteBetweenLabels), wxT("Ctrl+Shift+D"));//efm5
#ifndef __WXMAC__
   c->AddSeparator();
#endif

   // The default shortcut key for Preferences is different on different platforms.

Note that I have chosen a shortcut key <Ctrl+Shift+D> which happens to be unused and is a good mnemonic for Delete Between Labels. Finally, I wrote a single function which accomplishes all work – it should be added at the very end of Menus.cpp.

void AudacityProject::OnDeleteBetweenLabels()
{
   AudacityProject * activeProject = GetActiveProject();
   double currentCursor = activeProject->GetSel0(); 
   if (currentCursor != activeProject->GetSel1()) {
      wxMessageBox(_("You may not perform this action with audio selected."));
      return;
   }
   TrackList * trackList = activeProject->GetTracks();
   TrackListIterator trackListIterator;
   int numLabels = 0;
   int numWaveTracks = 0;
   LabelTrack * labelTrack = NULL;
   WaveTrack * waveTrack = NULL;
   
   Track * aTrack;
   for (aTrack = trackListIterator.First(mTracks); aTrack != NULL; aTrack = trackListIterator.Next()) {
      switch (aTrack->GetKind()) {
         // Count WaveTracks, and for linked pairs, count only the second of the pair.
         case Track::Wave:
         {
            waveTrack = (WaveTrack *)aTrack;
            if (aTrack->GetLinked() == false)
               numWaveTracks++;
            break;
         }
         case Track::Label:
         {
            // Supports only one LabelTrack.
            if (labelTrack == NULL) {
               labelTrack = (LabelTrack*)aTrack;
               numLabels = labelTrack->GetNumLabels();
            }
            break;
         }
      }
   }
   if (numWaveTracks < 1) {
      wxString dialogCaption(_("Multiple Tracks Found"));
      wxString dialogMessage(_("Delete Between Labels might not be suitable for multiple tracks!nnContinue anyway?"));
      wxMessageDialog messageDialog(this, dialogMessage, dialogCaption, wxICON_QUESTION | wxYES_NO | wxYES_DEFAULT);
      int userResponse = messageDialog.ShowModal();
      if (userResponse == wxID_NO) 
         return;
   }
   if (labelTrack) {
      double startSelection = 0;
      double endSelection = 0;
      const LabelStruct * aLabel = NULL;
      int labelIndex = 0;
      //find the last label which is before the cursor
      bool foundStart = false;
      bool foundEnd = false;
      bool reLabel = true;
      while (labelIndex < numLabels) {
         aLabel = labelTrack->GetLabel(labelIndex);
         if (aLabel->t != aLabel->t1) {//region
            if (  (aLabel->t == currentCursor) ||
                  (aLabel->t1 == currentCursor) ||
                  ( (aLabel->t > currentCursor) && (aLabel->t1 < currentCursor) ) ) {
                     startSelection = aLabel->t;
                     foundStart = true;
                     endSelection = aLabel->t1;
                     foundEnd = true;
                     labelIndex = numLabels;
            }
            else {
               if (aLabel->t1 < currentCursor) {
                  startSelection = aLabel->t1;
                  foundStart = true;
                  labelIndex++;
               }
               else 
                  labelIndex = numLabels;
            }
         }
         else {//single
            if (aLabel->t == currentCursor) {
               wxMessageBox(_("The cursor may not be on a label."));
               return;
            }
            if (aLabel->t < currentCursor) {
               startSelection = aLabel->t;
               foundStart = true;
               labelIndex++;
            }
            else
               labelIndex = numLabels;
         }
      }
      //find the first label which is after the cursor
      if (!foundEnd) {
         labelIndex = 0;
         while (labelIndex < numLabels) {
            aLabel = labelTrack->GetLabel(labelIndex);
            if (aLabel->t != aLabel->t1) {//region
               if (aLabel->t > currentCursor) {
                  endSelection = aLabel->t;
                  foundEnd = true;
                  labelIndex = numLabels;
                  reLabel = false;
               }
               else 
                  labelIndex++;
            }
            else {//single
               if (aLabel->t  > currentCursor) {
                  endSelection = aLabel->t;
                  foundEnd = true;
                  labelIndex = numLabels;
               }
               else
                  labelIndex++;
            }
         }
      }
      if ((!foundStart) || (!foundEnd)) {
      wxString dialogCaption(_("Label Not Found"));
         wxString dialogMessage;
         if (!foundStart)
            dialogMessage.Append(_("No start label found.nnDo you want to delete all audio betweennthe START and the FIRST LABEL?"));
         else //!foundEnd
            dialogMessage.Append(_("No end label found.nnDo you want to delete all audio betweennthe LAST LABEL and the END?"));
         wxMessageDialog messageDialog(this, dialogMessage, dialogCaption, wxICON_QUESTION | wxYES_NO | wxYES_DEFAULT);
         int userResponse = messageDialog.ShowModal();
         if (userResponse == wxID_YES) {
            if (!foundStart){
               startSelection = waveTrack->GetStartTime();
               foundStart = true;
            }
            else {//!foundEnd
               endSelection = waveTrack->GetEndTime();
               foundEnd = true;
            }
         }
      }
      if (foundStart && foundEnd) {
         activeProject->SetSel0(startSelection);
         activeProject->SetSel1(endSelection);
         activeProject->UpdateLayout();
         TrackPanel * trackPanel = activeProject->GetTrackPanel();
         trackPanel->Refresh(false);
         OnDelete();
         if (reLabel)
            OnAddLabel();
      }
   }
}

I have attached a patch file.
delBetweenLabels.patch (6.4 KB)

That’s really nice Edgar, and I can certainly see it being useful. However there is a much easier way than the first method that you described, though not as easy as your new Ctrl+Shift+D.

At this point I would double click on the label track (to select it) then press Alt+I (to make splits at each label).
Now all you need to do to delete a section is double click anywhere within the section (to select it) and press the DEL key.

To make the existing labels move along with the data, either ensure that the label tack is also selected before you delete, or (in 1.3.12) have Linking enabled.

If you want a new label at the edit point, you can press Ctrl+B

This is clearly a lot more steps than having a special function that does the whole lot in one go, but my reservation about this new feature (if you’re suggesting it as a feature for general release) is that it is perhaps too specific in what it does. For example, what if someone wants to delete the section, but not close up the gaps (split delete), or if they want to silence the audio between labels?

I really like the “Select between Labels” aspect, but if that was “all” that the feature accomplished then I think it would be useful in a broader range of situations.
(SHIFT + L would be a neat combination for Select between Labels especially as we already have Shift + J and Shift + K, and it appears to be available).
My personal view is that selecting, deleting and then adding a label all on one key press sounds like it should be a programmable macro function (which is another thing that Audacity does not currently have).

For myself it’s a big +1 for “Select between Labels”, but I’m more ambivalent about having a (non-programmable) menu item for such a specific series of actions.

A big plus 1 from me too.

I would be able to usefuuly use this when editing out unwanted parts of radio shows that I record off-air.

Ed, are you going to submit the patch for full incorporation into Audacity?

WC

I am using this exactly as you contemplate. As for submitting the patch, the Development Team is focused on releasing a stable version and is highly adverse to adding any code involving new features at this time.

For anyone who compiles Audacity this is a very simple addition to install – with or without using a patch (patches rapidly get stale), that is why I presented the code in the thread. For those folks who do not compile I could probably post the executable for download. Unfortunately, this requires trust on the part of the folks who download the executable. It might be nice if we had some form of “vetted” repository for executables-- the code would be reviewed then compiled by a “trusted” member of the Audacity community. I would not want this to get out of hand – we would not want to hijack Audacity! This would be more on the order of allowing testing of those hobbyist Audacity programmers’ offerings.

I have a “personal” version of Audacity based on the 1.3.13a code base; it has many feature enhancements which I find that I cannot live without. I have also written a few feature enhancements which are basically “eye candy”. I eagerly await the release of the next stable version of Audacity; at that time I will offer patches based on that code base.

I also have an “unattended” version of Audacity (also based on the 1.3.13a code base). I now consider it mature and it has processed at least 1000 files in the last week running unattended overnight. Unfortunately, this concept requires the user to be able to both program and compile because adding commandline switches is necessary and for each new switch new processing code must be added. The hard parts, turning off the GUI, suppressing all relevant dialogs (I need to write a wrapper class and do a global search and replace for wxMessageBox in order to suppress ALL dialogs – that’s for some rainy day) and redirecting all output to the command line has all been done.

Obviously, I crafted this function to suit my specific needs and to be honest discovering the tools you describe is nontrivial. The function names do not clearly depict the result. Given that the manual is a wiki-based HTML style, it is often difficult to learn the best method of reforming a series of steps to achieve a desired result. That is where this forum really comes in handy – I learn new techniques everyday!

Adding “Select Between Labels” is trivial, let me put the code in a separate reply…

Select Between Labels

First, change the header file Menus.h near line number 244 (again, I add a bit of context and commented the addition with my initials):

void OnSelectAllTracks();
void OnDeleteBetweenLabels();//efm5
void OnSelectBetweenLabels();//efm5

Now, change the header file Project.h near line number 554:

 public:
    DECLARE_EVENT_TABLE()
   //efm5 start
 public:
   bool GetDeleteBetweenLabels() {return mbDeleteBetweenLabels;};
   void SetDeleteBetweenLabels(bool pDoDelete) {mbDeleteBetweenLabels = pDoDelete;};
private:
   bool mbDeleteBetweenLabels;
   //efm5 end

We have to initialize the new Boolean variable, this must be done in Project.cpp near line number 489:

   gAudacityProjects.Add(p);
   p->SetDeleteBetweenLabels(true);
   if(bMaximized) {

Now, a couple of changes in the source file Menus.cpp; first, make the application aware of the new menu item, near line number 502 (by the way, it is important not to put these two new menu items in submenus because when you do the audio selection gets messed up):

   c->AddItem(wxT("SelectBetweenLabels"), _("Select Between Labels"), FN(OnSelectBetweenLabels), wxT("Shift+L"));//efm5

There have been enough changes in the original “delete” function so that I will present it and the new function in their entirety; as before place all the following code at the very end of the file Menus.cpp:

//efm5 start
void AudacityProject::OnDeleteBetweenLabels()
{
   AudacityProject * activeProject = GetActiveProject();
   double currentCursor = activeProject->GetSel0(); 
   if (currentCursor != activeProject->GetSel1()) {
      wxMessageBox(_("You may not perform this action with audio selected."));
      SetDeleteBetweenLabels(true);
      return;
   }
   TrackList * trackList = activeProject->GetTracks();
   TrackListIterator trackListIterator;
   int numLabels = 0;
   int numWaveTracks = 0;
   LabelTrack * labelTrack = NULL;
   WaveTrack * waveTrack = NULL;
   
   Track * aTrack;
   for (aTrack = trackListIterator.First(mTracks); aTrack != NULL; aTrack = trackListIterator.Next()) {
      switch (aTrack->GetKind()) {
         // Count WaveTracks, and for linked pairs, count only the second of the pair.
         case Track::Wave:
         {
            waveTrack = (WaveTrack *)aTrack;
            if (aTrack->GetLinked() == false)
               numWaveTracks++;
            break;
         }
         case Track::Label:
         {
            // Supports only one LabelTrack.
            if (labelTrack == NULL) {
               labelTrack = (LabelTrack*)aTrack;
               numLabels = labelTrack->GetNumLabels();
            }
            break;
         }
      }
   }
   if (numWaveTracks < 1) {
      wxString dialogCaption(_("Multiple Tracks Found"));
      wxString dialogMessage(_("Delete Between Labels might not be suitable for multiple tracks!nnContinue anyway?"));
      wxMessageDialog messageDialog(this, dialogMessage, dialogCaption, wxICON_QUESTION | wxYES_NO | wxYES_DEFAULT);
      int userResponse = messageDialog.ShowModal();
      if (userResponse == wxID_NO) {
         SetDeleteBetweenLabels(true);
         return;
      }
   }
   if (labelTrack) {
      double startSelection = 0;
      double endSelection = 0;
      const LabelStruct * aLabel = NULL;
      int labelIndex = 0;
      //find the last label which is before the cursor
      bool foundStart = false;
      bool foundEnd = false;
      bool reLabel = true;
      while (labelIndex < numLabels) {
         aLabel = labelTrack->GetLabel(labelIndex);
         if (aLabel->t != aLabel->t1) {//region
            if (  (aLabel->t == currentCursor) ||
                  (aLabel->t1 == currentCursor) ||
                  ( (aLabel->t > currentCursor) && (aLabel->t1 < currentCursor) ) ) {
                     startSelection = aLabel->t;
                     foundStart = true;
                     endSelection = aLabel->t1;
                     foundEnd = true;
                     labelIndex = numLabels;
            }
            else {
               if (aLabel->t1 < currentCursor) {
                  startSelection = aLabel->t1;
                  foundStart = true;
                  labelIndex++;
               }
               else 
                  labelIndex = numLabels;
            }
         }
         else {//single
            if (aLabel->t == currentCursor) {
               wxMessageBox(_("The cursor may not be on a label."));
               SetDeleteBetweenLabels(true);
               return;
            }
            if (aLabel->t < currentCursor) {
               startSelection = aLabel->t;
               foundStart = true;
               labelIndex++;
            }
            else
               labelIndex = numLabels;
         }
      }
      //find the first label which is after the cursor
      if (!foundEnd) {
         labelIndex = 0;
         while (labelIndex < numLabels) {
            aLabel = labelTrack->GetLabel(labelIndex);
            if (aLabel->t != aLabel->t1) {//region
               if (aLabel->t > currentCursor) {
                  endSelection = aLabel->t;
                  foundEnd = true;
                  labelIndex = numLabels;
                  reLabel = false;
               }
               else 
                  labelIndex++;
            }
            else {//single
               if (aLabel->t  > currentCursor) {
                  endSelection = aLabel->t;
                  foundEnd = true;
                  labelIndex = numLabels;
               }
               else
                  labelIndex++;
            }
         }
      }
      if ((!foundStart) || (!foundEnd)) {
      wxString dialogCaption(_("Label Not Found"));
         wxString dialogMessage;
         if (!foundStart)
            dialogMessage.Append(_("No start label found.nnDo you want to delete all audio betweennthe START and the FIRST LABEL?"));
         else //!foundEnd
            dialogMessage.Append(_("No end label found.nnDo you want to delete all audio betweennthe LAST LABEL and the END?"));
         wxMessageDialog messageDialog(this, dialogMessage, dialogCaption, wxICON_QUESTION | wxYES_NO | wxYES_DEFAULT);
         int userResponse = messageDialog.ShowModal();
         if (userResponse == wxID_YES) {
            if (!foundStart){
               startSelection = waveTrack->GetStartTime();
               foundStart = true;
            }
            else {//!foundEnd
               endSelection = waveTrack->GetEndTime();
               foundEnd = true;
            }
         }
      }
      if (foundStart && foundEnd) {
         activeProject->SetSel0(startSelection);
         activeProject->SetSel1(endSelection);
         activeProject->UpdateLayout();
         TrackPanel * trackPanel = activeProject->GetTrackPanel();
         trackPanel->Refresh(false);
         if (GetDeleteBetweenLabels()) {
            OnDelete();
            if (reLabel)
               OnAddLabel();
         }
      }
   }
   SetDeleteBetweenLabels(true);
}

void AudacityProject::OnSelectBetweenLabels()
{
   SetDeleteBetweenLabels(false);
   OnDeleteBetweenLabels();
}
//efm5

Sorry that took so long--got distracted :> !

For Edgar’s original use-case (discovering a problem while playing), I often find it useful to drag an approximate region out and then adjust its boundaries, so if you label it you are working with one label only.

I think it would be better to hold off on this as it is clearly part of our Proposal Label Enhancements where we want to add features to select multiple labels. Assuming Edgar doesn’t mind, I added a link to this topic on that page (so this thread should only be trimmed, not deleted). Feel free to add any comments on the Wiki. Personally I would like to select between labels by double-click in the label track.

<<<so this thread should only be trimmed, not deleted>>>
Noted, and accordingly I’ve made it a sticky thread here in the FR section. We could instead move it to Audio Processing for retention in the forum, but that I think would render your reference in the Wiki incorrect Gale? - Peter 5Sep10.

Gale

For consistency with the behaviour of other track types, shouldn’t double clicking within a label region select the region, and double clicking outside of any labels select from the first label to the last label?

Double (left) click to select region between labels is easy–just add a few lines of code to TrackPanel.cpp around line #4595 (as usual, I have followed my convention of including some context code before and after the added material–in this case quite a bit more than I have in the past because this file is actively being worked on)

// handle shift+mouse left button
   if (event.ShiftDown() && event.ButtonDown() && (lTrack->getSelectedIndex() != -1)) {
      // if the mouse is clicked in text box, set flags
      if (lTrack->OverTextBox(lTrack->GetLabel(lTrack->getSelectedIndex()), event.m_x, event.m_y)) {
         lTrack->SetInBox(true);
         lTrack->SetDragXPos(event.m_x);
         lTrack->SetResetCursorPos(true);
         RefreshTrack(lTrack);
         return true;
      }
   }

   //efm5 start
   //handle double click left button
   if (event.ButtonDClick()) {
      GetActiveProject()->OnSelectBetweenLabels();
      return true;
   }
   //efm5 end
   // return false, there is more to do...
   return false;
}

// AS: I don't really understand why this code is sectioned off
//  from the other OnMouseEvent code.
void TrackPanel::HandleTrackSpecificMouseEvent(wxMouseEvent & event)



Could someone explain this. I see four kinds of tracks – Audio, Stereo, Label, and Time. Currently, double-clicking in Audio, Stereo and Label all result in ALL of the audio being selected with the existing labels being disregarded. Double-clicking in a Time track does not appear to do anything rational.

Steve, in regard to “consistency”, what behavior (and how do you exercise it) do you see which resembles selecting from first label to last label? Are you referring to the base Audacity code or the code that I have presented here?

Oops, I forgot “Time” tracks, but they’re just a bit weird anyway :slight_smile:

Just considering mono and stereo tracks for a moment.
That is only true in the *special case where there is just one section of audio in a track, and the audio begins at the beginning of the track.

  • though admittedly this would appear to be normal unless you are working with multi-track projects.

Double clicking on an audio clip in a track selects that audio clip.
Double clicking on an empty part of the track will select from the beginning of the first clip to the end of the last clip.

Here’s an example of a track that has two clips in a track, and the second clip (labelled “Section B”) has been double clicked.


What I am suggesting would be consistent behaviour is that double clicking on a non-empty part of a label track would produce the same result as clicking on a non-empty part of an audio track. So in the above example;
double clicking within the audio of Section B has selected the audio track region that is occupied by this bit of audio.
double clicking within the label “Section B” would select the label track region occupied by the label,

In terns of what is selected, I find the behaviour of clicking on label text is a bit strange, though it works well enough.

Moving this to another board would of course break the link on Proposal Label Enhancements but if it’s more normal to move a retained thread from this board to Audio Processing, please do that and change the link on the Wiki page accordingly.


Gale

This whole “between labels” thing has expanded my understanding of Audacity! I had never used “labeled regions” (I think what you call “clips”). After I had my “between labels” code “finished” (ha ha–to my needs at least–no error checking etc.) someone (I won’t mention names) brought up labeled regions. I went back into my code and added error checking to exclude labelled regions. Now I see that I would need to extend the code to include them if I were ever to offer the code as a “feature”. I will look at that the next rainy day (here in the Pacific Northwest the forecast is light rain out as far as the forecasts go!)

So given this color coded chart, let me see if I understand your desires:
dc regions.png
Right now, let us limit the discussion to a single mono or stereo wave track and one label track. For the sake of discussion, let’s say I have six colors (green, blue, red, yellow, lavender and purple – left-to-right). The somewhat rectangular areas are in the label track, the ellipses are in the wave track (I am not limiting the wave track double-click region to the ellipses just using the area as an example).

The current behavior is dependent on linking (just talking about labeled regions).

If linking is ON and I double click on any of the colored rectangles or ellipses all the audio is selected and the entire wave track is selected. (Note that you may place labels beyond the end of the audio.) This may not alway be true–it also seems to depend on the first aside below.

If linking is OFF (see aside) double clicking in an ellipse always selects all audio but no label. Double clicking a rectangle usually results in all audio from the start to the end of the last labeled region being selected (however on rare occasions all audio from the beginning of the first labeled region to the end is selected–I cannot get it to do this reliably but it happens and may have something to do with the aside).

[aside–I see a bug here, some state variable is not always being kept up-to-date. I can reliably get some inconsistent behavior based on the order in which I toggle the “link” icon–if it is ON when Audacity launches and I turn it OFF to test double-clicking I get one behavior, If it is OFF when I launch and I turn it ON I get different when I turn it back ON. I will post a Bugzilla if I can boil the exact steps down.]

Now, what I think should happen (all selections are INCLUSIVE–they include the sample at the label start and label end point):
Linking ON or OFF exhibits the same behavior.
double click (DC) in wave track anywhere–all audio selected no label area selected (as it is now)
DC in LT inside label region–blue rect–audio between the labels is selected
DC in LT between audio start and first label–green rect (could be discrete or region)–audio from start to 1st label track is selected
DC in LT between audio end and end of last label–lavender rect (discrete or region)–audio from end of last label to end is selected
DC in LT between 2 labels (discrete or region) audio between labels is selected (may be a case for EXCLUSION here)
DC in LT after end of audio–purple rect–tough one, select all audio or select from end of last label to end of audio (last is my preference)

Did I miss any cases? Have I got reasonable logic?

Now, what happens with multiple audio and label tracks?

[aside 2 I see another bug–the draw refresh rectangle is not calculated correctly all the time when linking is on:]

What I was describing was of course for the case where at least one of the labels is a point label. We really do lack a “non-fiddly” way to select between point labels (assuming you regard dragging a region carefully to snap with another label as “fiddly”) - and we need an accessible way to do it without a mouse, hence Ed’s suggestion. If you think of a point label as being like a split line, between which we double-click to select, the analogy with current behaviour is I think very clear.

What double-click does when only region labels are involved certainly needs discussion. If there is nothing more useful for double-click inside a region label to do than select inside that region label, that would be fine and analagous as you say, though I think I would prefer it did “something else” given we have single-click in a region label to select inside it. For example, it could be a special case of multi-select that selects to adjacent labels either side (if there are any). I would envisage that double-clicking in the label track between region labels would select that space between them. Although that breaks the analogy with clicking in white space in the waveform which selects all of it, I think it’s much more useful. It gives you an easy way to select that white space (which there isn’t now) and to also make it a region label.

I’ve updated the Wiki again with this discussion.



Gale

I think the cases presented are what I would expect though I think there are potentially better uses of double-click in the light blue rectangle than selecting inside it (I assume you mean this selects between the left and right boundaries of the region label)?

The other cases are where there are clips in the track, and all point labels or a mix of point and region labels. Double-clicking in the lavender regions should I think select from end of last label to end of the track (or the end of that clip if there are other clips). I assume that is what you mean. Similarly in the purple rectangle does your “end of audio” means the end of the white space after the end of the track? I would think DC in the purple rectangle should select end of track to end of white space.

How are you getting tiles in the lower audio track? The first label track should mean that the lower audio track is in its own group. Have you got a screen shot of the whole window?



Gale

I would tend to go with useful over consistent, providing that it’s not going to fall over when linking (or some other feature) has been developed further.

Unfortunately I think it is necessary to also throw into the equation “what happen when you click on a labels text”.
When there are multiple tracks, there are multiple scenarios depending on which (if any) tracks are selected and whether linking is on or off.

For example, with this arrangement,
tracks001.png
if you click on audio track 1, then click in the label text, with linking on, then audio tracks 1 and the label track are selected and track 2 is linked.
If you click on audio track 3, and then click in the text label, with linking on, audio track 3 and the label track are selected and audio tracks 1, 2 and 4 are linked.

If no audio tracks are selected and you click on the label text, then the region in all 4 audio tracks and the label track are selected whether linking is on or off.

I think that is what is intended, though I would have thought that the link-shading should be drawn on white space in audio tracks.

Sorry, I only kept the snippet. I think it has to do with starting with linking OFF and turning it on during the process. I fell out of a tree onto a barbwire fence a few minutes ago and sitting here is uncomfortable–I’m headed for the hottub and will try to recreate this later tonight or tomorrow. I think part of the problem is that currently there is no code to handle double clicks in label tracks. The eventual default handler might not be aware of linking.

BTW, just to clarify, just before I started all this test reporting I deleted my SVN directory and did a completely new checkout and build (Unicode Debug)–all these tests and screenshots are based on that.

Maybe we should as Al to glance at this thread?

I hope there isn’t a problem with that. Actually I think your image showing tiling in the lower audio track is OK. I get the same if I have a selected label track below your lower audio track (or of course a selected audio track below it).

The sync-locked (tiled) selection over a waveform currently covers the same area as the full (untiled) selection. Do you think a selection region should always be drawn over white space? I’d concede that might seem logical if you consider space between labels in a label track as analogous to white space (where we do draw a region over that inter-label space). I think it’s currently OK though.

I wasn’t sure of the point you were making with your two-audio-one-label-two-audio-tracks image. I assume if you select between labels, that selection would obey the same rules for display of that selection in audio tracks as a selection inside a region label or any arbitrary region in the label track would?



Gale

Duly noted - I will do some trimming and move the thread once it passes the normal one month hiatus with no further activity.

WC

Tried sending PM as this is of little general interest but could see no easy way to attach a pic.

The following were the steps I had made before getting the imaged (sorry for the size wanted an unedited screengrab) result:

full screen conditions
linking OFF(OFF) at launch
gen tone
make 2 labeled regions (LR)
DoubleClick (DC) everywhere
linkin ON (ON)
DC everywhere (DCe)
gen noise
DCe
OFF
DCe
make 1 LR
DCe
ON
DCe
resize both wave (not label) tracks smaller
select region (note DO NOT make into LR)
resize both wave (not label) tracks larger
select region (note DO NOT make into LR)
resize both wave (not label) tracks smaller
BINGO


I doubt all the above steps are necessary. I will play around and see if I can pare it down and if so will post to Bugzilla. I suspect it is some intermingled combo of turning linking on/off and resizing.