Skip to content

Commit

Permalink
Fix #321771: Adding new SMuFL glyphs to MuseScore notehead library
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Aug 1, 2022
1 parent f1a7e18 commit fe1c668
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/engraving/libmscore/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 }
}
};

Expand Down
3 changes: 3 additions & 0 deletions src/engraving/types/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/engraving/types/typesconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@ static const std::vector<Item<NoteHeadGroup> > 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") }
};

Expand Down
5 changes: 4 additions & 1 deletion src/palette/view/widgets/editdrumsetdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down Expand Up @@ -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<QString> excludeSym = { "noteheadParenthesisLeft", "noteheadParenthesisRight", "noteheadParenthesis", "noteheadNull" };
QStringList primaryNoteheads = {
"noteheadXOrnate",
Expand Down

0 comments on commit fe1c668

Please sign in to comment.