Proposal Cursor Behaviour Improvements

From Audacity Wiki
Revision as of 12:49, 21 April 2011 by Stevethefiddle (talk | contribs) (Discussion)
Jump to: navigation, search
Proposal pages help us get from feature requests into actual plans. This proposal page is about the selection cursor and making its behaviour consistent with the selection range.
Proposal pages are used on an ongoing basis by the Audacity development team and are open to edits from visitors to the wiki. They are a good way to get community feedback on a proposal.


  • Note: Proposals for Google Summer of Code projects are significantly different in structure, are submitted via Google's web app and may or may not have a corresponding proposal page.

The Problem

The editing cursor behaves differently from a selection range vis a vis track selection.

  1. A cursor can exist in a track that is not selected, whereas a selection range cannot
  2. "Phantom" cursors can be created in certain circumstances (see below)

Developer / QA Backing

  • Bill W

Examples of Current Behaviour

A) The cursor remains in a track even when a track is not selected, generating confusion about what may happen when a user performs an action at the cursor.
B) The time shift tool creates a cursor in the track in which it is clicked, creating a "phantom" cursor that can mimic an actual selection point in that track.
C) Using the arrow keys to change track focus creates a "phantom cursor"

A) Cursor remains when a track is not selected
1. New Project
2. Create three mono audio tracks
3. Generate 5 sec tone in the first two
4. Generate 1 sec chirp in the third, amplitude 0 to 1

(anything else would do, just so it is visually different from the tones)

5. Select track 3 and copy the chirp to the clipboard
6. Delete track 3
7. With the selection tool, click in track 1
8. Press enter - the track is un-selected but the cursor remains
9. Edit > Paste

What should happen? There is a cursor in track 1, so it appears that paste should occur there. But track 1 is not selected, so a new track is created and pasted into at time zero.

Instead ...
7. With the selection tool, drag a selection in track 1
8. Press enter

the track is un-selected and the selection indication in the track goes away. The selection range remains in the time line.

9. Edit > Paste

as above, but this time it makes a bit more sense.

The cursor should not exist in a track that is not selected, just as a selection range does not exist in a track that is not selected.

B) Time shift tool creates a phantom cursor
7. With the selection tool, click in track 1
8. Press enter
9. With the time shift tool, click anywhere in track 2

the cursor moves to track 2

10. Edit > Paste - the paste occurs in a new track.

Also:
7. With the selection tool, click in track 1
8. With the time shift tool, click in track 2

the cursor is extended to track 2, track 1 is selected and track 2 has focus

9. Edit > Paste

the paste occurs at the cursor in track 1.

The time shift tool should not create a cursor in the track where it is clicked.

C) Using arrow keys to change track focus creates a phantom cursor
7. With the selection tool, click in track 1
8. Press enter
9. Press down-arrow

the cursor moves to track 2

10. Edit > Paste - the paste occurs in a new track.

7. With the selection tool, click in track 1
8. Press down-arrow

the cursor is extended to track 2, track 1 is selected and track 2 has focus

9. Edit > Paste - the paste occurs at the cursor in track 1.

This possibly a sub-case of A - the cursor should not exist in a track that is not selected.

None of the above behaviours are incorrect. Editing actions do not take place on a track that is not selected. My point is that display of the editing cursor should follow the same rules as display of a selection range.

Discussion

Steve:

  • The fact that the cursor is extended when using the up/down cursor keys is a feature that I use all the time, so I'd definitely not want that to be removed.
    • Bill: You can still do that with shift-downarrow, and that is more consistent as it also add the track to the selection while extending the cursor.
  • The "cursor" is not a "paste here" indicator - it indicates the playback position in the track that currently has focus and all selected tracks. As such it is probably doing what it is supposed to do.
    • Bill: Actually you can have two cursors on the screen at once - the editing cursor and the playback cursor. When you start playback from the cursor position the black cursor remains in place and the green playback cursor follows the audio.
  • Nowhere in the description did you mention that the Track Control Panel of the currently selected track is a different colour. On my flat screen monitor the colour change is extremely subtle (hardly noticeable), but it does change. If the colour change was a lot more obvious then I think that will remove much of the confusion.
    • Bill: About the colour change in the Track Control Panel, that's what I was referring to when I said a track was "selected" (dark colour) or "not selected" (light colour).

Gale: I agree we must keep (A) and (C). (B) is a little questionable maybe, but not demonstrably a bug.

However the cursor doubles as a "paste here" indicator (as well as a "play from here" indicator) when the track is selected. The problem as I see it is the limitation that we only have one type of cursor, which also stops us having a sync-lock selected cursor to match the sync-lock selected region. I understand some may not like to have a "chess board" / "multi-coloured" effect, but I think the meaning of identical-looking cursors is confusing even given the track selected colour is different. The eye is focused on the cursor, not the Track Control Panel.

And yes on my netbook, I simply cannot see any difference between track selected and unselected colour on Ubuntu, but there is a clear difference on Win 7 on the same machine. Is this an issue with wxGTK?

(added later) And you could add region behaviour improvements to the proposal. Arrowing down to move focus (without holding SHIFT) does not currently extend any region into the newly focused track. We know some users would find that handy, for the same reason it's handy that the cursor is extended into the newly focused track. We know some new users are confused that this extension doesn't happen with regions, and believe at first that it means only the track that has the region will actually be audible. Cf Steve's comment below.

  • Bill: Audibility is controlled by the mute and solo buttons. If users are confusing track selection with audibility they need to get over that. I don't think the visible region selection should extend with down-arrow, since that action is merely meant to change track focus. Shift+down-arrow works and is consistent - the selection region appears only in a selected track, similar to shift-clicking on a Track Control Panel.

Steve: I think there is an issue here, but I don't see the issue to as described above. IMO the question of "where does it get pasted" is a red herring. The answer is simple - it gets pasted in the selected track(s). Where it gets pasted has nothing to do with the cursor.

  • Bill: Not exactly. If a track is selected, paste occurs at the cursor. If no track is selected, a new track is created and paste occurs at time zero. To be consistent, if no track is selected, shouldn't the paste occur at the cursor position in the new track?

However, on Ubuntu with the default Ubuntu theme, there is very little difference in the Track Control Panel colour between a selected track and a not-selected track (I don't know what it looks like on a Mac). In the absence of a clear indication of which track(s) is/are selected, it is easy to mistake the cursor as being something to do with where copied audio will be pasted. Perhaps there is some way of indicating more clearly which track(s) is/are selected?

If it does not do so already, the documentation should make it clear that pasting will go into all tracks that are selected (if possible to do so).

  • Bill: So on Menu > Paste, it says "Inserts whatever is on the clipboard at the position of the selection cursor in the project, replacing whatever audio data is currently selected, if any" which is wrong, or at least incomplete. It should say "Inserts whatever is on the clipboard in any selected tracks at the position of the selection cursor in the project, replacing whatever audio data is currently selected, if any." And perhaps this page Selection needs to emphasize the distinction between selected and not-selected tracks.

I don't think that the cursor should necessarily behave the same as a "selection", because it is not a "selection". I suppose another way of looking at which tracks the cursor appears in, is that as it is a playback cursor, why does it not appear in all tracks that are not muted?

  • Bill: I disagree. In my view the editing cursor is distinct from the playback cursor. Editing operations happen at the cursor position or within a selection region, and the two should behave consistently.

Steve: While stopped there is just one black line that indicates both the "play-from" position and the "paste-to" position.

  • As a "paste-to" indicator, it should really be visible on all (and only) selected tracks.
  • As a "play-from" indicator, it should be visible on all (and only) non-muted tracks.
  • If the cursor is intended to indicate both "play-from" and "paste-to" positions, then it should show on all selected and all non-muted tracks.

In any case, if there is no selected track, then I think it would make sense for clipboard contents to be pasted at the cursor position on a new track.