musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.27k stars 2.65k forks source link

[MU4 Issue] Fix "toggle insert mode" command to toggle the "real" insert mode #11829

Closed MarcSabatella closed 2 years ago

MarcSabatella commented 2 years ago

MuseScore has long had an "insert mode" that you can access via the dropdown menu on the note input mode button on the toolbar. For some time there has also been a "toggle insert mode" command you can see in the shortcut list, with a default shortcut even (Ctrl+I / Cmd+I), but this command does not activate insert mode. Instead, it puts you into a strange special semi-insert mode that is pretty fascinating actually: regular note entry replaces as with step-time, but the "insert note" commands (Ctrl+Shift+letter) actually insert notes without inserting time, instead pushing everything to the right for the rest of the score. It's kind of cool, but also completely broken (creates corruption on undo, also if there are time signature changes, etc, and is as likely as not to crash - plus it leaves your "remove selected range" command disabled for some reason). As far as I know, this special semi-insert mode is completely undocumented, but it's there in 3.6.2 at least.

So, since this mode was never documented and doesn't actually work well enough to be worth trying to support for 4.0, I propose we remove it, and have this shortcut instead do what it probably should have done all along: toggle the real insert mode (the one you can also access and see indicated on the toolbar).

I would propose this truly act as a toggle, switching you between insert and step-time modes.

MarcSabatella commented 2 years ago

Once that is in place, we could consider dropping the individual "insert note A" - "insert note G" commands, as they save at most one or two keystrokes. At the very least, we should improve their naming to make the functionality more clear: "Insert note A (increases measure duration)". That naming would be accurate in both step-time and insert modes once the toggle insert mode command is fixed, so for the few people who stumble upon the commands in the shortcut customization dialog, at least there would be less confusion about their purpose.

But one thing in favor of removing the commands now is, they could provide an easy way to re-introduce the special semi-insert functionality later. That is, Ctrl+Shift+A could eventually be the command to insert-and-push-things-to-the-right-without-increasing-measure-duration that many people actually have wished for. But, the existing code is pretty broken, and more design would be needed as well to decide if this is how we'd want to expose it, and how it should handle various things like multiple voices, also what about a converse command to delete-and-shift-everything-else-left, etc.

So bottom line I'd be fine with simply removing the individual insert node commands for now, once this toggle insert mode command is fixed.

GabeS573 commented 2 years ago

Here's a video demonstrating the new "strange special semi-insert mode."

https://user-images.githubusercontent.com/91428485/171325485-d16a3189-43cd-472c-a3bf-13064282b80a.mov

Also, here's my score from the video... although it doesn't seem to open any more. fun corruption.mscz.zip

bkunda commented 2 years ago

I've referenced this issue as background/reproduce context in #11844, which clarifies the required tasks more succinctly. Closing this present issue as it is more discussion-oriented.