Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 87 additions & 19 deletions src/engraving/dom/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,18 @@ SymId Note::noteHead(int direction, NoteHeadGroup group, NoteHeadType t, int tpc
return noteHeads[direction][int(group)][int(t)];
}
// other schemes
if (scheme == NoteHeadScheme::HEAD_PITCHNAME || scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN) {
if (scheme == NoteHeadScheme::HEAD_PITCHNAME || scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN
|| scheme == NoteHeadScheme::HEAD_PITCHNAME_NO_ACCIDENTALS
|| scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS) {
const bool no_accidentals = scheme == NoteHeadScheme::HEAD_PITCHNAME_NO_ACCIDENTALS
|| scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS;
const bool german = scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN
|| scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS;

if (tpc == Tpc::TPC_A) {
group = NoteHeadGroup::HEAD_A;
} else if (tpc == Tpc::TPC_B) {
if (scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN) {
if (german) {
group = NoteHeadGroup::HEAD_H;
} else {
group = NoteHeadGroup::HEAD_B;
Expand All @@ -360,41 +367,101 @@ SymId Note::noteHead(int direction, NoteHeadGroup group, NoteHeadType t, int tpc
} else if (tpc == Tpc::TPC_G) {
group = NoteHeadGroup::HEAD_G;
} else if (tpc == Tpc::TPC_A_S) {
group = NoteHeadGroup::HEAD_A_SHARP;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_A;
} else {
group = NoteHeadGroup::HEAD_A_SHARP;
}
} else if (tpc == Tpc::TPC_B_S) {
if (scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN) {
group = NoteHeadGroup::HEAD_H_SHARP;
if (no_accidentals) {
if (german) {
group = NoteHeadGroup::HEAD_H;
} else {
group = NoteHeadGroup::HEAD_B;
}
} else {
group = NoteHeadGroup::HEAD_B_SHARP;
if (german) {
group = NoteHeadGroup::HEAD_H_SHARP;
} else {
group = NoteHeadGroup::HEAD_B_SHARP;
}
}
} else if (tpc == Tpc::TPC_C_S) {
group = NoteHeadGroup::HEAD_C_SHARP;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_C;
} else {
group = NoteHeadGroup::HEAD_C_SHARP;
}
} else if (tpc == Tpc::TPC_D_S) {
group = NoteHeadGroup::HEAD_D_SHARP;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_D;
} else {
group = NoteHeadGroup::HEAD_D_SHARP;
}
} else if (tpc == Tpc::TPC_E_S) {
group = NoteHeadGroup::HEAD_E_SHARP;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_E;
} else {
group = NoteHeadGroup::HEAD_E_SHARP;
}
} else if (tpc == Tpc::TPC_F_S) {
group = NoteHeadGroup::HEAD_F_SHARP;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_F;
} else {
group = NoteHeadGroup::HEAD_F_SHARP;
}
} else if (tpc == Tpc::TPC_G_S) {
group = NoteHeadGroup::HEAD_G_SHARP;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_G;
} else {
group = NoteHeadGroup::HEAD_G_SHARP;
}
} else if (tpc == Tpc::TPC_A_B) {
group = NoteHeadGroup::HEAD_A_FLAT;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_A;
} else {
group = NoteHeadGroup::HEAD_A_FLAT;
}
} else if (tpc == Tpc::TPC_B_B) {
if (scheme == NoteHeadScheme::HEAD_PITCHNAME_GERMAN) {
if (no_accidentals) {
group = NoteHeadGroup::HEAD_B;
} else {
group = NoteHeadGroup::HEAD_B_FLAT;
if (german) {
group = NoteHeadGroup::HEAD_B;
} else {
group = NoteHeadGroup::HEAD_B_FLAT;
}
}
} else if (tpc == Tpc::TPC_C_B) {
group = NoteHeadGroup::HEAD_C_FLAT;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_C;
} else {
group = NoteHeadGroup::HEAD_C_FLAT;
}
} else if (tpc == Tpc::TPC_D_B) {
group = NoteHeadGroup::HEAD_D_FLAT;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_D;
} else {
group = NoteHeadGroup::HEAD_D_FLAT;
}
} else if (tpc == Tpc::TPC_E_B) {
group = NoteHeadGroup::HEAD_E_FLAT;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_E;
} else {
group = NoteHeadGroup::HEAD_E_FLAT;
}
} else if (tpc == Tpc::TPC_F_B) {
group = NoteHeadGroup::HEAD_F_FLAT;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_F;
} else {
group = NoteHeadGroup::HEAD_F_FLAT;
}
} else if (tpc == Tpc::TPC_G_B) {
group = NoteHeadGroup::HEAD_G_FLAT;
if (no_accidentals) {
group = NoteHeadGroup::HEAD_G;
} else {
group = NoteHeadGroup::HEAD_G_FLAT;
}
}
} else if (scheme == NoteHeadScheme::HEAD_SHAPE_NOTE_4) {
int degree = tpc2degree(tpc, key);
Expand Down Expand Up @@ -1390,6 +1457,7 @@ bool Note::isNoteName() const
s = st->staffTypeForElement(this)->noteHeadScheme();
}
return s == NoteHeadScheme::HEAD_PITCHNAME || s == NoteHeadScheme::HEAD_PITCHNAME_GERMAN
|| s == NoteHeadScheme::HEAD_PITCHNAME_NO_ACCIDENTALS || s == NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS
|| s == NoteHeadScheme::HEAD_SOLFEGE || s == NoteHeadScheme::HEAD_SOLFEGE_FIXED;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/engraving/dom/note.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static const int INVALID_LINE = -10000;
// @P elements array[EngravingItem] list of elements attached to notehead
// @P fret int fret number in tablature
// @P ghost bool ghost note (guitar: death note)
// @P headScheme enum (NoteHeadScheme.HEAD_AUTO, .HEAD_NORMAL, .HEAD_PITCHNAME, .HEAD_PITCHNAME_GERMAN, .HEAD_SHAPE_NOTE_4, .HEAD_SHAPE_NOTE_7_AIKIN, .HEAD_SHAPE_NOTE_7_FUNK, .HEAD_SHAPE_NOTE_7_WALKER, .HEAD_SOLFEGE, .HEAD_SOLFEGE_FIXED)
// @P headScheme enum (NoteHeadScheme.HEAD_AUTO, .HEAD_NORMAL, .HEAD_PITCHNAME, .HEAD_PITCHNAME_NO_ACCIDENTALS, .HEAD_PITCHNAME_GERMAN, .HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS, .HEAD_SHAPE_NOTE_4, .HEAD_SHAPE_NOTE_7_AIKIN, .HEAD_SHAPE_NOTE_7_FUNK, .HEAD_SHAPE_NOTE_7_WALKER, .HEAD_SOLFEGE, .HEAD_SOLFEGE_FIXED)
// @P headGroup enum (NoteHeadGroup.HEAD_NORMAL, .HEAD_BREVIS_ALT, .HEAD_CROSS, .HEAD_DIAMOND, .HEAD_DO, .HEAD_FA, .HEAD_LA, .HEAD_MI, .HEAD_RE, .HEAD_SLASH, .HEAD_LARGE_DIAMOND, .HEAD_SOL, .HEAD_TI, .HEAD_XCIRCLE, .HEAD_TRIANGLE)
// @P headType enum (NoteHeadType.HEAD_AUTO, .HEAD_BREVIS, .HEAD_HALF, .HEAD_QUARTER, .HEAD_WHOLE)
// @P hidden bool hidden, not played note (read only)
Expand Down
2 changes: 2 additions & 0 deletions src/engraving/types/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@ enum class NoteHeadScheme : signed char {
HEAD_AUTO = -1,
HEAD_NORMAL,
HEAD_PITCHNAME,
HEAD_PITCHNAME_NO_ACCIDENTALS,
HEAD_PITCHNAME_GERMAN,
HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS,
HEAD_SOLFEGE,
HEAD_SOLFEGE_FIXED,
HEAD_SHAPE_NOTE_4,
Expand Down
2 changes: 2 additions & 0 deletions src/engraving/types/typesconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,9 @@ static const std::vector<Item<NoteHeadScheme> > NOTEHEAD_SCHEMES = {
{ NoteHeadScheme::HEAD_AUTO, "auto", muse::TranslatableString("engraving", "Auto") },
{ NoteHeadScheme::HEAD_NORMAL, "normal", muse::TranslatableString("engraving/noteheadscheme", "Normal") },
{ NoteHeadScheme::HEAD_PITCHNAME, "name-pitch", muse::TranslatableString("engraving/noteheadscheme", "Pitch names") },
{ NoteHeadScheme::HEAD_PITCHNAME_NO_ACCIDENTALS, "name-pitch-no-acc", muse::TranslatableString("engraving/noteheadscheme", "Pitch names, no accidentals") },
{ NoteHeadScheme::HEAD_PITCHNAME_GERMAN, "name-pitch-german", muse::TranslatableString("engraving/noteheadscheme", "German pitch names") },
{ NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS, "name-pitch-german-no-acc", muse::TranslatableString("engraving/noteheadscheme", "German pitch names, no accidentals") },
{ NoteHeadScheme::HEAD_SOLFEGE, "solfege-movable", muse::TranslatableString("engraving/noteheadscheme", "Solf\u00e8ge movable Do") }, // &egrave;
{ NoteHeadScheme::HEAD_SOLFEGE_FIXED, "solfege-fixed", muse::TranslatableString("engraving/noteheadscheme", "Solf\u00e8ge fixed Do") }, // &egrave;
{ NoteHeadScheme::HEAD_SHAPE_NOTE_4, "shape-4", muse::TranslatableString("engraving/noteheadscheme", "4-shape (Walker)") },
Expand Down
2 changes: 2 additions & 0 deletions src/notationscene/widgets/editstafftype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ using namespace muse::ui;
mu::engraving::NoteHeadScheme noteHeadSchemes[] = {
mu::engraving::NoteHeadScheme::HEAD_NORMAL,
mu::engraving::NoteHeadScheme::HEAD_PITCHNAME,
mu::engraving::NoteHeadScheme::HEAD_PITCHNAME_NO_ACCIDENTALS,
mu::engraving::NoteHeadScheme::HEAD_PITCHNAME_GERMAN,
mu::engraving::NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS,
mu::engraving::NoteHeadScheme::HEAD_SOLFEGE,
mu::engraving::NoteHeadScheme::HEAD_SOLFEGE_FIXED,
mu::engraving::NoteHeadScheme::HEAD_SHAPE_NOTE_4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,12 @@ QVariantList NoteheadSettingsModel::possibleHeadSystemTypes() const
{ mu::engraving::NoteHeadScheme::HEAD_AUTO, muse::qtrc("propertiespanel", "Auto", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_NORMAL, muse::qtrc("propertiespanel", "Normal", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_PITCHNAME, muse::qtrc("propertiespanel", "Pitch names", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_PITCHNAME_NO_ACCIDENTALS,
muse::qtrc("propertiespanel", "Pitch names, no accidentals", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_PITCHNAME_GERMAN,
muse::qtrc("propertiespanel", "German pitch names", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_PITCHNAME_GERMAN_NO_ACCIDENTALS,
muse::qtrc("propertiespanel", "German pitch names, no accidentals", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_SOLFEGE,
muse::qtrc("propertiespanel", "Solfège movable do", "notehead scheme") },
{ mu::engraving::NoteHeadScheme::HEAD_SOLFEGE_FIXED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ Column {
{ text: qsTrc("propertiespanel", "Auto"), value: NoteHead.SCHEME_AUTO },
{ text: qsTrc("propertiespanel", "Normal"), value: NoteHead.SCHEME_NORMAL },
{ text: qsTrc("propertiespanel", "Pitch names"), value: NoteHead.SCHEME_PITCHNAME },
{ text: qsTrc("propertiespanel", "Pitch names, no accidentals"), value: NoteHead.SCHEME_PITCHNAME_NO_ACCIDENTALS },
{ text: qsTrc("propertiespanel", "German pitch names"), value: NoteHead.SCHEME_PITCHNAME_GERMAN },
{ text: qsTrc("propertiespanel", "German pitch names, no accidentals"), value: NoteHead.SCHEME_PITCHNAME_GERMAN_NO_ACCIDENTALS },
{ text: qsTrc("propertiespanel", "Solfege movable Do"), value: NoteHead.SCHEME_SOLFEGE },
{ text: qsTrc("propertiespanel", "Solfege fixed Do"), value: NoteHead.SCHEME_SOLFEGE_FIXED },
{ text: qsTrc("propertiespanel", "4-shape (Walker)"), value: NoteHead.SCHEME_SHAPE_NOTE_4 },
Expand Down
Loading