Rhythm note input mode fixes and improvements #6232
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a number of small but collectively serious issues with the "rhythm" note input mode workflow. Where possible, these are separated into individual commits, but they all relate to each other and are thus collected in this one PR.
To me these should probably be merged together, and I would advocate it happen for 3.5. No string changes, no document changes required although we could mention the new behavior in 1a) rather than let people discover it for themselves. Mostly it just improves the rhythm mode workflow with no penalty.
1a) As discussed on the forum (see for instance https://musescore.org/en/node/306781 and many previous discussions in the past), always defaulting to the middle line when entering notes is not optimal. If you want that, fine, but many people want to be able to choose a pitch. This PR simply copies the previous pitch, so while the first pitch you enter default to the middle line, if you immediately repitch using Up/Down, the next note inherits that pitch. This is valuable for people trying to use this mode to input notes using cursor and duration only, and is especially valuable for drums
1b) There was a bug where the initial note for both drum and tab staves was poorly chosen, since the original calculation only worked for pitched staves. This makes a better choice for drum staves (use current drum not from palette, or first valid drum note in set) and tab (use fret 0 of current string). It also corrects the "middle line" calculation for standard staves of other than 5 lines.
Note: there is also a crash when attempting to repitch a drum staff with the mouse, possible to reproduce without this PR but more likely now. Fix coming...
Triple and quadruple dots were not working in rhythm mode due to a simple oversight, fixed here.
Rhythm mode was difficult to enable on drum staves, because it was actually ignored when setting the internal mode. The only way to get a drum staff into rhythm mode was to change modes while on a standard staff, then change to the drum staff. Again, just some missing code, added here.