From fe1c668783b8ddeec4e7abf239bb747d515c8d86 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Sat, 20 Nov 2021 16:12:46 +0100 Subject: [PATCH] Fix #321771: Adding new SMuFL glyphs to MuseScore notehead library --- src/engraving/libmscore/note.cpp | 10 ++++++++-- src/engraving/types/types.h | 3 +++ src/engraving/types/typesconv.cpp | 6 ++++++ src/palette/view/widgets/editdrumsetdialog.cpp | 5 ++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/engraving/libmscore/note.cpp b/src/engraving/libmscore/note.cpp index 54679509828ec..7f47ef125c984 100644 --- a/src/engraving/libmscore/note.cpp +++ b/src/engraving/libmscore/note.cpp @@ -204,7 +204,10 @@ static const SymId noteHeads[2][int(NoteHeadGroup::HEAD_GROUPS) - 1][int(NoteHea { SymId::noteGWhole, SymId::noteGHalf, SymId::noteGBlack, SymId::noSym }, { SymId::noteGFlatWhole, SymId::noteGFlatHalf, SymId::noteGFlatBlack, SymId::noSym }, { SymId::noteHWhole, SymId::noteHHalf, SymId::noteHBlack, SymId::noSym }, - { SymId::noteHSharpWhole, SymId::noteHSharpHalf, SymId::noteHSharpBlack, SymId::noSym } + { SymId::noteHSharpWhole, SymId::noteHSharpHalf, SymId::noteHSharpBlack, SymId::noSym }, + + { SymId::noSym, SymId::swissRudimentsNoteheadHalfFlam, SymId::swissRudimentsNoteheadBlackFlam, SymId::noSym }, + { SymId::noSym, SymId::swissRudimentsNoteheadHalfDouble, SymId::swissRudimentsNoteheadBlackDouble, SymId::noSym } }, { // up stem { SymId::noteheadWhole, SymId::noteheadHalf, SymId::noteheadBlack, @@ -316,7 +319,10 @@ static const SymId noteHeads[2][int(NoteHeadGroup::HEAD_GROUPS) - 1][int(NoteHea { SymId::noteGWhole, SymId::noteGHalf, SymId::noteGBlack, SymId::noSym }, { SymId::noteGFlatWhole, SymId::noteGFlatHalf, SymId::noteGFlatBlack, SymId::noSym }, { SymId::noteHWhole, SymId::noteHHalf, SymId::noteHBlack, SymId::noSym }, - { SymId::noteHSharpWhole, SymId::noteHSharpHalf, SymId::noteHSharpBlack, SymId::noSym } + { SymId::noteHSharpWhole, SymId::noteHSharpHalf, SymId::noteHSharpBlack, SymId::noSym }, + + { SymId::noSym, SymId::swissRudimentsNoteheadHalfFlam, SymId::swissRudimentsNoteheadBlackFlam, SymId::noSym }, + { SymId::noSym, SymId::swissRudimentsNoteheadHalfDouble, SymId::swissRudimentsNoteheadBlackDouble, SymId::noSym } } }; diff --git a/src/engraving/types/types.h b/src/engraving/types/types.h index bb545af041b78..5d12abc0e50cb 100644 --- a/src/engraving/types/types.h +++ b/src/engraving/types/types.h @@ -468,6 +468,9 @@ enum class NoteHeadGroup : signed char { HEAD_H, HEAD_H_SHARP, + HEAD_SWISS_RUDIMENTS_FLAM, + HEAD_SWISS_RUDIMENTS_DOUBLE, + HEAD_CUSTOM, HEAD_GROUPS, HEAD_INVALID = -1 diff --git a/src/engraving/types/typesconv.cpp b/src/engraving/types/typesconv.cpp index 3f2bead014103..2022ff42aeb20 100644 --- a/src/engraving/types/typesconv.cpp +++ b/src/engraving/types/typesconv.cpp @@ -480,6 +480,12 @@ static const std::vector > NOTEHEAD_GROUPS = { { NoteHeadGroup::HEAD_H, "h-name", TranslatableString("engraving/noteheadgroup", "H (Name)") }, { NoteHeadGroup::HEAD_H_SHARP, "h-sharp-name", TranslatableString("engraving/noteheadgroup", "H♯ (Name)") }, + // Swiss rudiments + { NoteHeadGroup::HEAD_SWISS_RUDIMENTS_FLAM, "swiss-rudiments-flam", TranslatableString("engraving/noteheadgroup", + "Swiss Rudiments Flam") }, + { NoteHeadGroup::HEAD_SWISS_RUDIMENTS_DOUBLE, "swiss-rudiments-double", TranslatableString("engraving/noteheadgroup", + "Swiss Rudiments Doublé") }, + { NoteHeadGroup::HEAD_CUSTOM, "custom", TranslatableString("engraving", "Custom") } }; diff --git a/src/palette/view/widgets/editdrumsetdialog.cpp b/src/palette/view/widgets/editdrumsetdialog.cpp index 746daf4b93029..6374ada54939a 100644 --- a/src/palette/view/widgets/editdrumsetdialog.cpp +++ b/src/palette/view/widgets/editdrumsetdialog.cpp @@ -97,6 +97,8 @@ NoteHeadGroup noteHeadNames[] = { NoteHeadGroup::HEAD_FA, NoteHeadGroup::HEAD_LA, NoteHeadGroup::HEAD_TI, + NoteHeadGroup::HEAD_SWISS_RUDIMENTS_FLAM, + NoteHeadGroup::HEAD_SWISS_RUDIMENTS_DOUBLE, NoteHeadGroup::HEAD_CUSTOM }; @@ -185,7 +187,8 @@ EditDrumsetDialog::EditDrumsetDialog(QWidget* parent) pitchList->setColumnWidth(2, 30); QStringList validNoteheadRanges - = { "Noteheads", "Round and square noteheads", "Slash noteheads", "Shape note noteheads", "Shape note noteheads supplement" }; + = { "Noteheads", "Round and square noteheads", "Slash noteheads", "Shape note noteheads", "Shape note noteheads supplement", + "Techniques noteheads" }; QSet excludeSym = { "noteheadParenthesisLeft", "noteheadParenthesisRight", "noteheadParenthesis", "noteheadNull" }; QStringList primaryNoteheads = { "noteheadXOrnate",