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 around instrument changes and key signatures and clefs #18590

Open
sammik opened this issue Jul 14, 2023 · 7 comments
Open

Issues around instrument changes and key signatures and clefs #18590

sammik opened this issue Jul 14, 2023 · 7 comments
Assignees
Labels
engraving P2 Priority: Medium

Comments

@sammik
Copy link
Contributor

sammik commented Jul 14, 2023

Issue type

Engraving bug

Bug description

  1. If the instrument in an instrumentChange is changed to an instrument that matches the preceding transposition, an unnecessary key signature remains there
IC1.mp4
  1. If the instrument in an instrumentChange is changed to an instrument that matches the transposition of a subsequent instrumentChange, an unnecessary key signature remains on the later one
IC2.mp4
  1. If the instrument in an instrumentChange is changed to an instrument with a different transposition, and than removed, an nwanted key signature is left in the score (for this to be obvious, an initial key signature other than C major is necessary). This is a regression from 4.0.2.
IC3.mp4
  1. missing clef in instrument change for various instruments
    in 4.0.2:
    IC4-old
    EDIT: added video to explicitely see, what is the problem with clef:
IC-clef.mp4
  1. wrongly transposed key signatures in concert pitch, if user changes key signature before instrument change
IC5.mp4
  1. key signatures became standard (non instrument change) if user changes instrument in instrument change
IC6.mp4

Steps to reproduce

Issue one

  1. add two different instrumnet change transpositions
  2. change second one to instrument in same transposition as first one is
  3. see - unneeded key signatures are in second instrumentChange

Issue two

  1. add two different instrumnet change transpositions
  2. change first one to instrument in same transposition as second one is
  3. see - unneeded key signatures are in second instrumentChange

MuseScore Version

4.1 and master

Regression

1., 2. and 5. are not regressions
3., 4. and 6. are regressions from 4.0.2

Operating system

Ubuntu 22.04

@oktophonie oktophonie changed the title couple instrument change ks issues Issues around key signatures and instrument changes Jul 14, 2023
@oktophonie oktophonie added the P2 Priority: Medium label Jul 14, 2023
@oktophonie
Copy link
Contributor

Is no. 4 really a problem? I wouldn't expect to see a clef there.

@sammik
Copy link
Contributor Author

sammik commented Jul 14, 2023

Well, it shouldnt be visible there in transposing pitch, but definitely should be there as object (which is defined as pair "concert - 8ba treble / transposing - treble".

Now, if you switch to concert pitch, clef is missing there.

I think, proper "bass clarinet cleff" should be there.

Similar situation is with key signatures. There is key signature, if you change flute to clarinet. But in concertpitch, it shouldnt be (visible) there.

So I think, we should place theese objects (clefs, key signatures) in all places, where they change, and find some way, how just hide them if they are not neccessary (in concert pitch, or in transposing pitch, depending on preceding one).

@sammik sammik changed the title Issues around key signatures and instrument changes Issues around instrument changes and key signatures and clefs Jul 17, 2023
@sammik
Copy link
Contributor Author

sammik commented Jul 17, 2023

working on it

@wizofaus
Copy link
Contributor

@sammik you mentioned you started on this last July but there's been no update (or PR) since? Can take it over if you want, can you share what you found/did so far?

@sammik
Copy link
Contributor Author

sammik commented May 31, 2024

@sammik you mentioned you started on this last July but there's been no update (or PR) since? Can take it over if you want, can you share what you found/did so far?

@wizofaus see: #14714 (comment)

@wizofaus
Copy link
Contributor

Ok, I'm not sure what to make of that, in fact the issue changing between pitched and unpitched percussion is exactly one that I had encountered myself. Still, that was all 6 months ago, which is a long time between drinks considering how rapidly the codebase is changing.

@sammik
Copy link
Contributor Author

sammik commented May 31, 2024

Solution, I used was:

  • every instrument change will be connected with its own key, cleff and stafftype
  • these (key, cleff, stafftype) are shown (rendered) only when needed

This simple rules made code much cleaner, as all ad hoc conditions needed before could be removed

It brought some other problems, as instrument change is segment base and could be in the middle of the bar, but stafftype change is measure based.

Ideal solution would be to refactor stafftype change to be segment - based. Temporary solution was to restrict also instrument change to be at the begining of the measure (or split measure, if it was not).

Main problem is stafftype change itself. It has many issues, which should be solved first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engraving P2 Priority: Medium
Projects
Status: One of the next releases
Development

No branches or pull requests

4 participants