From b1949804c13949496616be52cf99d03c070f8b71 Mon Sep 17 00:00:00 2001
From: Reinhold Kainhofer <reinhold@kainhofer.com>
Date: Thu, 15 Jul 2010 18:30:36 +0200
Subject: [PATCH] Handle i notation (whole measure repeated)

---
 pae2xml.pl                                |  1 +
 sample_files/Shortcuts-measure-repeat.pae | 11 +++++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 sample_files/Shortcuts-measure-repeat.pae

diff --git a/pae2xml.pl b/pae2xml.pl
index e67b4ed..7b54996 100755
--- a/pae2xml.pl
+++ b/pae2xml.pl
@@ -168,6 +168,7 @@ sub parse_notes {
 
   $notes =~ s/!([^!]*)!/$1$1/gs;  # write out repetitions
   $notes =~ s/\{([^\}]*)\}/$1/gs; # ignore beamings
+  while ( $notes =~ s/(:?\/+:?|^)([^\/:]*)(:?\/+:?)i(:?\/+:?)/$1$2$3$2$4/gs) {}; # replace whole-measure repeats (i notation)
 
   $notes =~ s/(\d+)\(([^;]+\))/\($1$2/gs;       # pull note lengths into fermatas or triplets
   $notes =~ s/(xx|x|bb|b|n)\(/\($1/gs;       # pull accidentals into tuplets or fermatas:
diff --git a/sample_files/Shortcuts-measure-repeat.pae b/sample_files/Shortcuts-measure-repeat.pae
new file mode 100644
index 0000000..92e9842
--- /dev/null
+++ b/sample_files/Shortcuts-measure-repeat.pae
@@ -0,0 +1,11 @@
+Test Composer
+Test case for measure repeats
+1.1.1: S One repeat
+plain&easy: %C-1@c$bB� '4A4.B8AGE/i/FD8.C'6B4xA/
+1.1.2: S Double repeat
+plain&easy: %C-1@c$bB� '4A4.B8AGE/i/i/FD8.C'6B4xA/
+1.1.3: S Barlines
+plain&easy: %C-1@c$bB� '4A4.B8AGE://:i/:i:/FD8.C'6B4xA/
+
+Test Library
+00000000
\ No newline at end of file
-- 
GitLab