Delete between labels

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Delete between labels

Post by Edgar » Thu Sep 02, 2010 3:10 am

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):

Code: Select all

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):

Code: Select all


   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.

Code: Select all

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.
Attachments
delBetweenLabels.patch
(6.4 KiB) Downloaded 126 times
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Delete between labels

Post by steve » Thu Sep 02, 2010 4:36 am

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.
Edgar wrote: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.
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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Delete between labels

Post by waxcylinder » Thu Sep 02, 2010 9:43 am

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
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Delete between labels

Post by Edgar » Thu Sep 02, 2010 6:14 pm

waxcylinder wrote: 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?
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.
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Delete between labels

Post by Edgar » Thu Sep 02, 2010 6:25 pm

stevethefiddle wrote: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.
[...]

This is clearly a lot more steps than having a special function that does the whole lot in one go
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!
stevethefiddle wrote:
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
Adding "Select Between Labels" is trivial, let me put the code in a separate reply...
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Delete between labels

Post by Edgar » Thu Sep 02, 2010 7:38 pm

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):

Code: Select all

void OnSelectAllTracks();
void OnDeleteBetweenLabels();//efm5
void OnSelectBetweenLabels();//efm5
Now, change the header file Project.h near line number 554:

Code: Select all

 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:

Code: Select all

   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):

Code: Select all

   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:

Code: Select all

//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 :> !
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Delete between labels

Post by Gale Andrews » Sun Sep 05, 2010 1:40 am

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
Last edited by Gale Andrews on Fri Apr 24, 2015 3:29 pm, edited 2 times in total.
Reason: added note re retention of this thread in the forum
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Delete between labels

Post by steve » Sun Sep 05, 2010 11:13 am

Gale Andrews wrote:Personally I would like to select between labels by double-click in the label track.
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?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Delete between labels

Post by Edgar » Sun Sep 05, 2010 5:48 pm

Gale Andrews wrote:Personally I would like to select between labels by double-click in the label track.
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)

Code: Select all


   // 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)
stevethefiddle wrote:For consistency with the behaviour of other track types [...] double clicking outside of any labels select from the first label to the last label?
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?
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Delete between labels

Post by steve » Sun Sep 05, 2010 6:46 pm

Edgar wrote:I see four kinds of tracks -- Audio, Stereo, Label, and Time.
Oops, I forgot "Time" tracks, but they're just a bit weird anyway :)
Edgar wrote:double-clicking in Audio, Stereo and Label all result in ALL of the audio being selected
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.
tracks000.png
tracks000.png (15 KiB) Viewed 4465 times
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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply