Skip to content

Commit

Permalink
Fix #320818: Chord symbols with a bass extension don't export to Musi…
Browse files Browse the repository at this point in the history
…cXML correctly (nor import back)
  • Loading branch information
Jojo-Schmitz committed Jun 22, 2023
1 parent d49baaf commit 05d15f9
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/importexport/musicxml/internal/musicxml/exportxml.cpp
Expand Up @@ -7758,6 +7758,18 @@ void ExportMusicXml::harmony(Harmony const* const h, FretDiagram const* const fd
s += " parentheses-degrees=\"yes\"";
}
_xml.tagRaw(s, h->xmlKind());

int baseTpc = h->baseTpc();
if (baseTpc != Tpc::TPC_INVALID) {
_xml.startElement("bass");
_xml.tag("bass-step", tpc2stepName(baseTpc));
alter = int(tpc2alter(baseTpc));
if (alter) {
_xml.tag("bass-alter", alter);
}
_xml.endElement();
}

StringList l = h->xmlDegrees();
if (!l.empty()) {
for (const String& _tag : qAsConst(l)) {
Expand Down Expand Up @@ -7806,18 +7818,19 @@ void ExportMusicXml::harmony(Harmony const* const h, FretDiagram const* const fd
} else {
_xml.tag("kind", { { "text", h->extensionName() } }, "");
}
}

int baseTpc = h->baseTpc();
if (baseTpc != Tpc::TPC_INVALID) {
_xml.startElement("bass");
_xml.tag("bass-step", tpc2stepName(baseTpc));
alter = int(tpc2alter(baseTpc));
if (alter) {
_xml.tag("bass-alter", alter);
int baseTpc = h->baseTpc();
if (baseTpc != Tpc::TPC_INVALID) {
_xml.startElement("bass");
_xml.tag("bass-step", tpc2stepName(baseTpc));
alter = int(tpc2alter(baseTpc));
if (alter) {
_xml.tag("bass-alter", alter);
}
_xml.endElement();
}
_xml.endElement();
}

if (offset > 0) {
_xml.tag("offset", offset);
}
Expand Down

0 comments on commit 05d15f9

Please sign in to comment.