Commit bd658412 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Support for real multi-measure rests (with correct length explicitly specified in XML)

parent 247fe6f1
......@@ -193,8 +193,6 @@ sub parse_notes {
$notes =~ s/(\.|\d|\,|\')qq/qq$1/gs; # pull beginning mark of group of grace notes in front of corresponding notes
$notes =~ s/(xx|x|bb|b|n)qq/qq$1/gs; # qq first, then parts of notes
$notes =~ s/\=(\d)/$1/gs; # replace multibar rests #n with just n
while ($notes ne "") {
if ($notes =~ /^(\'+|\,+)(.*)$/) { # Octave marks
($oct, $notes) = ($1, $2);
......@@ -205,13 +203,23 @@ sub parse_notes {
} elsif ($notes =~ /^r(.*)$/) { # End grace
$notes = $1;
$qq = 0;
} elsif ($notes =~ /^(\d+|\=)(\/.*)$/) { # normal and multi-measure rests
} elsif ($notes =~ /^\=(\d*)(\/.*)$/) { # multi-measure rests
$measrest = $1;
$notes = $2;
if ($measrest eq '=') {
if ($measrest eq '') {
$measrest = 1;
}
$toprint .= "$measrest measures of rest.\n";
if ($measrest > 0) {
# Create a real multi-bar rest
print OUT ' <attributes>
<measure-style>
<multiple-rest>'.$measrest.'</multiple-rest>
</measure-style>
</attributes>
';
}
# Now create the measures
for $n (1..$measrest) {
print OUT ' <note>
<rest />
......
Test Composer
Test case for multi-measure rests
1.1.1: S Multi-measure rests
plain&easy: %C-1@c$bB '=/2AB/=3/=/2AB/=15/2AB/
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