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

Issues when changing instrument between pitched and unpitched percussion #14714

Open
sammik opened this issue Nov 24, 2022 · 11 comments
Open

Issues when changing instrument between pitched and unpitched percussion #14714

sammik opened this issue Nov 24, 2022 · 11 comments
Assignees
Labels
P3 Priority: Low

Comments

@sammik
Copy link
Contributor

sammik commented Nov 24, 2022

Describe the bug

  1. If instrument changes to unpitched, key signature remains in staff (present in following systems) already reported as [MU4 Issue] Instrument change to unpitched instrument causes key signatures to appear on unpitched lines #14702

  2. If instrument changes to unpitched, transposing score transposes also this unpitched instrument

02-transposing-unpitched.mp4
  1. If instrument changes to pitched, clef and key signature is missing (also in next system)
    Pitched-clef-key-signature-missing

If clef is added manualy, it is shown as expected.
3b) But if key signature is added manualy, accidentals are changed, as if keysig were there, but it is not present, nor in next system.

03b-missing-keysignature.mp4
  1. If Key signature is changed in score, and unpiched instrument is changed to pitched in next bars, staff misses this key change
04-no-keysig-change.mp4

Platform information

  • OS: [reported on Linux]
@GabeS573
Copy link

Here's a quick summary of the expected behavior for these issues:

  • Switching from pitched to unpitched percussion should create a courtesy neutral clef and should stop showing key signatures.
  • Switching from unpitched to pitched percussion should always generate the correct courtesy clef, and should also generate the same key signature that is being used in the other instruments at that point in the score.
  • Pitched percussion after an instrument change should still be able to show key signatures.

@fredg999
Copy link

For bugs 1 and 3, see my comment on #14702 regarding the key signature issues. The clef issues seem to be fixed already.

I was able to reproduce bug 2. I'll add that the bug still occurs even if a staff type change is added before trying to transpose.

I was able to reproduce bug 4. I'll add that the bug also occurs if you add the instrument change first and then add a key signature change prior to that bar. I'm not sure how MuseScore distinguishes global and local key signatures internally, but if there's a way to retrieve the global key signature, it should probably do that.

@oktophonie oktophonie added this to To triage in MuseScore 4.1 via automation Feb 22, 2023
@oktophonie oktophonie added the P3 Priority: Low label Feb 22, 2023
@oktophonie oktophonie added this to To do in 4.x SHORTLIST via automation Feb 22, 2023
@oktophonie oktophonie removed this from To triage in MuseScore 4.1 Feb 22, 2023
@sammik
Copy link
Contributor Author

sammik commented Jul 20, 2023

working on it
Ill include this into complex instrument chagne fixes PR

@oktophonie oktophonie assigned sammik and unassigned mike-spa Jul 20, 2023
@oktophonie oktophonie removed this from To do in 4.x SHORTLIST Jul 20, 2023
@oktophonie oktophonie changed the title [MU4 Issue] couple issues when changing instrument between pitched and unpitched percussion Issues when changing instrument between pitched and unpitched percussion Jul 20, 2023
@zacjansheski
Copy link
Contributor

Adding here: Switching from a transposing instrument to a percussion instrument adds a new key signature (presumably to get it back in "concert pitch"). This is a regression from ms3

Screen Shot 2023-08-17 at 10 15 44 AM

@oktophonie
Copy link
Contributor

@sammik Are you still looking at this? If there's a safe enough fix for any of the remaining issues we may be able to include them in 4.2; otherwise this will be bumped.

In the current 4.2 nightly build (MuseScore version (64-bit): 4.2.0-233270304, revision: github-musescore-musescore-5384a15), points 2, 3 and 4 seem to still be actual, as does Zac's point from the previous comment.

@sammik
Copy link
Contributor Author

sammik commented Nov 23, 2023

@oktophonie Sorry, I am out of my computer for a while.
But if I remember correctly, it was already fixed in my local build, but it was part of quite bigger PR, and I dont remember, if it would be possible / easy to separate just this issue.
I think, Zacs point was fixed already there too (and many other things), but if I remember correctly, I stuck on two things:

  1. (no)design of Key, Clef, Time Signature, Staff Type Change inconsistencies #19107
  2. problems with staffTypeChange

@sammik

This comment was marked as outdated.

@wizofaus
Copy link
Contributor

I'm happy to look at this providing there's agreement over what the correct behaviour should be.

@zacjansheski
Copy link
Contributor

zacjansheski commented May 31, 2024

@sammik @oktophonie I know this all has gotten a little stale, but a summary of the current state of this would be very helpful.

at the risk of oversimplifying this, I believe this should be the behavior:

  1. Changing from non-pitched percussion to tonal instrument should always show a clef and key sig at the instrument change.
  2. Changing from a pitched instrument to a non-pitched percussion instrument should not show a key sig, only percussion clef. Following key signature changes should not appear on the non-pitched staff
  3. Key signature changes should appear in tonal instruments, including if a non-pitched percussion instrument changes to a pitched instrument prior to the key signature change.
  4. Switching from transposing/concert score/parts should only change displayed relevant pitches and key sigs for transposing instruments, not the "rules" described above.
  5. If the user still wants to alter something relevant here, they can do so with visible/invisible and local key sigs.

Please let me know if I missed something or if I'm off-base on something.

@sammik
Copy link
Contributor Author

sammik commented Jun 1, 2024

@zacjansheski it looks correct to me.

curent state is same as commented above - my solution was based on connecting InstrumentChange always with key signature, clef and stafftype

and there are still relevant issues with stafftypeChange (named above, and apart them also at least one other - changing measure duration casuse incorrect positions of all following staffTypeChanges)

I think, fixing staffTypeChange issues is needed first to move on.
Once it will be fixed, I can rebase and tidy up work, I did once upon a time: #23053
(Or someone else working on theese things may find some points there may be.

@wizofaus
Copy link
Contributor

See also #22645 where I mentioned the same issue and provided an example showing the key signature being revealed after changing clef without affecting spacing in other parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Low
Projects
Status: Issues to fix
Development

No branches or pull requests

7 participants