From 89145506857a7b1c5a877aa929691d862657599a Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Sat, 17 Jul 2010 16:04:57 +0200 Subject: [PATCH] Ties need to add a notation element, too --- pae2xml.pl | 19 +++++++++++++++---- sample_files/Ties.pae | 7 +++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 sample_files/Ties.pae diff --git a/pae2xml.pl b/pae2xml.pl index 83818e8..6345108 100755 --- a/pae2xml.pl +++ b/pae2xml.pl @@ -494,7 +494,12 @@ sub parse_note { '; } + $tienotation = ""; if ($tie eq "+") { + if ($TIE) { + $tienotation = " <tied type=\"stop\"/>\n"; + } + $tienotation .= " <tied type=\"start\"/>\n"; if (!$TIE) { $TIE = 1; print OUT ' <tie type="start"/> @@ -504,23 +509,29 @@ sub parse_note { if ($TIE) { print OUT ' <tie type="stop"/> '; + $tienotation = " <tied type=\"stop\"/>\n"; $TIE = 0; } } print OUT $addition; - my $notationbracket = $fermata || ($trill eq "t") || ($notation ne ""); + my $notationbracket = $fermata || $tienotation || ($trill eq "t") || ($notation ne ""); if ($notationbracket) { print OUT " <notations>\n"; } - if ($fermata) { print OUT ' + if ($tienotation) { + print OUT $tienotation; + } + if ($fermata) { + print OUT ' <fermata type="upright"/>'."\n"; } - if ($trill eq "t") { print OUT ' <ornaments> + if ($trill eq "t") { + print OUT ' <ornaments> <trill-mark/> </ornaments> '; - } + } if ($notation ne "") { print OUT " $notation\n"; } diff --git a/sample_files/Ties.pae b/sample_files/Ties.pae new file mode 100644 index 0000000..a0ce0b8 --- /dev/null +++ b/sample_files/Ties.pae @@ -0,0 +1,7 @@ +Test Composer +Test case for Ties +1.1.1: S Ties +plain&easy: %G-2@c$bB� '4C+C+CD/8DD+DC2A/ + +Test Library +00000000 \ No newline at end of file -- GitLab