From 7c8e89302f903eaa51e3043c9133eaae9f456fcd Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Fri, 17 Jan 2025 10:24:48 +0100 Subject: [PATCH 1/3] Change "Respell pitches" to "Optimize enharmonic spelling" See discussion in https://discord.com/channels/818804595450445834/818852942882275379/1328981777443721368 ff. --- src/notation/internal/notationinteraction.cpp | 2 +- src/notation/internal/notationuiactions.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/notation/internal/notationinteraction.cpp b/src/notation/internal/notationinteraction.cpp index 5136e2625f586..f078b19306e1c 100644 --- a/src/notation/internal/notationinteraction.cpp +++ b/src/notation/internal/notationinteraction.cpp @@ -6309,7 +6309,7 @@ void NotationInteraction::changeEnharmonicSpelling(bool both) void NotationInteraction::spellPitches() { - startEdit(TranslatableString("undoableAction", "Respell pitches")); + startEdit(TranslatableString("undoableAction", "Optimize enharmonic spelling")); score()->spell(); apply(); } diff --git a/src/notation/internal/notationuiactions.cpp b/src/notation/internal/notationuiactions.cpp index ec5da8914a9b3..cfa603e9e8d02 100644 --- a/src/notation/internal/notationuiactions.cpp +++ b/src/notation/internal/notationuiactions.cpp @@ -472,8 +472,8 @@ const UiActionList NotationUiActions::m_actions = { UiAction("pitch-spell", mu::context::UiCtxProjectOpened, mu::context::CTX_NOTATION_OPENED, - TranslatableString("action", "Respell &pitches"), - TranslatableString("action", "Respell pitches") + TranslatableString("action", "&Optimize enharmonic spelling"), + TranslatableString("action", "Optimize enharmonic spelling") ), UiAction("reset-groupings", mu::context::UiCtxProjectOpened, From 75544edc8021ad8c1a26f77d3cffc6ecdc89773e Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Mon, 20 Jan 2025 15:50:10 +0100 Subject: [PATCH 2/3] Penality for note spelling is incorrect for Ab (4 flats) See #5257 --- src/engraving/dom/pitchspelling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engraving/dom/pitchspelling.cpp b/src/engraving/dom/pitchspelling.cpp index ee78f8355839f..17ef621d522fc 100644 --- a/src/engraving/dom/pitchspelling.cpp +++ b/src/engraving/dom/pitchspelling.cpp @@ -473,7 +473,7 @@ static const int enharmonicSpelling[15][34] = { //As f c g d a e b 1, 1, 1, 1, 1, 1, // bb 1, 1, 0, 0, 0, 0, 0, // b - 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, // # 1, 1, 1, 1, 1, 1, 1 // ## }, From e2e79cc58779d93cf71ba4c8a64172066d2a633f Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Fri, 17 Jan 2025 14:47:03 +0100 Subject: [PATCH 3/3] Add enharmonic spelling commands to the Tools menu and rename to be clearer --- src/appshell/view/appmenumodel.cpp | 2 ++ src/notation/internal/notationuiactions.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/appshell/view/appmenumodel.cpp b/src/appshell/view/appmenumodel.cpp index cbb47c0b946c3..23067d2ae0ce8 100644 --- a/src/appshell/view/appmenumodel.cpp +++ b/src/appshell/view/appmenumodel.cpp @@ -392,6 +392,8 @@ MenuItem* AppMenuModel::makeToolsMenu() makeMenuItem("slash-fill"), makeMenuItem("slash-rhythm"), makeSeparator(), + makeMenuItem("enh-both"), + makeMenuItem("enh-current"), makeMenuItem("pitch-spell"), makeMenuItem("reset-groupings"), makeMenuItem("resequence-rehearsal-marks"), diff --git a/src/notation/internal/notationuiactions.cpp b/src/notation/internal/notationuiactions.cpp index cfa603e9e8d02..d4274c4c36683 100644 --- a/src/notation/internal/notationuiactions.cpp +++ b/src/notation/internal/notationuiactions.cpp @@ -1650,15 +1650,15 @@ const UiActionList NotationUiActions::m_actions = { UiAction("enh-both", mu::context::UiCtxProjectOpened, mu::context::CTX_NOTATION_OPENED, - TranslatableString("action", "Change enharmonic spelling (both modes)"), - TranslatableString("action", "Change enharmonic spelling (concert and written pitch)"), + TranslatableString("action", "Change enharmonic spelling (concert and transposed &pitch)"), + TranslatableString("action", "Change enharmonic spelling (concert and transposed pitch)"), IconCode::Code::NONE ), UiAction("enh-current", mu::context::UiCtxProjectOpened, mu::context::CTX_NOTATION_OPENED, - TranslatableString("action", "Change enharmonic spelling (current mode)"), - TranslatableString("action", "Change enharmonic spelling (current mode only)"), + TranslatableString("action", "Change enharmonic spelling (¤t pitch mode only)"), + TranslatableString("action", "Change enharmonic spelling (current pitch mode only)"), IconCode::Code::NONE ), UiAction("flip",