Enter note entry mode when a note pad button is clicked

• Mar 19, 2019 - 21:45
Reported version
3.0
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

This came up in this video.

It was suggested that when a note pad button is clicked, we should enter note entry mode. This is a fairly simple fix, and I agree with it and have implemented a PR.


Comments

I'm not sure how I feel about this change.

I use the fact that pressing a duration does not enter into note input mode at times to correct my errors. I think what is expected is not necessarily that pressing the duration starts note entry mode, but if for example you press 3 a you get a 16th note A rather than a 1/4 note A like you currently do when note input mode is turned off. IMO, the default duration should be changed if you press a duration and pressing a note name still starts note entry mode.

I discussed this at length with Marc. The behaviour implemented by the PR is this:

If a note, chords or rest is selected when one of the note duration buttons is pressed, the duration is changed. Note entry mode is not entered.

If anything else or nothing is selected, note entry mode is entered when a note duration button is pressed. This makes sense to me, because of this: there are two things these buttons can do, change a chordrest's duration, or change the duration of notes entered in note entry mode. If a chord rest isn't selected and you click on one of these buttons, the only thing you could ever want to do is change the duration of the notes entered in note entry mode. So, if we automatically enter note entry mode in this case, we save users the extra step of pressing N or clicking on note entry button, which also makes note entry more intuitive for new users.

I think this would be a very beneficial change. I hope it makes sense and can be merged now :)

If anything else or nothing is selected, note entry mode is entered when a note duration button is pressed.

First question, If nothing is selected where are you going to enter a note? The same convoluted, meaningless rules now used when you press N with nothing selected? It has never put the note entry cursor in the correct spot when I have accidentally done this.

The rest of the explanation is confused. I don't think you said it right. One place you say only the duration is changed, in another you say note entry mode is started under the same conditions.

The DWIW is that if you press a duration followed by a note, you get a note of that duration if you are in note entry mode or not. Pressing a duration should not start note entry mode. Turning on note entry would be another case of, lets do the same thing a different way and take away a feature in the process.

Good point about where note input mode gets enabled if nothing is selected. There is absolutely no way MuseScore can possibly know where you want it to be, so there is no possible way to define what the "correct spot" is. No mater what we pick, it will be what you had in mind sometimes, but often not. We try to pick something logical (it's actually not conoluted or meaningless at all), but it's a crapshoot as to whether it matches what you had min mind of course.

So, pressing a duration button with literally nothing selected seems like it's still not going to do anything useful - you'll be in note input mode, sure, but not necessarily where you want to be. I don't see this as harmful since pressing a duration button in this context does absolutely nothing useful as it is, but can't see this particular aspect of the change being useful in itself, either.

More interesting, though, is the idea of selecting a measure then pressing a duration key. The PR as I understand it will put you in note input mode on that measure, with the duration selected. This seems moderately nice to me, eliminates at least one common newbie error (selecting duration before pressing N rather than after, with a measure selected).

Status PR created active

Interesting point Marc. Selecting a measure and clicking on it actually starts note entry in the last segment of the measure in my current implementation. I'm going to change it so that it puts you at the start of the selection if you have one when you change duration, unless that selection consists of solely selected chord(s).

Having said that, I've found that it's actually very difficult to get a solution that works in a natural and intuitive way. There are too many special cases, so it gets difficult to have consistent DWIM behaviour. I actually find myself agreeing with Mike now. So, I have two options: reducing this to just entering note entry mode when nothing is selected and a duration button is clicked (which wouldn't be useful), or just closing the PR altogether and letting someone else find a better way of implementing something along these lines. I'm going to go for the latter :)

Please, anyone, see what you can come up with.

Don't get me wrong, it's really interesting to think along these lines. But, sometimes what seems obvious at first turns out to be less so (and vice versa :-)

In reply to by TheOtherJThistle

propose:
If a full measure is selected (blue rectangle), inputting a note-duration (with the mouse or keyboard) can activate the note entry mode. *1
When the input mode is activated, the input pointer (thin blue cursor) must be positioned at the beginning of the measure. This is important when input from the keyboard *2


*1 Because the user clicks once on the target measure before entering the note(s).
*2 When the input mode is active, user can put the note anywhere with the mouse.

Having read this discussion, I believe there is one important point that was not considered here. The point is (if I am correct with it), the only case a user can ever expect duration buttons to trigger note input mode is when operating with mouse. When operating only with mouse, one does not really need to see a note input cursor which makes the very question of choosing a place for it slightly irrelevant. Or, if some reasonable place still needs to be chosen, it should be placed somewhere in the visible area reflecting the fact that the user operates purely with graphical interface.

So here is the summary of what can be done according to that:
1. Note input mode activates only by pressing note duration buttons, not by activating the corresponding shortcuts (of course, only in case there is no selection and other cases we consider it appropriate).
2. Concerning the note input cursor, three options available:
- No cursor at all until the first note is added
- Cursor is placed according to the current rules but the viewport does not jump to it
- Cursor is placed somewhere in the visible area

In reply to by dmitrio95

  1. would be terrible for keyboard users. Pressing a duration changes the selected note or rest. I use this a lot and do not want note input mode to turn itself on when I do this. I usually press the right arrow to select the next note or rest to do something with that, very often to fix the wrong rest pattern in an x/8 measure. I don't want to have to press escape every time I change a duration.

What would be nice would be if MuseScore remembered the duration key you pressed while not in note input mode then entered the note so you get a note of the correct duration if you press a note key (a-g) which does and should automatically turn on note input mode. Currently you usually get a quarter note. There seems to be one case where you will get something else I think, but I can't remember how to do that.

  1. Are you really suggesting that the quasi random location that MuseScore chooses to turn on the Note input cursor not be shown if the user missed clicking the start point or accidentally hit N instead of M? The user would have no idea they are in note input mode if it's off the screen.

I propose exactly that nothing changes for those who use keyboard to edit a score. If you operate with mouse, press a note duration button and nothing (maybe with some exceptions) is selected then MuseScore activates note input mode, with one of the listed options concerning the cursor behavior.

I'm curious how MuseScore knows if you're going to use the mouse or keyboard. You can currently switch back and forth all you want. Press the 3 for a 16th note click the staff to insert the note click the 8th note icon press G to enter the note and so on.

If I am understanding correctly, no one is proposing changing the behavior if something is selected. In those cases, then the duration buttons and shortcuts will both do exactly what they do now - change duration of the selected note, no mode change. Only in the case of nothing selected is there a proposed change. Since the duration commands currently do absolutely nothing in these cases, changing this behavior seems like it should not cause problems. But I do share the concern about not showing the input cursor. I think it's misleading and problematic, and making it so this only happens if the duration command is triggered by mouse or keyboard doesn't really change this. If we're going to change mode, there needs to be a clear visible indication that this has happened.

Currently, if you make the mistake of entering note input mode without selecting something, the cursor is always (?) placed int eh visible area already. At least, that's the theory. Generally, it's the measure at the top left corner of the current view, so hardly random at all. Might be some corner cases where this algorithm doesn't work correctly, if so, let's identify those cases and fix them, but otherwise, keep the current behavior with respect to the cursor.

If the cursor is placed at visible area when nothing is selected, maybe the randomness in placing cursor comes from the cases when something still has already been selected. I such cases the algorithm seems to prefer the selected element over the visible ones which may be unexpected sometimes. But if those cases indeed cause problems now, they can potentially cause even more problems if we enable note input triggering for the note duration buttons: currently if one clicks a note duration button when some note is selected outside the viewport the selected note just silently changes its duration, without any sign of this change being shown to a user. Maybe this behavior should also be altered if the note input activation change happens.

Agreed, I seem to recall that having come up before. Very likely the existence of a selection that is off-screen and hence was forgotten about is one source of the perception of randomness. There is another, where if you happen to have a spanner (line) selected, the code that tries to track down a good measure to use gives up and sends you to the beginning of the score. Same for anything else where we don't find a measure when looking up the chain of parents.

So, a couple of trivial changes there would help in any case, but probably become that much more important if we're going to start entering note input mode on more commands.