Commit 84db28be authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Handle all five types of barlines (and repeat barlines)

parent 06f184c1
......@@ -288,20 +288,45 @@ sub parse_notes {
$timesig = timesignature($timesig);
print OUT " <attributes>\n$timesig
</attributes>\n";
} elsif ($notes =~ /^\/(.*)$/) {
$notes = $1;
if ($notes =~ /^\/(.*)$/) {
$notes = $1;
print OUT ' <barline location="right">
} elsif ($notes =~ /^(:?\/+:?)(.*)$/) {
$barline = $1;
$notes = $2;
if ($barline =~ /^:\/\/:/) {
print OUT ' <barline location="right">
<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>
';
}
print OUT " </measure>\n";
if ($notes ne "") {
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++;
} else {
$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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment