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

fix #51866: enharmonic changes made with J lost on save #1914

Merged
merged 1 commit into from
Apr 8, 2015

Conversation

MarcSabatella
Copy link
Contributor

My change does two things:

  1. For the "J" command (but not "Ctrl+J", which remains otherwise identical to "J"), the spelling change made is transposed as appropriate and push to the "other" tpc, so the tpc'1 stay in sync when using "J". If you want to have different spellings for concert pitch and transposed mode, you will need "Ctrl+J".

  2. I reverted the change to only write tpc2 for transposing instruments. That was the cause of this bug. I do understand the reasons that change was made but feel it caused worse problems than it fixed. However, if we did want to somehow force concert pitch instruments to always have the same tpc for both modes, I would propose a different fix. First, for concert pitch instruments only, change my code above to do the same thing for "Ctrl+J" that it currently does only for "J", so you cannot force tpc1 and tpc2 to be out of sync that way. Second, rather than always writing tpc1 and ignoring tpc2 for concert pitch instruments, instead, write the current tpc value for concert pitch instruments. Not sure if code elsewhere expects tpc1 to always be written; if so, then copy tpc2 to tpc1 before writing if we are not in concert pitch mode and it is a concert pitch instrument.

@lasconic
Copy link
Contributor

lasconic commented Apr 1, 2015

@wschweer Since you did the previous change 3a7106e
can you take a look?

@MarcSabatella
Copy link
Contributor Author

I'm thinking based on further thought and the hangout yesterday that @wschweer will want to do what I suggested in 2) - at least, to make an except for non-transposing staves so both "J" and "Ctrl+J" always do the same thing. Personally, I think if the user specifically asks to have different spellings in the two modes, there is no harm in allowing it - we just don't want it to happen accidentally. But I also don't have a use case where I would actually want there to be two different spellings for non-transposing instruments, so I'm fine that that change.

Aside from this, Notes / Respell Pitch also changes only one of the two tpc's - not even always the current one. Those are the two ways I know about right now to get a concert pitch staff to have inconsistent tpc's. See http://musescore.org/en/node/53461. That's the other way I know of to get inconsistent spellings right now.

In theory, if we make it impossible for the tpc's to be different, then we don't need the special case code in Note::write(). But if we do keep it, I would suggest we change it if possible to write the current tpc rather than always writing tpc1 (perhaps writing the current tpc but with the tpc1 tag).

@wschweer : if you are working on tpc issues now, I guess maybe this is changing in some way and there might not be a point in my updating this PR. However, since this bug is one of the main things causing me to want a 2.0.1 release, I might want to do something like this in a branch if we do decide to go that way.

lasconic added a commit that referenced this pull request Apr 8, 2015
fix #51866: enharmonic changes made with J lost on save
@lasconic lasconic merged commit 8237182 into musescore:master Apr 8, 2015
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.

None yet

2 participants