]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/convert-ly.py
* input/test/ambitus-mixed.ly (texidoc): new file.
[lilypond.git] / scripts / convert-ly.py
index 53dda4c13b755f8a969b3fdd0dcbbc24449928e1..d33e935d2b528083a13ec1c7236bd42c7cca1ade 100644 (file)
@@ -1285,6 +1285,14 @@ if 1:
                last_str = ''
                while last_str <> str:
                  last_str = str
+                 def sub_tremolos (m):
+                         tr = m.group (2)
+                         if tr not in slur_strs:
+                                 slur_strs.append (tr)
+                         return  m.group (1)
+                 
+                 str = re.sub (r"([a-z]+[',!? ]*)(:[0-9]+)", sub_tremolos, str)
+
                  def sub_dyn_end (m):
                          dyns.append (' \!')
                          return ' ' + m.group(2)
@@ -1495,6 +1503,51 @@ def conv (str):
 conversions.append (((1,9,4), conv, 'Swap < > and << >>'))
 
 
+def conv (str):
+       str = re.sub ('HaraKiriVerticalGroup', 'RemoveEmptyVerticalGroup', str)
+
+       return str
+
+conversions.append (((1,9,5), conv, 'HaraKiriVerticalGroup -> RemoveEmptyVerticalGroup'))
+
+def conv (str):
+       if re.search ("ly:get-font", str) :
+               sys.stderr.write (r"(ly:get-font foo ..)  has been replaced by" + \
+                                 " (ly:paper-get-font (ly:grob-get-paper foo) .. ).\n" +\
+                                 "please update manually.")
+               
+               raise FatalConversionError()
+       
+       if re.search ("\\pitch *#", str) :
+               sys.stderr.write (r"\\pitch has been deprecated. " +\
+                                 " Use Scheme code to construct arbitrary note events.")
+               
+               raise FatalConversionError()
+       
+       return str
+               
+
+conversions.append (((1,9,6), conv, 'ly:get-font deprecated.'))
+
+def conv (str):
+       def sub_alteration (m):
+               alt = m.group (3)
+               alt = {
+                       '-1': 'FLAT',
+                       '-2': 'DOUBLE-FLAT',
+                       '0': 'NATURAL',
+                       '1': 'SHARP',
+                       '2': 'DOUBLE-SHARP',
+                       }[alt]
+               
+               return '(ly:make-pitch %s %s %s)' % (m.group(1), m.group (2), alt)
+       
+       str =re.sub ("\\(ly:make-pitch *([0-9-]+) *([0-9-]+) *([0-9-]+) *\\)", sub_alteration, str) 
+       return str
+conversions.append (((1,9,7), conv, 'use symbolic constants for alterations.'))
+
+
+
 ################################
 #      END OF CONVERSIONS      
 ################################