Skip to content
Snippets Groups Projects
Commit 84db28be authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Handle all five types of barlines (and repeat barlines)

parent 06f184c1
Branches
No related tags found
No related merge requests found
...@@ -288,20 +288,45 @@ sub parse_notes { ...@@ -288,20 +288,45 @@ sub parse_notes {
$timesig = timesignature($timesig); $timesig = timesignature($timesig);
print OUT " <attributes>\n$timesig print OUT " <attributes>\n$timesig
</attributes>\n"; </attributes>\n";
} elsif ($notes =~ /^\/(.*)$/) { } elsif ($notes =~ /^(:?\/+:?)(.*)$/) {
$notes = $1; $barline = $1;
if ($notes =~ /^\/(.*)$/) { $notes = $2;
$notes = $1; if ($barline =~ /^:\/\/:/) {
print OUT ' <barline location="right"> print OUT ' <barline location="right">
<bar-style>light-light</bar-style> <bar-style>light-light</bar-style>
<repeat direction="backward"/>
</barline>
';
} elsif ($barline =~ /^:\/\/$/ ) {
print OUT ' <barline location="right">
<bar-style>light-heavy</bar-style>
<repeat direction="backward"/>
</barline>
';
} elsif ($barline =~ /^\/\/$/) {
print OUT ' <barline location="right">
<bar-style>light-light</bar-style>
<repeat direction="backward"/>
</barline> </barline>
'; ';
} }
print OUT " </measure>\n"; print OUT " </measure>\n";
if ($notes ne "") { if ($notes ne "") {
print OUT ' <measure number="'.$meas.'"> print OUT ' <measure number="'.$meas.'">
'.$clefattr; ';
if ($barline =~ /^\/\/:$/) {
print OUT ' <barline location="left">
<bar-style>heavy-light</bar-style>
<repeat direction="forward"/>
</barline>
';
} elsif ($barline =~ /^:\/\/:$/) {
print OUT ' <barline location="left">
<repeat direction="forward"/>
</barline>
';
}
print OUT $clefattr;
$meas++; $meas++;
} else { } else {
$mopen = 0; $mopen = 0;
......
Test Composer
Test case for barline types
1.1.1: S One repeat
plain&easy: %C-1@c$bB '4CDE/GABG://CDEF//:GABD//FGAB://:AGFC://
Test Library
00000000
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment