diff --git a/pae2xml.pl b/pae2xml.pl index 6345108bb164dd58f12867d9341d501f756dcadf..0e8de94d06846c3e8098b9976c70b2aaf8d94495 100755 --- a/pae2xml.pl +++ b/pae2xml.pl @@ -60,6 +60,7 @@ handle_options (); $divisions = 960; $old_duration = $divisions; +$old_type = ""; $old_octave = 4; ($mday, $mon, $year) = (localtime()) [3..5]; @@ -514,6 +515,9 @@ sub parse_note { } } + # Determine graphic notehead: + print OUT notehead ($dur, $dot); + print OUT $addition; my $notationbracket = $fermata || $tienotation || ($trill eq "t") || ($notation ne ""); @@ -568,6 +572,20 @@ sub alter { return ""; } +sub notehead { + my ($duration, $dots) = @_; + if ($duration.$dots ne "") { + my %du=("0", "long", "9", "breve", "1", "whole", "2", "half", "4", "quarter", + "8", "eighth", "6", "16th", "3", "32nd", "5", "64th", "7", "128th"); + my $res = " <type>$du{$duration}</type>\n"; + $res .= repeat (" <dot/>\n", length ($dots)); + $old_type = $res; + } + return $old_type; +} + + + sub duration { my ($duration, $dots) = @_; diff --git a/sample_files/Durations-dotted.pae b/sample_files/Durations-dotted.pae new file mode 100644 index 0000000000000000000000000000000000000000..c2ddfbc5b17a74c52d6c4772ea1323c3e0797ab1 --- /dev/null +++ b/sample_files/Durations-dotted.pae @@ -0,0 +1,7 @@ +Test Composer +Test case for dotted durations +1.1.1: S dotted durations +plain&easy: %G-2@8/2$� '1.CD1-/1..CD2-/2.EF2..EF4-2-/4.GA4..GA4...GA6-4.-1-/8.BA8..BA6.DE6..DE3.FG3..FG3.-6.-8.-2.-1.-/1C + +Test Library +00000000 \ No newline at end of file diff --git a/sample_files/Durations.pae b/sample_files/Durations.pae new file mode 100644 index 0000000000000000000000000000000000000000..2dcf303b6e9a2b95780aa784f20626f47aacd5f5 --- /dev/null +++ b/sample_files/Durations.pae @@ -0,0 +1,7 @@ +Test Composer +Test case for durations +1.1.1: S durations +plain&easy: %G-2@8/2$� '1CD2EF4GA8BC6DE3FG5AB7CD5-/1-2-4-8-6-3-5-7--1--/0C/0-/9D-/ + +Test Library +00000000 \ No newline at end of file