]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/convertrules.py
Fix 1442.
[lilypond.git] / python / convertrules.py
index c3cbc2133809dcb2b10d658f2461a1bdcda28208..bbfe73a9a0c77600c4dda0fb91e4f817a93b3c46 100644 (file)
@@ -3181,6 +3181,27 @@ def conv(str):
 
     return str
 
+@rule ((2, 13, 48),
+       _ ("Replace bar-size with bar-extent."))
+
+def conv(str):
+    def size_as_extent (matchobj):
+        half = "%g" % (float (matchobj.group (1)) / 2)
+        return "bar-extent = #'(-" + half + " . " + half + ")"
+
+    str = re.sub (r"bar-size\s*=\s*#([0-9\.]+)", size_as_extent, str)
+
+    return str
+
+@rule ((2, 13, 51),
+    _ ("Woodwind diagrams: Changes to the clarinet diagram."))
+def conv(str):
+    if re.search(r'\\woodwind-diagram\s*#[^#]*clarinet\s', str):
+        stderr_write("\n")
+        stderr_write(NOT_SMART % _("woodwind-diagrams.  Clarinet fingering changed to reflect actual anatomy of instrument.\n"))
+        stderr_write(UPDATE_MANUALLY)
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,