]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/convert-mudela.py
release: 1.3.39
[lilypond.git] / scripts / convert-mudela.py
index 7328a1b9b713023ab315b6da9e11e0c84271502b..8c2e6891ace698c7dae28d268385119b8db55c47 100644 (file)
@@ -281,7 +281,7 @@ if 1:
        def conv(str):
                str =  re.sub ('SkipBars','skipBars', str)
                str =  re.sub ('fontsize','fontSize', str)
-               str =  re.sub ('midi_instrument','midiInstrument', x)                   
+               str =  re.sub ('midi_instrument','midiInstrument', str)                 
                        
                return str
 
@@ -293,7 +293,7 @@ if 1:
        def conv(str):
                str =  re.sub ('tieydirection','tieVerticalDirection', str)
                str =  re.sub ('slurydirection','slurVerticalDirection', str)
-               str =  re.sub ('ydirection','verticalDirection', x)                     
+               str =  re.sub ('ydirection','verticalDirection', str)                   
                        
                return str
 
@@ -405,6 +405,40 @@ if 1:
 
        conversions.append ((1,3,17), conv, 'stemStyle -> flagStyle')
 
+if 1:
+       def conv (str):
+               str = re.sub ('staffLineLeading',
+                             'staffSpace',
+                             str)
+               return str
+
+       conversions.append ((1,3,18), conv, 'staffLineLeading -> staffSpace')
+
+if 1:
+       def conv (str):
+               str = re.sub ('textEmptyDimension *= *##t',
+                             'textNonEmpty = ##f',
+                             str)
+               str = re.sub ('textEmptyDimension *= *##f',
+                             'textNonEmpty = ##t',
+                             str)
+               return str
+
+       conversions.append ((1,3,35), conv, 'textEmptyDimension -> textNonEmpty')
+
+if 1:
+       def conv (str):
+               str = re.sub ("([a-z]+)[ \t]*=[ \t]*\\\\musicalpitch *{([- 0-9]+)} *\n",
+                             "(\\1 . (\\2))\n", str)
+               str = re.sub ("\\\\musicalpitch *{([0-9 -]+)}",
+                             "\\\\musicalpitch #'(\\1)", str)
+               if re.search ('\\\\notenames',str):
+                       sys.stderr.write ('\nNot smart enough to convert to new \\notenames format')
+               return str
+
+       conversions.append ((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)')
+
+
 ############################