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
WIP
Backport of musescore#9805
  • Loading branch information
Jojo-Schmitz committed Nov 21, 2021
1 parent 16e6de2 commit 53508eb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
13 changes: 11 additions & 2 deletions libmscore/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ static const SymId noteHeads[2][int(NoteHead::Group::HEAD_GROUPS) - 1][int(NoteH
{ 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, SymId::noteheadDoubleWhole },
Expand Down Expand Up @@ -206,8 +208,10 @@ static const SymId noteHeads[2][int(NoteHead::Group::HEAD_GROUPS) - 1][int(NoteH
{ 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 Expand Up @@ -301,6 +305,11 @@ static NoteHeadName noteHeadGroupNames[] = {
{"g-flat-name", QT_TRANSLATE_NOOP("noteheadnames", "G♭ (Name)") },
{"h-name", QT_TRANSLATE_NOOP("noteheadnames", "H (Name)") },
{"h-sharp-name", QT_TRANSLATE_NOOP("noteheadnames", "H♯ (Name)") },

// Swiss rudiments
{"swiss-rudiments-flam", QT_TRANSLATE_NOOP("noteheadnames", "Swiss Rudiments Flam") },
{"swiss-rudiments-double", QT_TRANSLATE_NOOP("noteheadnames", "Swiss Rudiments Doublé") },

{"custom", QT_TRANSLATE_NOOP("noteheadnames", "Custom") }
};

Expand Down
3 changes: 3 additions & 0 deletions libmscore/note.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ class NoteHead final : public Symbol {
HEAD_H,
HEAD_H_SHARP,

HEAD_SWISS_RUDIMENTS_FLAM,
HEAD_SWISS_RUDIMENTS_DOUBLE,

HEAD_CUSTOM,
HEAD_GROUPS,
HEAD_INVALID = -1
Expand Down
8 changes: 7 additions & 1 deletion mscore/editdrumset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ NoteHead::Group noteHeadNames[] = {
NoteHead::Group::HEAD_FA,
NoteHead::Group::HEAD_LA,
NoteHead::Group::HEAD_TI,
NoteHead::Group::HEAD_SWISS_RUDIMENTS_FLAM,
NoteHead::Group::HEAD_SWISS_RUDIMENTS_DOUBLE,
NoteHead::Group::HEAD_CUSTOM
};

Expand Down Expand Up @@ -172,7 +174,11 @@ EditDrumset::EditDrumset(const Drumset* ds, QWidget* parent)
"noteheadLargeArrowUpBlack",
"noteheadLargeArrowUpHalf",
"noteheadLargeArrowUpWhole",
"noteheadLargeArrowUpDoubleWhole"
"noteheadLargeArrowUpDoubleWhole",
"swissRudimentsNoteheadBlackFlam",
"swissRudimentsNoteheadHalfFlam",
"swissRudimentsNoteheadBlackDouble",
"swissRudimentsNoteheadHalfDouble"
};

int w = quarterCmb->iconSize().width() * qApp->devicePixelRatio();
Expand Down

0 comments on commit 53508eb

Please sign in to comment.