Idea for enhancing Insert mode for using in rewriting rhythms
In https://musescore.org/en/node/87151#comment-984255, @cadiz1 challenged me to come up with a simple solution to the problem of rewriting rhythms. I've thought about a little, and maybe I have something that would hit the right combination of being useful enough on one hand, easy enough to implement on the other.
My idea is to leverage the current "insert" command/mode (e.g., Ctrl+Shift+letter to insert a note in step-time note input mode, or the actual insert note input mode), also the "remove selected range" command, which has the ability to delete individual notes/rests. Between these two commands, we already have the code we need to push notes around (eg, when inserting a note, the subsequent notes in the measure get moved later; when removing, they get moved earlier). I also have a pending PR (not one I was originally all that enthusiastic about, but it's interesting and relevant here) to implement a new "change duration of selected note" command while in note input mode - see https://github.com/musescore/MuseScore/pull/5505.
Somehow it seems we could combine these ideas and create something useful.
So, what if, while in note input mode, you move the cursor to an existing note, select the desired duration on the toolbar, hit the magic "change duration" command, and it changed the duration of the selected note and also moved the subsequent notes in the measure later/earlier, and adjusted the measure duration? My current PR adjusts the duration of the note but does so in the usual way - adding rests or "eating" some of the next note(s). Implementing that would not be too bad since all of the needed code is there already - at worst, it might mean a bit of refactoring.
A sneaky way to do it even more simply would be to have "change duration" code actually delete the current note (using the existing "remove select range" command) and then insert a new one (using the existing "insert note" command). In fact, you can almost do this already, except we don't support "remove selected range" while in note input mode. I wonder how hard it would be to start supporting that, as a first step?
BTW, one thing that rarely if ever comes up in these discussions - what do people expect to see happen to other staves when editing a measure in this way? If the measure changes duration, the other staves will need be adjusted as well, and pretty good chance whatever we do to make that happen will be something you don't want (regardless of what we do). That might well limit the usefulness of this approach. The more general "scratch pad" idea that gets tossed around some is certainly much safer, but designing it well is the trick there.