Skip to content

Commit

Permalink
Unmatched **dynam hairpins are converted to "cresc." and "dim." in hu…
Browse files Browse the repository at this point in the history
…mdrum-to-mei converter.
  • Loading branch information
craigsapp committed Jun 27, 2018
1 parent fc3937b commit 192b770
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/iohumdrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6136,6 +6136,16 @@ void HumdrumInput::processDynamics(hum::HTp token, int staffindex)
setPlace(hairpin, "below");
}
}
else {
// no endpoint so print as the word "cresc."
Dir *dir = new Dir;
m_measure->AddChild(dir);
setStaff(dir, m_currentstaff);
setLocationId(dir, line->token(i));
hum::HumNum tstamp = getMeasureTstamp(line->token(i), staffindex);
dir->SetTstamp(tstamp.getFloat());
addTextElement(dir, "cresc.");
}
}
else if (hairpins.find(">") != string::npos) {
hum::HTp endtok = NULL;
Expand Down Expand Up @@ -6183,6 +6193,16 @@ void HumdrumInput::processDynamics(hum::HTp token, int staffindex)
setPlace(hairpin, "above");
}
}
else {
// no endpoint so print as the word "dim."
Dir *dir = new Dir;
m_measure->AddChild(dir);
setStaff(dir, m_currentstaff);
setLocationId(dir, line->token(i));
hum::HumNum tstamp = getMeasureTstamp(line->token(i), staffindex);
dir->SetTstamp(tstamp.getFloat());
addTextElement(dir, "dim.");
}
}
}

Expand Down

1 comment on commit 192b770

@craigsapp
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.