mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Draw ending bar line before coda
This commit is contained in:
parent
2ebcea7fd0
commit
b05cb55542
|
@ -82,14 +82,19 @@ void VLLilypondWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas
|
||||||
int times;
|
int times;
|
||||||
size_t volta;
|
size_t volta;
|
||||||
bool repeat;
|
bool repeat;
|
||||||
|
bool hasBarLine = false;
|
||||||
|
|
||||||
if (meas.fBreak == VLMeasure::kNewPage)
|
if (meas.fBreak == VLMeasure::kNewPage) {
|
||||||
fAccum += fIndent+"\\pageBreak\n";
|
fAccum += fIndent+"\\pageBreak\n";
|
||||||
else if (meas.fBreak == VLMeasure::kNewSystem)
|
hasBarLine = true;
|
||||||
|
} else if (meas.fBreak == VLMeasure::kNewSystem) {
|
||||||
fAccum += fIndent+"\\break\n";
|
fAccum += fIndent+"\\break\n";
|
||||||
|
hasBarLine = true;
|
||||||
|
}
|
||||||
if (fSong->DoesEndRepeat(m)) {
|
if (fSong->DoesEndRepeat(m)) {
|
||||||
fAccum += "}\n";
|
fAccum += "}\n";
|
||||||
fIndent = "";
|
fIndent = "";
|
||||||
|
hasBarLine = true;
|
||||||
}
|
}
|
||||||
if (fSong->DoesBeginEnding(m, &repeat, &volta)) {
|
if (fSong->DoesBeginEnding(m, &repeat, &volta)) {
|
||||||
fAccum += fSeenEnding ? "}{\n" : "} \\alternative {{\n";
|
fAccum += fSeenEnding ? "}{\n" : "} \\alternative {{\n";
|
||||||
|
@ -105,7 +110,8 @@ void VLLilypondWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas
|
||||||
fAccum += "\")" + std::string(repeat ? "" : " end-repeat") + ")\n";
|
fAccum += "\")" + std::string(repeat ? "" : " end-repeat") + ")\n";
|
||||||
fSeenEnding |= volta;
|
fSeenEnding |= volta;
|
||||||
++fNumEndings;
|
++fNumEndings;
|
||||||
} else if (fSong->DoesEndEnding(m)) {
|
hasBarLine = true;
|
||||||
|
} else if (fSong->DoesEndEnding(m, &hasBarLine)) {
|
||||||
fAccum += "}}\n";
|
fAccum += "}}\n";
|
||||||
fIndent = "";
|
fIndent = "";
|
||||||
}
|
}
|
||||||
|
@ -116,11 +122,15 @@ void VLLilypondWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas
|
||||||
fIndent = " ";
|
fIndent = " ";
|
||||||
fSeenEnding = 0;
|
fSeenEnding = 0;
|
||||||
fNumEndings = 0;
|
fNumEndings = 0;
|
||||||
|
hasBarLine = true;
|
||||||
}
|
}
|
||||||
fAccum += fIndent;
|
fAccum += fIndent;
|
||||||
if (fSong->fCoda == m)
|
if (fSong->fCoda == m) {
|
||||||
|
if (!hasBarLine)
|
||||||
|
fAccum += "\\bar \"|.\" ";
|
||||||
fAccum += "\\break \\mark \\markup { \\musicglyph #\"scripts.coda\" }\n"
|
fAccum += "\\break \\mark \\markup { \\musicglyph #\"scripts.coda\" }\n"
|
||||||
+ fIndent;
|
+ fIndent;
|
||||||
|
}
|
||||||
fMelody += fAccum;
|
fMelody += fAccum;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user