Skip to content

Commit

Permalink
Fixed: Repeats were sometimes missing
Browse files Browse the repository at this point in the history
If a measure recorded two special barlines, only one was ever considered. This commit adds the ability to track more than one barline.
  • Loading branch information
ahankinson committed Jul 19, 2016
1 parent ff34e50 commit 0fa1fdf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/ExportGenerators.mss
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,19 @@ function GenerateMeasure (num) {

if (specialbarlines.PropertyExists(num))
{
bline = specialbarlines[num];
// an array of bar lines for this measure
blines = specialbarlines[num];

if (bline = 'rptstart')
for each bline in blines
{
libmei.AddAttribute(m, 'left', bline);
}
else
{
libmei.AddAttribute(m, 'right', bline);
if (bline = 'rptstart')
{
libmei.AddAttribute(m, 'left', bline);
}
else
{
libmei.AddAttribute(m, 'right', bline);
}
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/ExportProcessors.mss
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,12 @@ function ProcessSystemStaff (score) {
case ('SpecialBarline')
{
spclbarlines = Self._property:SpecialBarlines;
spclbarlines[bar.BarNumber] = ConvertBarline(bobj.BarlineInternalType);
if (spclbarlines.PropertyExists(bar.BarNumber) = False)
{
spclbarlines[bar.BarNumber] = CreateSparseArray();
}

spclbarlines[bar.BarNumber].Push(ConvertBarline(bobj.BarlineInternalType));
}
case ('SystemTextItem')
{
Expand Down

0 comments on commit 0fa1fdf

Please sign in to comment.