From 192b77062cfa69a651f4ed6896e2ecb25860e950 Mon Sep 17 00:00:00 2001 From: Craig Sapp Date: Wed, 27 Jun 2018 00:46:34 -0700 Subject: [PATCH] Unmatched **dynam hairpins are converted to "cresc." and "dim." in humdrum-to-mei converter. --- src/iohumdrum.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/iohumdrum.cpp b/src/iohumdrum.cpp index 6f76e92fc71..baa79b0d2d6 100644 --- a/src/iohumdrum.cpp +++ b/src/iohumdrum.cpp @@ -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; @@ -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."); + } } }