Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU4] Fix #306189: Extend Tremolo palette #10000

Merged
merged 1 commit into from
May 10, 2023
Merged
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
14 changes: 13 additions & 1 deletion src/engraving/libmscore/articulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,12 @@ Articulation::AnchorGroup Articulation::anchorGroup(SymId symId)
case SymId::luteFingeringRHThird:
return AnchorGroup::LUTE_FINGERING;

case SymId::tremoloDivisiDots2:
case SymId::tremoloDivisiDots3:
case SymId::tremoloDivisiDots4:
case SymId::tremoloDivisiDots6:
return AnchorGroup::ARTICULATION;

default:
break;
}
Expand All @@ -559,6 +565,10 @@ String Articulation::symId2ArticulationName(SymId symId)

case SymId::articStaccatoAbove:
case SymId::articStaccatoBelow:
case SymId::tremoloDivisiDots2:
case SymId::tremoloDivisiDots3:
case SymId::tremoloDivisiDots4:
case SymId::tremoloDivisiDots6:
return u"staccato";

case SymId::articAccentStaccatoAbove:
Expand Down Expand Up @@ -694,7 +704,9 @@ void Articulation::computeCategories()
_symId == SymId::articStaccatoAbove || _symId == SymId::articStaccatoBelow
|| _symId == SymId::articMarcatoStaccatoAbove || _symId == SymId::articMarcatoStaccatoBelow
|| _symId == SymId::articTenutoStaccatoAbove || _symId == SymId::articTenutoStaccatoBelow
|| _symId == SymId::articAccentStaccatoAbove || _symId == SymId::articAccentStaccatoBelow);
|| _symId == SymId::articAccentStaccatoAbove || _symId == SymId::articAccentStaccatoBelow
|| _symId == SymId::tremoloDivisiDots2 || _symId == SymId::tremoloDivisiDots3
|| _symId == SymId::tremoloDivisiDots4 || _symId == SymId::tremoloDivisiDots6);

m_categories.setFlag(ArticulationCategory::ACCENT,
_symId == SymId::articAccentAbove || _symId == SymId::articAccentBelow
Expand Down
8 changes: 4 additions & 4 deletions src/engraving/types/symnames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5879,10 +5879,10 @@ constexpr const std::array<const char*, size_t(SymId::lastSym) + 1> SymNames::s_
"Combining tremolo 3",
"Combining tremolo 4",
"Combining tremolo 5",
"Divide measured tremolo by 2",
"Divide measured tremolo by 3",
"Divide measured tremolo by 4",
"Divide measured tremolo by 6",
QT_TRANSLATE_NOOP("engraving/sym", "Divide measured tremolo by 2"),
QT_TRANSLATE_NOOP("engraving/sym", "Divide measured tremolo by 3"),
QT_TRANSLATE_NOOP("engraving/sym", "Divide measured tremolo by 4"),
QT_TRANSLATE_NOOP("engraving/sym", "Divide measured tremolo by 6"),
"Fingered tremolo 1",
"Fingered tremolo 2",
"Fingered tremolo 3",
Expand Down
18 changes: 15 additions & 3 deletions src/palette/internal/palettecreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,19 @@ PalettePtr PaletteCreator::newTremoloPalette()
tremolo->setTremoloType(TremoloType(i));
sp->appendElement(tremolo, tremolo->subtypeUserName());
}

static const SymIdList dots {
SymId::tremoloDivisiDots2,
SymId::tremoloDivisiDots3,
SymId::tremoloDivisiDots4,
SymId::tremoloDivisiDots6
};
// include additional symbol-based tremolo articulations, implemented as articulations
for (auto i : dots) {
auto s = Factory::makeArticulation(gpaletteScore->dummy()->chord());
s->setSymId(i);
sp->appendElement(s, s->typeUserName());
}
return sp;
}

Expand Down Expand Up @@ -675,6 +688,7 @@ PalettePtr PaletteCreator::newArticulationsPalette(bool defaultPalette)
auto slur = Factory::makeSlur(gpaletteScore->dummy());
sp->appendElement(slur, QT_TRANSLATE_NOOP("palette", "Slur"));

// do not include additional symbol-based fingerings (temporarily?) implemented as articulations
static const SymIdList defaultArticulations {
SymId::articAccentAbove,
SymId::articStaccatoAbove,
Expand Down Expand Up @@ -771,7 +785,6 @@ PalettePtr PaletteCreator::newOrnamentsPalette(bool defaultPalette)
sp->setDrawGrid(true);
sp->setVisible(false);

// do not include additional symbol-based fingerings (temporarily?) implemented as articulations
static const SymIdList defaultOrnaments {
SymId::ornamentTurnInverted,
SymId::ornamentTurn,
Expand Down Expand Up @@ -831,8 +844,7 @@ PalettePtr PaletteCreator::newAccordionPalette()
sp->setDrawGrid(true);
sp->setVisible(false);

// do not include additional symbol-based fingerings (temporarily?) implemented as articulations
static SymIdList art {
static const SymIdList art {
SymId::accdnCombDot,
SymId::accdnCombLH2RanksEmpty,
SymId::accdnCombLH3RanksEmptySquare,
Expand Down
4 changes: 4 additions & 0 deletions tools/fonttools/smufl2sym-in-trans.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@
"timeSigCut2": null,
"timeSigCut3": null,
"timeSigCutCommon": null,
"tremoloDivisiDots2": null,
"tremoloDivisiDots3": null,
"tremoloDivisiDots4": null,
"tremoloDivisiDots6": null,
"wiggleSawtooth": null,
"wiggleSawtoothWide": null,
"wiggleVibratoLargeFaster": null,
Expand Down