Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeat last chord after inputting a rest #18951

Closed
wants to merge 1 commit into from

Conversation

bakajikara
Copy link
Contributor

Resolves: #16644

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@Tantacrul
Copy link
Contributor

Tantacrul commented Aug 8, 2023

I've spotted something I don't think is right. When in Note Input mode, if I repeat a chord, it becomes 'stuck' in some way. In this example, when I rollover a new chord, pressing R will paste the duration of the original.

I would expect that when rolling over a new chord, pressing 'R' would repeat it instead of inheriting the duration of the previously repeated chord.

It causes all kinds of problems when you experiment with different durations. I haven't even got to notes with articulations yet.

https://www.dropbox.com/scl/fi/bv6nt4hqruy7eole03hlf/Pressing_R.mov?rlkey=9h6qxsez15uwmifv8kix9lcxc&dl=0

@Tantacrul
Copy link
Contributor

Yeah, just noticed it can mess up articulation settings too. For example, this:

image

Becomes this:
image

I've also succeeded in getting it to remove articulations too.

@oktophonie - I think we need to watch this one closely 😄

@bakajikara
Copy link
Contributor Author

@Tantacrul
Just as when the A-G keys are pressed, the R key enters the chord of the note value shown in the note input bar.
Since the R key shortcut is an alternative to pressing the A-G key repeatedly, I think this behavior is correct.

In any case, this PR does not change anything about the behavior when a chord is selected; it simply changes it to treat a rest as if it were the previous chord when R key is pressed.
Both duration and articulation problems occur in 4.1.1 as well, and are independent of this PR.

@Tantacrul
Copy link
Contributor

Tantacrul commented Aug 14, 2023

@bakajikara - the behaviour isn't right because the logic is impossible to figure out and it keeps producing undesirable results. This is an instance where it's logical on paper but produces results we can't release.

R should repeat both the pitch and the duration.

Re the articulation problem. Understood. It's a separate issue.

@bakajikara
Copy link
Contributor Author

@Tantacrul
But what about cases like this? If we are inputting repeated notes of different durations at the same pitch, the current behavior of repeating only the pitch is better.

2023-08-14_21-09-47.mp4

We are so used to this input method that I think changing it would require consideration.

@Tantacrul
Copy link
Contributor

Tantacrul commented Aug 14, 2023

I think that should be solved by manually specifying the duration first. If the user doesn't specify a duration, then it defaults to the original duration. If that doesn't work, then we'll need to think of something else. The current behaviour is just too confusing because you keep getting results you don't expect.

The problem at the moment is that we do this too bluntly. We measure the duration we've landed on, and then use that duration by default, which doesn't make sense. Even in your example, it's clear that we've set up a way to specify a different duration to the one you've landed on - so my proposed fix is simply an extension of that behaviour.

For example, we moved away from this with copy and paste. It used to only paste pitch (causing endless confusion) whereas now it pastes pitch and rhythm, which is just obviously better.

@igorkorsukov igorkorsukov force-pushed the master branch 6 times, most recently from fa1f8d3 to 525a11a Compare February 14, 2024 09:08
@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Nov 29, 2024

What stops this from getting merged?
As far as I can tell it behaves exactly as I'd expect it to behave: it repeats the last chord in the last selected duration

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 29, 2024
Backport of musescore#18951 plus fixing some a clazy warnings
@bakajikara bakajikara closed this by deleting the head repository Feb 16, 2025
@Jojo-Schmitz
Copy link
Contributor

Why did you close it?

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 16, 2025
Backport of musescore#18951 plus fixing some a clazy warnings
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 16, 2025
Backport of musescore#18951 plus fixing some a clazy warnings
@bakajikara
Copy link
Contributor Author

Sorry for closing it after you had been keeping an eye on it.

This PR is quite old, and while trying to fix build issues on my local—likely caused by a change in the Qt version—I ended up messing things up.

Additionally, a simple implementation of this PR wasn’t enough to achieve what Tantacrul suggested.

On top of that, I wasn’t sure how to handle it with the recently introduced note input method (Input by duration).

So, I decided to close the PR.

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 16, 2025
Backport of musescore#18951 plus fixing some a clazy warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repeat command ("R") in Note Input mode: continue to allow it to repeat last note/chord after inputting a rest
4 participants