Skip to content

Commit

Permalink
Implementation for issue humdrum-tools/verovio-humdrum-viewer#855
Browse files Browse the repository at this point in the history
  • Loading branch information
craigsapp committed Oct 3, 2023
1 parent ad474b6 commit ef1868d
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/iohumdrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7433,18 +7433,6 @@ void HumdrumInput::setClef(StaffDef *staff, const std::string &clef, hum::HTp cl
setLocationId(vrvclef, cleftok);
}

if (clef.find("clefGG") != std::string::npos) {
vrvclef->SetShape(CLEFSHAPE_GG);
}
else if (clef.find("clefG") != std::string::npos) {
vrvclef->SetShape(CLEFSHAPE_G);
}
else if (clef.find("clefF") != std::string::npos) {
vrvclef->SetShape(CLEFSHAPE_F);
}
else if (clef.find("clefC") != std::string::npos) {
vrvclef->SetShape(CLEFSHAPE_C);
}
if (clef.find("clefX") != std::string::npos) {
vrvclef->SetShape(CLEFSHAPE_perc);
hum::HumRegex hre;
Expand All @@ -7467,6 +7455,11 @@ void HumdrumInput::setClef(StaffDef *staff, const std::string &clef, hum::HTp cl
std::string tok;
if (cleftok) {
tok = *cleftok;
if (cleftok->isMens()) {
if (*cleftok == "*clefGv2") {
tok = "*clefC4";
}
}
}
else {
tok = clef;
Expand Down Expand Up @@ -19908,7 +19901,10 @@ Clef *HumdrumInput::insertClefElement(

void HumdrumInput::setClefBasicShape(Clef *clef, const std::string &tok)
{
if (tok.find("clefG") != std::string::npos) {
if (tok.find("clefGG") != std::string::npos) {
clef->SetShape(CLEFSHAPE_GG);
}
else if (tok.find("clefG") != std::string::npos) {
clef->SetShape(CLEFSHAPE_G);
}
else if (tok.find("clefF") != std::string::npos) {
Expand Down

0 comments on commit ef1868d

Please sign in to comment.