Skip to content

Commit

Permalink
Merge pull request #3446 from paxbun/fix/musicxml-wedge-spread
Browse files Browse the repository at this point in the history
Fix MusicXML diminuendo <wedge> spread handling [skip-ci]
  • Loading branch information
lpugin authored Jun 8, 2023
2 parents 4c2e338 + 9547d8d commit 4f1a85b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/iomusxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2229,10 +2229,12 @@ void MusicXmlInput::ReadMusicXmlDirection(
if (wedge->node().attribute("niente")) {
iter->first->SetNiente(ConvertWordToBool(wedge->node().attribute("niente").as_string()));
}
if (wedge->node().attribute("spread")) {
data_MEASUREMENTSIGNED opening;
opening.SetVu(wedge->node().attribute("spread").as_double() / 5);
iter->first->SetOpening(opening);
if (iter->first->GetForm() == hairpinLog_FORM_cres) {
if (wedge->node().attribute("spread")) {
data_MEASUREMENTSIGNED opening;
opening.SetVu(wedge->node().attribute("spread").as_double() / 5);
iter->first->SetOpening(opening);
}
}
matchedWedge = true;
m_hairpinStack.erase(iter);
Expand All @@ -2252,6 +2254,11 @@ void MusicXmlInput::ReadMusicXmlDirection(
}
else if (HasAttributeWithValue(wedge->node(), "type", "diminuendo")) {
hairpin->SetForm(hairpinLog_FORM_dim);
if (wedge->node().attribute("spread")) {
data_MEASUREMENTSIGNED opening;
opening.SetVu(wedge->node().attribute("spread").as_double() / 5);
hairpin->SetOpening(opening);
}
}
else {
delete hairpin;
Expand Down

0 comments on commit 4f1a85b

Please sign in to comment.