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

Add comments about the cases in the if clause

parent b1949804
No related branches found
No related tags found
No related merge requests found
...@@ -186,16 +186,16 @@ sub parse_notes { ...@@ -186,16 +186,16 @@ sub parse_notes {
$notes =~ s/\=(\d)/$1/gs; # replace multibar rests #n with just n $notes =~ s/\=(\d)/$1/gs; # replace multibar rests #n with just n
while ($notes ne "") { while ($notes ne "") {
if ($notes =~ /^(\'+|\,+)(.*)$/) { if ($notes =~ /^(\'+|\,+)(.*)$/) { # Octave marks
($oct, $notes) = ($1, $2); ($oct, $notes) = ($1, $2);
octave($oct); octave($oct);
} elsif ($notes =~ /^qq(.*)$/) { } elsif ($notes =~ /^qq(.*)$/) { # Begin grace
$notes = $1; $notes = $1;
$qq = 1; $qq = 1;
} elsif ($notes =~ /^r(.*)$/) { } elsif ($notes =~ /^r(.*)$/) { # End grace
$notes = $1; $notes = $1;
$qq = 0; $qq = 0;
} elsif ($notes =~ /^(\d+|\=)(\/.*)$/) { } elsif ($notes =~ /^(\d+|\=)(\/.*)$/) { # normal and multi-measure rests
$measrest = $1; $measrest = $1;
$notes = $2; $notes = $2;
if ($measrest eq '=') { if ($measrest eq '=') {
...@@ -271,7 +271,7 @@ sub parse_notes { ...@@ -271,7 +271,7 @@ sub parse_notes {
<actual-notes>'.$act_notes.'</actual-notes> <actual-notes>'.$act_notes.'</actual-notes>
<normal-notes>1</normal-notes> <normal-notes>1</normal-notes>
</time-modification>', $qq); </time-modification>', $qq);
} elsif ($notes =~ /^(%\w-\d)(.*)$/) { } elsif ($notes =~ /^(%\w-\d)(.*)$/) { # Clef change
($clef,$notes) = ($1,$2); ($clef,$notes) = ($1,$2);
$clef =~ /^%(\w)\-(\d)$/; $clef =~ /^%(\w)\-(\d)$/;
($clefsign, $clefline) = ($1, $2); ($clefsign, $clefline) = ($1, $2);
...@@ -282,14 +282,14 @@ sub parse_notes { ...@@ -282,14 +282,14 @@ sub parse_notes {
</clef> </clef>
</attributes> </attributes>
'; ';
} elsif ($notes =~ /^@(\d\/\d|c\/?)\s*(.*)$/) { } elsif ($notes =~ /^@(\d\/\d|c\/?)\s*(.*)$/) { # time signatue change
# print "$notes\n"; # print "$notes\n";
($timesig,$notes) = ($1,$2); ($timesig,$notes) = ($1,$2);
#print "-> $timesig / $notes\n"; exit; #print "-> $timesig / $notes\n"; exit;
$timesig = timesignature($timesig); $timesig = timesignature($timesig);
print OUT " <attributes>\n$timesig print OUT " <attributes>\n$timesig
</attributes>\n"; </attributes>\n";
} elsif ($notes =~ /^(:?\/+:?)(.*)$/) { } elsif ($notes =~ /^(:?\/+:?)(.*)$/) { # Barline (and repeats)
$barline = $1; $barline = $1;
$notes = $2; $notes = $2;
if ($barline =~ /^:\/\/:/) { if ($barline =~ /^:\/\/:/) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment