]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/convertrules.py
Merge branch 'master' into lilypond/translation
[lilypond.git] / python / convertrules.py
index ad2c0cdd96500bb361b89f155717df6b8d8c468f..9aac7314d94959844bc4fe4f178f68f41f931388 100644 (file)
@@ -1821,7 +1821,6 @@ def conv (str):
        a = g - lower_pitches [-1]
 
 
-       print s , lower_pitches, g, a, s
        str = 'cdefgab' [s]
        str += ['eses', 'es', '', 'is', 'isis'][a + 2]
        if o < 0:
@@ -2219,7 +2218,7 @@ def conv (str):
        stderr_write ('\n')
        stderr_write (_ ('''
 Auto beam settings must now specify each interesting moment in a measure
-explicitely; 1/4 is no longer multiplied to cover moments 1/2 and 3/4 too.
+explicitly; 1/4 is no longer multiplied to cover moments 1/2 and 3/4 too.
 '''))
        stderr_write (UPDATE_MANUALLY)
        stderr_write ('\n')
@@ -2574,6 +2573,12 @@ def conv (str):
     return re.sub ('ly:clone-parser',
                    'ly:parser-clone', str)
 
+@rule ((2, 11, 3), "no-spacing-rods -> extra-spacing-width")
+def conv (str):
+    str = re.sub (r"no-spacing-rods\s+=\s+##t", r"extra-spacing-width = #'(+inf.0 . -inf.0)", str)
+    str = re.sub (r"no-spacing-rods\s+=\s+##f", r"extra-spacing-width = #'(0 . 0)", str)
+    return str
+
 
 @rule ((2, 11, 5), _ ("deprecate cautionary-style. Use AccidentalCautionary properties"))
 def conv (str):
@@ -2766,7 +2771,7 @@ def conv (str):
 \\sustainUp -> \\sustainOff, \\sustainDown -> \\sustainOn\n\
 \\sostenutoDown -> \\sostenutoOn, \\sostenutoUp -> \\sostenutoOff")
 def conv (str):
-    str = re.sub (r"\\octave", r"\\octaveCheck", str)
+    str = re.sub (r"\\octave(?![a-zA-Z])", r"\\octaveCheck", str)
     str = re.sub (r"arpeggioUp", r"arpeggioArrowUp", str)
     str = re.sub (r"arpeggioDown", r"arpeggioArrowDown", str)
     str = re.sub (r"arpeggioNeutral", r"arpeggioNormal", str)
@@ -2864,6 +2869,44 @@ chord-shape call.\n"))
         raise FatalConversionError ()
     return str
 
+@rule ((2,12,3),
+    _ ("Remove oldaddlyrics"))
+def conv(str):
+    if re.search(r'\\oldaddlyrics', str):
+        stderr_write ("\n")
+        stderr_write (NOT_SMART % _("oldaddlyrics is no longer supported. \n \
+        Use addlyrics or lyrsicsto instead.\n"))
+        stderr_write (UPDATE_MANUALLY)
+        raise FatalConversionError ()
+    return str
+
+@rule ((2, 13, 0), _ ("keySignature property not reversed any more\n\
+MIDI 47: orchestral strings -> orchestral harp"))
+def conv(str):
+    if re.search(r'\set Staff.keySignature', str):
+        stderr_write ("\n")
+        stderr_write (NOT_SMART % _("The alist for Staff.keySignature is no \
+longer in reversed order.\n"))
+    str = str.replace('"orchestral strings"', '"orchestral harp"')
+    return str
+
+@rule ((2, 13, 1),
+       _ ("\\bar \".\" now produces a thick barline\n\
+ly:hairpin::after-line-breaking -> ly:spanner::kill-zero-spanned-time\n\
+Dash parameters for slurs and ties are now in dash-definition"))
+def conv(str):
+    if re.search(r'\\bar\s*"."', str):
+        stderr_write ("\n")
+        stderr_write (NOT_SMART % _("\\bar \".\" now produces a thick barline.\n"))
+        stderr_write (UPDATE_MANUALLY)
+    str = re.sub (r'ly:hairpin::after-line-breaking', r'ly:spanner::kill-zero-spanned-time', str)
+    if re.search("(Slur|Tie)\w+#\'dash-fraction", str) \
+        or re.search("(Slur|Tie)\w+#\'dash-period", str):
+        stderr_write ("\n")
+        stderr_write (NOT_SMART % _("Dash parameters for slurs and ties are now in \'dash-details.\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,