Moving the selected area

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
Azid
Posts: 3
Joined: Sat Nov 07, 2009 12:59 pm
Operating System: Please select

Moving the selected area

Post by Azid » Sat Nov 07, 2009 1:11 pm

Hello,

When you have selected a certain area is it possible to move the selection?

Like if you have selected 16 beats and then you want to move the selection to select next 16 beats
without having deal with making the selection window the right size again. It then would be easy to add a label.
Also, I couldn't find a way to copy a label track region and paste it after the first region.

I'm looking for easy way to mark labels.
Any ideas? is it possible?

billw58
Forum Staff
Posts: 5565
Joined: Wed Aug 12, 2009 2:10 am
Operating System: macOS 10.15 Catalina or later

Re: Moving the selected area

Post by billw58 » Sat Nov 07, 2009 3:10 pm

Azid wrote:Hello,
Like if you have selected 16 beats and then you want to move the selection to select next 16 beats
without having deal with making the selection window the right size again. It then would be easy to add a label.
Also, I couldn't find a way to copy a label track region and paste it after the first region.
I'm looking for easy way to mark labels.
Well, it can be done, but not in 1.3.9. If you're feeling adventurous you could download the latest 1.3.10 nightly build

http://wiki.audacityteam.org/index.php? ... s_Binaries

Label copy/paste has been considerably improved. Before you do that let's wait until a forum Windows user chimes in on the up-to-date-ness of the file linked to there.

Or you could wait a few weeks for the release of 2.0.

If you do try the nightly build, this manual page shows how to do what you want:

http://manual.audacityteam.org/index.ph ... ing_labels

-- Bill

Storer
Posts: 91
Joined: Wed Mar 04, 2009 8:02 pm
Operating System: Please select

Re: Moving the selected area

Post by Storer » Sat Nov 07, 2009 6:42 pm

Azid,
There are at least two ways to move the 16-bar selection without changing the length.

1) Use the numeric selection bar at the bottom of the screen. Set the center value to show Length. Now you can move the selection by entering a new value for Selection Start.

2) With this second method, you can do the entire labeling process from the keyboard, including moving the time selection forward by its own length.
For this method, you need to know that pressing Enter will toggle the track selection state for the track currently in focus (outlined with yellow) -- track menu is light blue for selected and light tan for not selected.
Be sure the Menu->Tracks->Link Audio and Label Tracks is NOT checked. Also make sure the Snap To box in the Selection Bar is not checked.
a) Once you have the first 16 bars selected, Duplicate the selection (CTRL-D) to a new track. The yellow focus rectangle will still be on the original track, and both tracks are selected -- the track menu at the left of each track is light blue.
b) Press Enter to toggle the track selection of the top track -- track menu changes to light tan -- unselected.
c) Press CTRL-B to create a label for the first 16 bars. Type the label name, and press Enter to finish the label and unselect the label text.
d) The new label track starts as a selected track (blue track menu) with the focus (yellow outline). Press Enter again to unselect the label track.
Now only the track with the 16 bars should be selected.
e) Switch to the Time Shift tool ( the <--> tool). You can use function key F5 to do this. Click in your 16-bar track and slide it to the right until the left edge lines up with the end of the first label. You'll know it is aligned when the vertical yellow alignment indicator shows.
[ Alternate method for this step using only the keyboard: Rather than using the mouse and Time Shift to move the selection, you can also use Menu->Tracks->Align and Move Cursor->Align with Selection End. Currently, you cannot assign a key-stroke to this menu item but you can do it from the keyboard by holding down the ALT key while typing T G E. For this method you do not need to switch tools -- it will work with the Selection tool active. ]
f) Return to step C to create the next label.

Once you get it set up, this is probably faster than using the numeric Selection Bar because you don't have to add the length to the selection start value each time.

Once you have created all the labels, you'll probably have to move the boundaries of the labels slightly to stay in sync with the beat of the music. Do this by clicking the little circle between the labels and drag it left or right to align it. You can use the '1' key to play from a half second before the cursor to a half second after the cursor.

Hope this makes your task a little easier.

Dave

Azid
Posts: 3
Joined: Sat Nov 07, 2009 12:59 pm
Operating System: Please select

Re: Moving the selected area

Post by Azid » Sun Nov 08, 2009 5:52 am

Thanks Dave! :) Really nice way of doing it, especially with keyboard only.

Bill, I'm going to try out the nightly build version(s).

I hope that in future versions of audacity you can slide the selection
window. It would be nice to have continuous loop while you edit the selection start and end boundaries, so you could hear when the 16 beats have been precisely selected :). Now you have to stop and then put
looping back on to hear the new selection area.

Anyway, before you answered I did a program so i could import the labels.
Input is second, just give [start], [selection length], [end of the area].
Then just redirect the output to a file (./program >labels.txt).
(You probably have to export the first selection to see proper precision)

Code: Select all

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char**argv)
{
float len, start, end;
unsigned long int i,times;

if (argc < 3)
  {
    printf("Give params, start, len, endn");
    exit(1);
  }
  
start = (float)atof(argv[1]);
len = (float)atof(argv[2]);
times =  (unsigned long int)((atof(argv[3]) - start) / len)+1;
end = start+len;


for(i=0; i < times; i++)
{ 
  printf("%f    %f      %ldn", start, end,i+1);
  start += len;
  end += len;

  
}

return 0;
}
-Andy
Last edited by Azid on Sun Nov 08, 2009 6:14 am, edited 1 time in total.

kozikowski
Forum Staff
Posts: 68902
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Moving the selected area

Post by kozikowski » Sun Nov 08, 2009 6:04 am

<<<It would be nice to have continuous loop while you edit the selection start and end boundaries>>>

Audacity doesn't do anything in real time. It's a post production management tool. Same reason it doesn't scrub. Or apply effects during capture. All related.

Koz

Azid
Posts: 3
Joined: Sat Nov 07, 2009 12:59 pm
Operating System: Please select

Re: Moving the selected area

Post by Azid » Sun Nov 08, 2009 6:17 am

kozikowski wrote:<<<It would be nice to have continuous loop while you edit the selection start and end boundaries>>>

Audacity doesn't do anything in real time. It's a post production management tool. Same reason it doesn't scrub. Or apply effects during capture. All related.

Koz
Well, it wouldn't be hard to code I think. Without looking at the source code and it would be very useful feature
when slicing a sample into beats or splitting a large piece into 16 beat regions because you need to have it precisely cut.

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

Re: Moving the selected area

Post by steve » Sun Nov 08, 2009 8:46 pm

Azid wrote:Well, it wouldn't be hard to code I think. Without looking at the source code .....
Here's the source code: http://sourceforge.net/projects/audacity/files/

Audacity development should be against the current cvs code: http://audacityteam.org/community/developers
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked