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 #63711: no naturals on change to atonal key signature #2045

Merged
merged 1 commit into from
Jun 10, 2015

Conversation

MarcSabatella
Copy link
Contributor

I haven't run mtests yet; relying on Travis to do a first pass. I would plan to add some if nothing breaks. No hurry on merging this, but I welcome discussion.

My initial implementation of atonal key signatures just leveraged custom key signatures, making the case of a custom key sig with no symbols special. This doesn't work if we start adding naturals. So I have now moved to a more MusicXML-like implementation, where atonal key signatures are key of C but with a "mode" (a new attribute) of NONE. This also gives us a framework for modes of MAJOR & MINOR. The actual handling for the atonal key signatures is basically the same as before, but I no longer rely on them being custom or having no symbols - instead, I test mode == NONE directly (via a new isAtonal() function, analogus to isCustom()).

@MarcSabatella MarcSabatella force-pushed the 63711-atonal-naturals branch 2 times, most recently from 742227f to 29d8139 Compare June 6, 2015 19:06
@MarcSabatella
Copy link
Contributor Author

OK, I think I'm done now. I've added a vtest as well as updating an mtest to test the functionality. There was already a MusicXML import/export test, and it continues to pass.

In 2.0 & 2.0.1, atonal key signatures were represented as "custom" but with no accidentals. To maximize compatibility, I am retain the "custom" tag on these, but am also adding a "mode" tag, set to "none". 2.0 / 2.0.1 will simply ignore the mode tag and treat the atonal key signatures as they always have. But with my change, the layout code will create naturals as it would for other key signature changes.

I have also added checks for isAtonal() everywhere else it would be needed so that if it becomes useful, we could actually stop using the "custom" flag for atonal key signatures, and represent them as just ordinary signatures with a "mode" of "none". But to maximize compatiblity, I am keeping the "custom" flag on atonal key signatures for now.

wschweer added a commit that referenced this pull request Jun 10, 2015
fix #63711: no naturals on change to atonal key signature
@wschweer wschweer merged commit adfaf36 into musescore:master Jun 10, 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