-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from WolfgangDrescher/myank
[myank] Keep *part and *staff interpretations
- Loading branch information
Showing
3 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// | ||
// Programmer: Craig Stuart Sapp <[email protected]> | ||
// Creation Date: Sat Aug 8 12:24:49 PDT 2015 | ||
// Last Modified: Tue Dec 12 11:01:04 PST 2023 | ||
// Last Modified: Di 19 Dez 2023 10:33:13 CET | ||
// Filename: min/humlib.cpp | ||
// URL: https://github.com/craigsapp/humlib/blob/master/min/humlib.cpp | ||
// Syntax: C++11 | ||
|
@@ -105903,12 +105903,62 @@ void Tool_myank::printStarting(HumdrumFile& infile) { | |
if (!m_hideStarting) { | ||
m_humdrum_text << infile[i] << "\n"; | ||
} else { | ||
if (infile[i].rfind("!!!RDF", 0) == 0) { | ||
if (infile[i].rfind("!!!RDF", 0) == 0 || infile[i].rfind("!!!system-decoration", 0) == 0) { | ||
m_humdrum_text << infile[i] << "\n"; | ||
} | ||
} | ||
} | ||
|
||
// keep *part interpretations | ||
bool hasPart = false; | ||
for (i=exi+1; i<infile.getLineCount(); i++) { | ||
hasPart = false; | ||
for (j=0; j<infile[i].getFieldCount(); j++) { | ||
if (infile.token(i, j)->compare(0, 5, "*part") == 0) { | ||
hasPart = true; | ||
break; | ||
} | ||
} | ||
if (hasPart) { | ||
for (j=0; j<infile[i].getFieldCount(); j++) { | ||
if (infile.token(i, j)->compare(0, 5, "*part") == 0) { | ||
m_humdrum_text << infile.token(i, j); | ||
} else { | ||
m_humdrum_text << "*"; | ||
} | ||
if (j < infile[i].getFieldCount() - 1) { | ||
m_humdrum_text << "\t"; | ||
} | ||
} | ||
m_humdrum_text << "\n"; | ||
} | ||
} | ||
|
||
// keep *staff interpretations | ||
bool hasStaff = false; | ||
for (i=exi+1; i<infile.getLineCount(); i++) { | ||
hasStaff = false; | ||
for (j=0; j<infile[i].getFieldCount(); j++) { | ||
if (infile.token(i, j)->compare(0, 6, "*staff") == 0) { | ||
hasStaff = true; | ||
break; | ||
} | ||
} | ||
if (hasStaff) { | ||
for (j=0; j<infile[i].getFieldCount(); j++) { | ||
if (infile.token(i, j)->compare(0, 6, "*staff") == 0) { | ||
m_humdrum_text << infile.token(i, j); | ||
} else { | ||
m_humdrum_text << "*"; | ||
} | ||
if (j < infile[i].getFieldCount() - 1) { | ||
m_humdrum_text << "\t"; | ||
} | ||
} | ||
m_humdrum_text << "\n"; | ||
} | ||
} | ||
|
||
int hasI = 0; | ||
|
||
if (m_instrumentQ) { | ||
|
@@ -105999,7 +106049,7 @@ void Tool_myank::printEnding(HumdrumFile& infile, int lastline, int adjlin) { | |
if (startline >= 0) { | ||
for (i=startline; i<infile.getLineCount(); i++) { | ||
if (m_hideEnding && (i > ending)) { | ||
if (infile[i].rfind("!!!RDF", 0) == 0) { | ||
if (infile[i].rfind("!!!RDF", 0) == 0 || infile[i].rfind("!!!system-decoration", 0) == 0) { | ||
m_humdrum_text << infile[i] << "\n"; | ||
} | ||
} else { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// | ||
// Programmer: Craig Stuart Sapp <[email protected]> | ||
// Creation Date: Sat Aug 8 12:24:49 PDT 2015 | ||
// Last Modified: Tue Dec 12 11:01:04 PST 2023 | ||
// Last Modified: Di 19 Dez 2023 10:33:13 CET | ||
// Filename: min/humlib.h | ||
// URL: https://github.com/craigsapp/humlib/blob/master/min/humlib.h | ||
// Syntax: C++11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters