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

Allow reversal of hook flags within Inspector: Chord #25938

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz commented Dec 29, 2024

Port of Jojo-Schmitz#742

Resolves: https://musescore.org/en/node/109706

Provides chord (or rather note) inspector checkbox to reverse hooks.

To test:

  1. Select a note head
  2. Make sure it's of the flag duration type 1/8th or lesser in value
  3. Enable "reversed hook"

image
(Image from MuseScore 3.7)

Kind of a gimmick, but so long as it doesn't hurt anything I suppose it might fulfill little niche use cases for some people.

Testing appreciated

@Jojo-Schmitz
Copy link
Contributor Author

It doesn't quite work yet, I'm not sure at all why though, hints needed...

@@ -2698,6 +2698,8 @@ bool TRead::readProperties(Chord* ch, XmlReader& e, ReadContext& ctx)
TRead::read(ss, e, ctx);
ch->add(ss);
} else if (TRead::readProperty(ch, tag, e, ctx, Pid::STEM_DIRECTION)) {
} else if (tag == "hookReverse") {
ch->setHookReversed(e.readBool());
Copy link
Contributor Author

@Jojo-Schmitz Jojo-Schmitz Dec 29, 2024

Choose a reason for hiding this comment

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

Maybe this needs to get added to read302.cpp too, in order to be able to read this from 3.7 scores?

@Jojo-Schmitz Jojo-Schmitz changed the title Allow reversal of hook flags within Properties: Chord Allow reversal of hook flags within Inspector: Chord Dec 29, 2024
@@ -2102,11 +2106,13 @@ PropertyValue Chord::propertyDefault(Pid propertyId) const
{
switch (propertyId) {
case Pid::NO_STEM: return false;
case Pid::SHOW_STEM_SLASH: return noteType() == NoteType::ACCIACCATURA;
case Pid::SHOW_STEM_SLASH: return noteType() & NoteType::ACCIACCATURA;
Copy link
Contributor Author

@Jojo-Schmitz Jojo-Schmitz Dec 29, 2024

Choose a reason for hiding this comment

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

Unrelated, fixes a Visual Studio warning

@@ -85,6 +85,7 @@ static constexpr PropertyMetaData propertyList[] = {
{ Pid::DIRECTION, false, "direction", P_TYPE::DIRECTION_V, PropertyGroup::POSITION, DUMMY_QT_TR_NOOP("propertyName", "direction") },
{ Pid::STEM_DIRECTION, false, "StemDirection", P_TYPE::DIRECTION_V, PropertyGroup::APPEARANCE, DUMMY_QT_TR_NOOP("propertyName", "stem direction") },
{ Pid::NO_STEM, false, "noStem", P_TYPE::INT, PropertyGroup::APPEARANCE, DUMMY_QT_TR_NOOP("propertyName", "no stem") },
{ Pid::HOOK_REVERSED, false, "hookReverse", P_TYPE::BOOL, PropertyGroup::POSITION, DUMMY_QT_TR_NOOP("propertyName", "reverse hook") },
Copy link
Contributor Author

@Jojo-Schmitz Jojo-Schmitz Dec 29, 2024

Choose a reason for hiding this comment

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

Probably better "hookReversed" or even "reversedHook" (requires changes elsewhere too) and "reversed hook"

navigationPanel: root.navigationPanel
navigationRowStart: root.navigationRowStart + 1
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doesn't seem to work at all...

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.

2 participants