Idea for enhancing Insert mode for using in rewriting rhythms

• Mar 12, 2020 - 17:44

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.


Comments

Well first of all thank you Marc for looking into this. I think the first suggestion (I understand the other one a bit less at the moment, and being forced to activate the insert mode command each time is perhaps heavier) sounds the best, for me at the moment.
Namely, I quote: "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".
I think this is the general idea we are looking for: the use of functions and shortcuts already known and implemented (Q/W, and Shift/Q and Shift/W) but with this new fundamental ability to move the following notes earlier/later in the measure (without "eating" the notes)
And as for what's happening in the other staves, I don't think that's the main request, from what I've read on the forums anyway. Let's just say it's not on the agenda, for the moment anyway.
Keep thinking about it, and when you've written the code, let's give it a try. We'll be there!

In reply to by cadiz1

I think it is important to understand the effect on other staves, because it could very well mean the idea is useless and not worth the time it would take to implement it. So I ask people to try the following in a score with multiple staves:

1) find an existing measure where you want to change the rhythm on just one staff
2) for any note where you wish to change the duration, select it, hit Ctrl+Delete to remove it, then go to note input mode, and use Ctrl+Shift+letter to add a new note of the desired duration - this is more or less exactly the same as what my proposed command would do
3) repeat step 2 for any other notes whose durations you want to change (presumably, you will change at least two durations so the measure duration is back to normal)
4) check the notes of that measure on the other staves, and see if you like what happened to them

In reply to by Marc Sabatella

Well, right off the bat, you're setting an example that people won't want (I suppose). At this point, we are at an impasse. I rephrase my request.
Currently, in input mode, with the shortcut Shift + right/left arrows, I can move (for example, picture below) very easily the third beat (note E) to the first beat (result second measure)
Which I can't do, except edit, retype, edit the rhythm, or cut and paste, with measure 3.
So my question is: can I (or not, in this case, forget about my request, never mind) change the order of notes and rhythms within a measure, and with the same shortcut (or equivalent) to get the result in measure 4?

Swap.jpg

In reply to by cadiz1

Enhancing the existing “swap notes” command to work when durations differ would not be very hard. but to me that is a different problem than the one originally discussed - keeping the original pitches but changing the rhythm. Both are useful, sure, but it’s the problem of changing rhythms that comes up much more often than the problem of swapping notes, so that is what I was focusing on.

Do you still have an unanswered question? Please log in first to post your question.