Audacity Selection

From Audacity Development Manual
Revision as of 12:03, 14 April 2013 by PeterSampson (talk | contribs) (I am coming round to liking Gale's re-wording but I would probably want to tweak with links to the mouse/keyboard/Selection Toolbar sections ...)
Jump to: navigation, search
Peter 27Feb13: Should we consider moving the section currently H3 titled "It is possible to change which tracks are selected and the selected time range independently" further down the page, probably into the Selecting using the keyboard section. Or even moving the whole Special characteristics of audio selection further down the page as to me it gets in the way of the "meat" of this page which is (or should be) "How do I select ... ?"
  • Gale 02Mar13: Independent tracks and range selection isn't solely keyboard use, so should not be moved into that, in spite of the duplication between sections. Yes I felt the page takes a long time to get started too (which is good for first time readers but not returning readers). That was why I added the FAQ How do I select audio in one track? and the FAQ underneath it.

Peter: Also I think this page is far too long (leading to TLDR) so I think it is a further candidate for breaking into a landing page with selected sub-pages for some of the detail e.g. the Snap-to Guides and the Selection Format sections.
A custom TOC for the major sections would probably help too. Thoughts?

  • Gale 02Mar13:
    1. Really Selection Toolbar belongs in "Selecting using the keyboard" (it's fundamental to that) and only the Selection Formats section of it is also for sighted users.
    2. I think it might work to split off Selection Formats given Selection Toolbar already has a page of its own that covers much of what is here.
    3. And yes I guess it's looking like the section down to "Selecting regions using the mouse" could actually be a landing page for split sections.
    4. I also think "Selecting while audio is playing" might just as well go in my new "Listening to the selection" section.
    • Peter 8Apr13: Done #4 - but the material is not in the right place yet, both bits probably need to move down the page.
    • Peter 9Apr13: Done #1 and #2.
      • I have dealt with #3 pro-tem by reordering the material on the page.
      • The page is still too long imo, my initial proposal is to hive the entire section on Snap-to off to a new page of its own, linking to it both from this page and from the Selection Toolbar page.
      • This may still not give us a short enough page but it should give us a better structured page to work with, possibly hiving off other sections.
      • I do like that in this re-structure the two "how to select sections", using mouse and keyboard, come first ahead of "changing selections" as the reader clearly has to understand how to make a selection before he/she changes it. It makes the page get started more quickly than in its previous incarnation.
    • Gale 09Apr13: I think moving the information about special characteristics of Audacity selection to the bottom is questionable, and if it stops down there would be further justification for renaming the page to "Selecting Audio". If this becomes just a landing page then perhaps that text is a good introduction; if not then it serves little purpose down there.
      • Peter 13Apr13: I've come round to thinking that you're basically right Gale so I restored it to be a pre-amble at the top. But I did think that the latter half of it belonged better in the "selection by mouse" section so I moved that chunk there.
        • Ed 13Apr13 : I see no reason to put this text in a green box, I think it should just be a regular section not in a div.
        • Gale 13Apr13: But it's less easy then to skip the preamble on subsequent visits. The intro and the first paragraph of the note are actually similar so I tried combining them (see below) but I don't think it works as well as intro then note.
        • Ed 13Apr13 : My point is that a "note" is like an "aside" - it is an expansion on the previous sentence/section and is intrinsic to that sentence/section. If in fact this (or any similar) note is directly related to the introduction it should be visually within the introduction. Other than in a novel where it might be (very rarely) used it is considered bad grammar to start a section or chapter with an aside.
        • Gale 14Apr13: I agree it's an aside, but it's very non-intrinsic once you've read it, and we want it out of the way once read. In some cases elsewhere the note under the intro seems more intrinsic. The point in even those cases is that you can only have one intro and we want a mechanism to break the info-before-text up into manageable chunks.

          You are not saying what your solution is - do you want something like the longer intro but no note that I drafted out?

        • Ed 13Apr13 : I am more arguing in the general then specific here. I would make some major edits to the intro of this specific page which would result in it being somewhat shorter. In this specific case I do not believe that the text in the Note div is in reality a "note" in that it does not relate specifically to immediately proceeding text in a manner to expand upon it parenthetically. How about this - let me throw up a couple of options on the Talk page…
        • Peter 14Apr13: Basically I agree with Ed about not having a note div immediately following an intro div. However, this is currently a Work-In-Progress and yesterday I basically "parked" the remnants of what was the footnote and is now again a preamble at the top of the page (as Gale earlier indicated he preferred); parked there while I consider further the page structure. The way it is now it would not be right to have the pre-amble as plain text for the very reason that Gale gives, the pre-amble is a one-off read and need s to be "out of the way" for subsequent reading visits. We need to remember that the two basic users of this page are naïve users (who need a full "tutorial") and skilled users (who know a fair bit about selection already but need to hone their skills - that's how I stumbled across the shortcomings of this page). It is difficult to suit both users but we do need to try - I'm hoping that splitting the page into landing page and sub-pages will help with this but we will only get to see that when I get to work on the next strawman - and in that strawman it may become clearer how we should deal with the preamble.
        • Peter 14Apr13: With regard to the content of the intro note I am extremely keen to retain the " ... using the mouse then applying an edit or effect. Visually impaired users can fully manipulate selections using the keyboard" text. I specifically added the guide for VI users in response to a comment from Gale in an email thread relating to the upgrade of this page - and I do want them to be able to navigate directly, and as soon as possible, to the section which is relevant to them. I did also add a link in the intro note to use of the Selection Toolbar for "precision" selecting as that as relevant to both sighted and VI users (and currently that subsection lives in the k/b section focused on VI users). Somehow that edit got lost (I probably neglected to submit it after a preview - easily done I find ...) I will restore that link. I am coming round to liking Gale's re-wording but I would probably want to tweak with links to the mouse/keyboard/Selection Toolbar sections - I would prefer to think about this later onec I have worked on the strawman and we can see what the page looks like then.
  • Peter 13Apr13: I next plan to hive off the "Snap-to Guides" section to it's own page, providing suitable links to it from here (and maybe other places in the Manual). This will probably be the last change before I move to a strawman to experiment with thinning out this page to a landing page with sub-pages.
Ed 8Apr13 I do not think that the word "Audacity" in the title of this page adds any meaning. Given that one can only currently select in an audio track (selecting only in a label track seems to also select in the previous audio track or, if there is none, has no real effect), I propose we change the name of this page to something more like "Selecting Audio".
  • Gale 08Apr13: +0.5 I don't have a strong view but your comment does show that selection in label track only is different to selecting audio (it does have an effect, but the last paragraph should be more related to selection). A rename using DISPLAYTITLE would be OK.
    • Peter 8Apr13: Selecting in a label track does not, for me, also select in the preceding audio track - and the selection does have an effect as you can then delete the selected section from the label track without affecting the audio track (providing sync0lock is off).
      • Ed 8Apr13 : it does select the audio, there's just no (obvious) visual indication of that fact; create some audio (Noise is fine), add a label so that you have a label track, make sure that sync lock is off, select a bit of only the label track - hit the spacebar - the audio related to the selected portion of the label track plays. You are however correct in that selecting just in the label track (with sync lock off) does allow one to manipulate the length of the label track (in what I consider to be a dangerous manner).
      • Peter 9Apr13: The audio plays not because *it* is selected but rather because a selection exists in the Timeline, so pressing the play/spacebar/whatever causes what is defined by the timeline selection to play.
      • Ed 8Apr13 : I will not argue the point further, it is trivial!

Sélection dans Audacity Flag of Holland small.png

Audacity's ability to select precise parts of a sound for editing makes it a very powerful editing tool. Most operations are performed by selecting a range of audio in one or more tracks using the mouse then applying an edit or effect. Visually impaired users can fully manipulate selections using the keyboard.
Special characteristics of audio selection

In a word processor, most operations are performed by selecting a range of text (usually with the mouse), then choosing some option from a toolbar or menu, for example to cut the text, or make it bold. Audacity works in much the same way, for example a section of audio can be selected and deleted and another selection can be made louder.

Audacity selections can also be more complex than word processor selections because the audio selection includes both a set of selected tracks and a range of time within those selected tracks. You can thus select multiple tracks so that changes apply to all of them, but you could instead select individual tracks, changing each track in a different way. In either case, you may or may not want the changes to apply to the whole time range of the tracks.
Audacity's ability to select precise parts of a sound for editing makes it a very powerful editing tool.

In some ways selecting and changing audio is like selecting and changing text in a word processing program. Just as you might select then remove text or make it bold, one length of audio can be selected then deleted or moved, while another selection could have an effect applied to it to louden or otherwise change its sound. Selections are usually made by mouse but visually impaired users can instead fully manipulate selections using the keyboard.

Audacity selections can also be more complex than word processor selections because the audio selection includes both a set of selected tracks and a range of time within those selected tracks. You can thus select multiple tracks so that changes apply to all of them, but you could instead select individual tracks, changing each track in a different way. In either case, you may or may not want the changes to apply to the whole time range of the tracks.


Selecting regions using the mouse

The easiest way to select a region of audio is to click and drag. If it's not already selected, choose the Selection tool Selection tool from Tools Toolbar, below:

Tools Toolbar

Now click the left mouse button anywhere inside of an audio track, and click and drag to the other edge of your selection, and release. Some tips:

  • You can drag from left to right or from right to left, it doesn't matter.
  • You can start your selection in one track, and end it in another track, and both tracks (plus the tracks in-between) will all end up selected.
  • If you move the mouse past the left or right edge of the window while dragging, Audacity will scroll the window in that direction as long as the mouse button is down.

Normally, you select both the tracks and the time range simultaneously, by clicking and dragging. For example, to create the selection in the image below, make sure you're using Selection tool Selection tool, click in the track just after 2.0 seconds in the first track, then drag rightwards to just after 5.0 seconds as displayed on the Timeline, then downwards so that the gray selection area now includes the second track:

Region from 2 to 5 seconds in the first two tracks selected.

Note that because the drag started in the first track and extended into the second track, only those two tracks are selected, as indicated by the darker gray color of the Track Control Panel. Therefore, any operation you perform will now only affect the selected area of the first two tracks.

Extending or contracting a selection

To extend or contract an existing selection, hold down the SHIFT key while left-clicking the mouse. The nearest edge of the selection will jump to the current mouse pointer location. This is really useful if you know exactly what you want to select but it doesn't easily fit on the screen at once:

  • Click at one edge of the selection
  • Scroll until the other edge is in view
  • Shift-click to set the other edge of the selection.

You can also extend or contract a selection by hovering the mouse near the edge of a selection, then clicking and dragging. When you hover close enough to the edge of a selection, the mouse pointer changes to a hand with pointing finger, indicating you can now click and drag the selection:

Selection extended, mouse pointer displaying as a hand with pointing finger.

You can turn off that feature if required; open the Preferences, then click on the Tracks tab, and uncheck "Enable dragging of left and right selection edges".

Selecting tracks using the mouse

There are two very useful things you can do by clicking in the Track Control Panel to the left of a track - make sure that you click in a neutral area, not inside one of the buttons or sliders. See Audio Tracks for more about the Track Control Panel.

Clicking on a track's Track Control Panel will select the entire track. That's a very easy way to apply an effect to an entire track. If you want to select all tracks, you can alternatively choose Select All from the Edit menu.

There's another handy way to select an entire track or clip: just double-click inside it.

If you hold down the SHIFT key while left-clicking on a track's Track Control Panel, you can toggle the selectedness of that track. For example, if you want to select the first and third tracks only, you could choose Edit > Select > All and then shift-click on the middle track to deselect it while leaving the others selected.

If you deselect all tracks (by toggling selectedness off in all tracks or by clicking in the gray background underneath the bottom track in the project), any time region that was present will remain visible in the Timeline. This gives you a way to play this selection even though no tracks are selected.

Selecting using the keyboard

You can modify the selection entirely using the keyboard. The currently focused track is indicated with a glowing border, as you can see from the track called "Guest" in this image:

The middle track of three showing its focused state

To change the focused track, just press Up Arrow or Down Arrow. In this image, we pressed down arrow to change focus to the "Bkgnd" track:

Now the bottom track shows its focused state

Once a track has focus, press Enter or Return to change it from being selected to not selected, or from not selected to selected.

Hold SHIFT while pressing UP or DOWN to extend or contract the selection up or down tracks.

To modify the selected time range:

  • Hold SHIFT while pressing LEFT or RIGHT to extend the selection from the left or right edge respectively.
  • Hold CTRL + SHIFT while pressing LEFT or RIGHT to contract the selection from the right or left edge respectively.

If you don't already have a selection, just a cursor, then pressing Left Arrow or Right Arrow will move the cursor. If you do have a selection, pressing the left arrow will take you to the beginning of the selection, and the right arrow will take you to the end.

If you put a checkmark in the checked checkbox Snap To checkbox in Selection Toolbar, then you can use the keyboard as above to move the cursor or selection edge to the nearest second, hundredth of a second, CDDA frame or any chosen selection format.

Selection Toolbar

Selection Toolbar

One handy way to keep track of what you've selected and to make very precise modifications is to use Selection Toolbar (shown above). For our purposes here, let's concentrate on the main purpose of the Toolbar, the Selection Start and End/Length boxes. By changing the radio button from "End" to "Length", you can display and control the length of the selection instead of the endpoint. Which one is useful for you depends on the circumstances: if you need a clip from a song that's exactly 30 seconds long, you may want to set the length to 30, and then modify the start until you have just what you want. Other times you may know the exact end time but need to figure out where to start, independent of the resulting length.

Selection Toolbar also displays and can move the cursor position without there being a region selected. To move the cursor to an exact position using Selection Toolbar, set the "Selection Start" and "End" boxes to the same value.

Gale 10Apr13: ToDo-2 Add description of using [ and ] to do this.

You can set the values displayed in the Selection Toolbar boxes using the mouse and/or keyboard. To change a particular digit in a box, click on it, or you can navigate to it using only the keyboard:

Key Action
CTRL + F6 Move the focus to/from Selection Toolbar
TAB Move between the Selection Toolbar controls
LEFT / RIGHT Move cursor in a box or to/from End/Length
UP / DOWN Increase or decrease the highlighted digit
BACKSPACE Reset the last digit entered to zero

Once you have clicked on or navigated to a digit, it will highlight in white to show it is active. You can then increase/decrease its value using the mouse wheel or UP/DOWN, or type a new value over it:

Selection Toolbar showing "End/Length" selected and last digit highlighted

After typing a value, the cursor automatically moves to the next digit along and selects it so that you can type the required values one after the other.

Selection Formats

By default,Selection Toolbar lets you enter values in units of hours, minutes and milliseconds. This is appropriate and accurate enough for most purposes. However if you need for example to make a selection that is accurate to the nearest sample or is defined in CDDA or film frames, numerous other Selection Formats are available to represent time. To choose other formats, click the triangle to right of any box. You can also select in or right-click over any digit in a box (or use a keyboard equivalent).

Changing the selected time range

Once you have a selected time range you can move either edge of the selection so as to expand or contract the selected length, or you may want to expand the selection at one edge and contract it at the other so as to select a similar length in a slightly different place.

To move either edge of the selection, Audacity offers multiple methods.

  • Move the mouse pointer to one of the edges of the selection until it changes to the "finger with pointing hand". Click and drag to move that edge of the selection.
  • Hold SHIFT while clicking near one of the edges of the selection to extend or contract the selection to the time point you clicked on.
  • Hold SHIFT while pressing LEFT or RIGHT to extend the selection from the left or right edge respectively.
  • Hold CTRL + SHIFT while pressing LEFT or RIGHT to contract the selection from the right or left edge respectively.
  • Use Selection Toolbar to precisely place the selection edges by entering their time positions.
Gale 10Apr13: ToDo-2 Add description of using [ and ] to do this.
Advice Mac users: remember to substitute the Command key for the Control key.

Including or excluding the existing time range in other tracks

You can also change which tracks are selected independently of the time range, so that selecting an extra track includes the selected range in that track, and deselecting a selected track moves the selected range out of that track. This gives you complete flexibility to extend, contract or move the existing time range up or down between multiple tracks. <p> To change which tracks are selected without affecting the time range, there are multiple methods.

  • Hold SHIFT while clicking on the Track Control Panel to the left of the waveform to toggle its selectedness.
  • Press UP or DOWN to change the focused track, then press Enter to toggle its selectedness.
  • Hold SHIFT while pressing UP or DOWN to extend or contract the selection up or down into adjacent tracks.

Use the first two of the above methods when you want to select or deselect non-adjacent tracks.

Note that it is possible to have a time range selected but no tracks selected. In that case, you will only see the evidence of the selected time range in the Timeline.

Gale 02Mar13: ToDo-2 I think though we have to link to the Sync-Locked Tracks Group page here, to point out the advanced usage that you don't have to select all the tracks you want to affect.

Listening to the selection

With audio, it usually isn't obvious from the waveform what you want to select, so you really want to listen just to the left and right edges of a selection to make sure you are editing the correct part. Also because the purpose of multiple tracks is usually to mix them together as combined audio, by default the selected time range plays for all the visible tracks, selected or not. To change this you can mute or solo individual tracks in the Track Control Panel.

But if you are new to audio editing, don't worry. For now, you can just click and drag to create a selection on a single track, and press SPACE to listen to all of it. Come back here for more help when you start to work on more advanced projects and are having trouble selecting what you want.

Selecting while audio is playing

Sometimes the easiest way to select an exact portion of audio is to mark the selection boundaries while you're playing audio. To do this, press the [ shortcut to mark the left edge of the audio, and the ] shortcut to mark the right edge.

After you've done that, you'll definitely want to listen to the resulting selection to make sure it was right. Press SPACE to hear just the selection. There are additional keyboard shortcuts that let you listen to just the beginning or end of a selection - see Special Playback Keyboard Commands for details.

Menu commands for selecting

Peter 27Feb13: ToDo-2 This table really needs extending with an additional column for the relevant keyboard shortcuts - but watch the width!
And would we want a D4 alternating colours type table as we recently settled on for the Edit Menu page?
  • Gale 02Mar13: In principle no, as it would be identical in aim to the tables on Keyboard Shortcut Reference so arguably would follow their style. OTOH there is another table below it which is just shortcut and action which arguably could be D4. ATM I think not D4 for either, they are not basically custom TOC's-with-links are they, which is the Edit Menu purpose?

The Edit Menu has several commands that are useful for selecting.

Edit > Select
command
Action
All Select all tracks, including the entire content of audio tracks and note tracks.
None Deselect all tracks, removing any selection they contain and setting the cursor at the start of the former selection region.
Left at Playback Position Sets the left selection boundary at the current playback position, otherwise opens a dialog for moving the left selection boundary.
Right at Playback Position Sets the right selection boundary at the current playback position, otherwise opens a dialog for moving the right selection boundary.
Start to Cursor Select from the start of the track to the cursor position.
Cursor to End Selection from the cursor position to the end of the track.
Region Save Captures the currently selected time range or cursor position.
Region Restore Restores the time range or cursor position from Region Save.
In All Tracks Extend the current selection or cursor position up or down into all other tracks.
In All Sync-Locked Tracks Extend the current selection or cursor position up or down into all other tracks which currently have the Sync-Lock icon   image of sync-lock icon.

Snap-to Guides

Peter 9Apr13: ToDo-2 I propose that we hive this entire section on Snap-to off to a new page of its own (maybe expanding it) linking to it both from here and from the Selection Toolbar page.

Using Snap-to Guides, Audacity makes it really easy to make a selection that starts or ends at a physical boundary, like a label or clip boundary. This is distinct from the "Snap To" checkbox in Selection Toolbar which snaps selection edges (or the cursor) to a chosen unit of time.

For Snap-to Guides, when you take the following actions:

  • Creating a selection with the mouse
  • Modifying the selection boundaries
  • Sliding / time-shifting a clip

the selection boundaries or the boundaries of the clip you're time-shifting will snap to the following locations:

  • Time zero (0 on the Timeline)
  • The start or end of any track or clip
  • The start or end of any label

Whenever snapping is taking place, a yellow vertical line appears to indicate snapping is taking place. To err on the side of caution, if there is more than one logical place within a couple of pixels at which to snap, Audacity will not snap anywhere. In that case, zoom in.

In the image below, we're dragging a clip in the "Guest" track leftwards with the mouse. When the clip reaches the right-hand boundary of the clip above it, a yellow vertical guide line appears showing the position of the snap boundary through all the tracks. Now that the guide line has appeared, we can release the mouse and the dragged clip will be perfectly aligned with the one above:

Initial selection for Snap Guide

A Snap-to Guide appears (the vertical yellow line) when the selection has snapped to the start or end of an audio clip from any of the tracks.

Second selection for Snap Guide.

If there are two boundaries very close to one another and it's not obvious which one is better, Audacity will not snap to either. If you want to snap to one of them, zoom in so that you can clearly position the mouse closer to one than the other.

Label Tracks

A very useful way to recall particular selections is to label them in a label track. For more information, see Label Tracks.