Skip to content

Commit

Permalink
basic matching for notehead-text on import
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Dec 23, 2024
1 parent 10fd6fd commit 90a9b26
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6622,6 +6622,23 @@ Note* MusicXmlParserPass2::note(const String& partId,
} else {
headGroup = convertNotehead(noteheadValue);
}
} else if (m_e.name() == "notehead-text") {
String noteheadText;
while (m_e.readNextStartElement()) {
if (m_e.name() == "display-text") {
noteheadText = m_e.readText();
} else if (m_e.name() == "accidental-text") {
m_e.skipCurrentElement();
} else {
skipLogCurrElem();
}
}
if (noteheadText.size() == 1) {
headScheme = (noteheadText == u"H")
? NoteHeadScheme::HEAD_PITCHNAME_GERMAN : NoteHeadScheme::HEAD_PITCHNAME;
} else {
headScheme = NoteHeadScheme::HEAD_SOLFEGE;
}
} else if (m_e.name() == "rest") {
rest = true;
measureRest = m_e.asciiAttribute("measure") == "yes";
Expand Down

0 comments on commit 90a9b26

Please sign in to comment.