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

add extended fermata symbols to MusicXML I/O #6560

Merged
merged 1 commit into from
Oct 20, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 16 additions & 10 deletions importexport/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,18 +1722,24 @@ static void fermata(const Fermata* const a, XmlWriter& xml)
SymId id = a->symId();
if (id == SymId::fermataAbove || id == SymId::fermataBelow)
xml.tagE(tagName);
// MusicXML does not support the very short fermata nor short fermata (Henze),
// export as short fermata (better than not exporting at all)
else if (id == SymId::fermataShortAbove || id == SymId::fermataShortBelow
|| id == SymId::fermataShortHenzeAbove || id == SymId::fermataShortHenzeBelow
|| id == SymId::fermataVeryShortAbove || id == SymId::fermataVeryShortBelow)
else if (id == SymId::fermataShortAbove || id == SymId::fermataShortBelow) {
xml.tag(tagName, "angled");
// MusicXML does not support the very long fermata nor long fermata (Henze),
// export as long fermata (better than not exporting at all)
else if (id == SymId::fermataLongAbove || id == SymId::fermataLongBelow
|| id == SymId::fermataLongHenzeAbove || id == SymId::fermataLongHenzeBelow
|| id == SymId::fermataVeryLongAbove || id == SymId::fermataVeryLongBelow)
}
else if (id == SymId::fermataLongAbove || id == SymId::fermataLongBelow) {
xml.tag(tagName, "square");
}
else if (id == SymId::fermataVeryShortAbove || id == SymId::fermataVeryShortBelow) {
xml.tag(tagName, "double-angled");
}
else if (id == SymId::fermataVeryLongAbove || id == SymId::fermataVeryLongBelow) {
xml.tag(tagName, "double-square");
}
else if (id == SymId::fermataLongHenzeAbove || id == SymId::fermataLongHenzeBelow) {
xml.tag(tagName, "double-dot");
}
else if (id == SymId::fermataShortHenzeAbove || id == SymId::fermataShortHenzeBelow) {
xml.tag(tagName, "half-curve");
}
else
qDebug("unknown fermata sim id %d", int(id));
}
Expand Down
8 changes: 8 additions & 0 deletions importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6259,6 +6259,14 @@ void MusicXMLParserNotations::fermata()
notation.setSymId(SymId::fermataShortAbove);
else if (fermataText == "square")
notation.setSymId(SymId::fermataLongAbove);
else if (fermataText == "double-angled")
notation.setSymId(SymId::fermataVeryShortAbove);
else if (fermataText == "double-square")
notation.setSymId(SymId::fermataVeryLongAbove);
else if (fermataText == "double-dot")
notation.setSymId(SymId::fermataLongHenzeAbove);
else if (fermataText == "half-curve")
notation.setSymId(SymId::fermataShortHenzeAbove);

if (notation.symId() != SymId::noSym) {
notation.setText(fermataText);
Expand Down