From b5a1ac3dd83e639b0e8908fdc13cfda1f4380618 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Thu, 22 Aug 2024 11:49:39 +0200 Subject: [PATCH 1/2] handle numeral harmonics --- src/iomusxml.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/iomusxml.cpp b/src/iomusxml.cpp index 001017a6f9d..1b36e508d5a 100644 --- a/src/iomusxml.cpp +++ b/src/iomusxml.cpp @@ -2590,6 +2590,10 @@ void MusicXmlInput::ReadMusicXmlHarmony(pugi::xml_node node, Measure *measure, c int durOffset = 0; std::string harmText = GetContentOfChild(node, "root/root-step"); + if (harmText.empty()) { + pugi::xml_node numeral = node.select_node("numeral/numeral-root").node(); + harmText = numeral.attribute("text") ? numeral.attribute("text").as_string() : numeral.text().as_string(); + } pugi::xpath_node alter = node.select_node("root/root-alter"); if (alter) harmText += ConvertAlterToSymbol(GetContent(alter.node())); pugi::xml_node kind = node.child("kind"); From 900142cad2c05c194bdb1faccea8700b1eef1611 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Mon, 26 Aug 2024 10:21:59 +0200 Subject: [PATCH 2/2] take numeral-alter into account --- src/iomusxml.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iomusxml.cpp b/src/iomusxml.cpp index 1b36e508d5a..0432bf0caf1 100644 --- a/src/iomusxml.cpp +++ b/src/iomusxml.cpp @@ -2590,11 +2590,12 @@ void MusicXmlInput::ReadMusicXmlHarmony(pugi::xml_node node, Measure *measure, c int durOffset = 0; std::string harmText = GetContentOfChild(node, "root/root-step"); + pugi::xpath_node alter = node.select_node("root/root-alter"); if (harmText.empty()) { pugi::xml_node numeral = node.select_node("numeral/numeral-root").node(); harmText = numeral.attribute("text") ? numeral.attribute("text").as_string() : numeral.text().as_string(); + alter = node.select_node("numeral/numeral-alter"); } - pugi::xpath_node alter = node.select_node("root/root-alter"); if (alter) harmText += ConvertAlterToSymbol(GetContent(alter.node())); pugi::xml_node kind = node.child("kind"); if (kind) {