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

[MU3] Add support for triple sharp and triple flat #6744

Merged
merged 2 commits into from
Oct 25, 2020

Conversation

Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz commented Oct 24, 2020

SMuFL provides glyphs for triple sharp and triple flat, so they might as well be available to use in MuseScore. This involves adding 14 new TPCs and expanding the range of the AccidentalVal enum class.

This was requested on the forum topic in Triple sharps and triple flats (sort of, ignore the digressions into politics and key signatures).

See https://seanyeh.com/pages/alkans_triple_sharp/ for an example of a triple sharp being used in a piece of music from the Romantic period.

Rebased version of #6002 (@mattmcclinch, please review).

"If the mountain won't come to Mohammed, Mohammed must go to the mountain." ;-)

@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Oct 24, 2020

I'm puzzled about those mtest failures in this PR here, they didn't happen in #6002?

Edit: A couple rather stupid copy&paste errors were the culprit...

libmscore/key.cpp Outdated Show resolved Hide resolved
libmscore/key.cpp Outdated Show resolved Hide resolved
libmscore/key.cpp Outdated Show resolved Hide resolved
@Jojo-Schmitz Jojo-Schmitz force-pushed the triple-sharp-flat-3.x branch 2 times, most recently from f9a1d48 to 3e9f8db Compare October 24, 2020 19:03
@Jojo-Schmitz Jojo-Schmitz force-pushed the triple-sharp-flat-3.x branch 2 times, most recently from 9e9ac99 to d59e771 Compare October 24, 2020 19:58
libmscore/sym.cpp Outdated Show resolved Hide resolved
libmscore/sym.cpp Outdated Show resolved Hide resolved
libmscore/sym.cpp Outdated Show resolved Hide resolved
@@ -198,15 +198,15 @@ AccidentalVal AccidentalState::accidentalVal(int line, bool &error) const

void AccidentalState::init(Key key)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are very tricky calculations here
@Jojo-Schmitz @mattmcclinch Looks like you're studied this method, is it possible for you to add a comment that would explain what is going on here?

Copy link
Contributor Author

@Jojo-Schmitz Jojo-Schmitz Oct 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the changes of this PR don't seem complicated at all, they are just adjusted to the change number of accidentals (that affect playback in semitones), replacing 'magic numbers' by something more sensible and readable. The underling formula indeed looks quite complex, but I didn't even try to understand it ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See mattmcclinch@345042b. I think it adds a bit more clarity. The variable octave is perhaps a bit misleading. octaveStart might be better.

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.

3 participants