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

Fix rhythmic model enclosed by beaming (pull beaming after the rhythmic model)

parent daef3e6a
No related branches found
No related tags found
No related merge requests found
...@@ -256,6 +256,7 @@ sub parse_notes { ...@@ -256,6 +256,7 @@ 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/(\.|\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/(xx|x|bb|b|n)qq/qq$1/gs; # qq first, then parts of notes
$notes =~ s/([\.\d,'xbn])+(q|g)/$2$1/gs; # q and g first, then parts of notes $notes =~ s/([\.\d,'xbn])+(q|g)/$2$1/gs; # q and g first, then parts of notes
$notes =~ s/(\{)(\d\.*(\d\.*)+)/$2$1/gs; # pull beaming inside a rhythmic model
# Beam starts/endings are handled by the first/last note of the beam, since # Beam starts/endings are handled by the first/last note of the beam, since
# we need to know for the first note the <beam>begin</beam> and for the # we need to know for the first note the <beam>begin</beam> and for the
...@@ -424,8 +425,7 @@ sub parse_notes { ...@@ -424,8 +425,7 @@ sub parse_notes {
} }
elsif ($notes =~ s/(\d+\.*)\(({?(g|q)?(\,|\')*(x|xx|b|bb|n)?\d*\.*(\-|A|B|C|D|E|F|G)t?\+?}?)\)/\($1$2\)/gs) { # pull duration into fermata parentheses elsif ($notes =~ s/(\d+\.*)\(({?(g|q)?(\,|\')*(x|xx|b|bb|n)?\d*\.*(\-|A|B|C|D|E|F|G)t?\+?}?)\)/\($1$2\)/gs) { # pull duration into fermata parentheses
# print "after replacement: $notes\n"; exit; # print "after replacement: $notes\n"; exit;
} } elsif ($notes =~ /^ +(.*)$/) {
elsif ($notes =~ /^ +(.*)$/) {
$notes = $1; $notes = $1;
print("Invalid space encountered in notes before $notes\n"); print("Invalid space encountered in notes before $notes\n");
} }
......
Test Composer
Test case for a rhythmic model with enclosing beaming
1.1.1: S rhythmic model with enclosing beaming
plain&easy: %G-2@c$xFC {8.6''FADD}{DFEG}/{FA}{DD}
pae2xml Test Suite 4-11d-Shortcuts-rhythmic-model-beaming
4-11d-Shortcuts-rhythmic-model-beaming
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment