+conversions.append (((2,1,28), conv,
+ """make-music-by-name -> make-music,
+new syntax for setting \\arpeggioBracket"""))
+
+def conv (str):
+ str = re.sub (r'\\center([^-])', '\\center-align\\1', str)
+ str = re.sub (r'\\translator', '\\context', str)
+ return str
+
+conversions.append (((2,1,29), conv,
+ '\\center -> \\center-align, \\translator -> \\context'))
+
+
+def conv (str):
+ str = re.sub (r'\\threeq(flat|sharp)', r'\\sesqui\1', str)
+ str = re.sub (r'ly:stencil-get-extent',
+ 'ly:stencil-extent', str)
+ str = re.sub (r'ly:translator-find',
+ 'ly:context-find', str)
+ str = re.sub ('ly:unset-context-property','ly:context-unset-property',
+ str)
+
+ str = re.sub (r'ly:get-mutable-properties',
+ 'ly:mutable-music-properties',str)
+ str = re.sub (r'centralCPosition',
+ 'middleCPosition',str)
+ return str
+
+conversions.append (((2,1,30), conv,
+ '''\\threeq{flat,sharp} -> \\sesqui{flat,sharp}
+ly:get-mutable-properties -> ly:mutable-music-properties
+centralCPosition -> middleCPosition
+ly:unset-context-property -> ly:context-unset-property
+ly:translator-find -> ly:context-find
+ly:get-stencil-extent -> ly:stencil-extent
+'''))
+
+
+def conv (str):
+ str = re.sub (r'\\alias\s*"?Timing"?', '', str)
+ return str
+
+conversions.append (((2,1,31), conv,
+ '''remove \\alias Timing'''))
+
+def conv (str):
+ str = re.sub (r"(\\set\s+)?(?P<context>(Score\.)?)breakAlignOrder\s*=\s*#'(?P<list>[^\)]+)",
+ r"\n\\override \g<context>BreakAlignment #'break-align-orders = "
+ + "#(make-vector 3 '\g<list>)", str)
+
+ return str
+
+conversions.append (((2,1,33), conv,
+ '''breakAlignOrder -> break-align-orders.'''))
+
+def conv (str):
+ str = re.sub (r"\(set-paper-size",
+ "(set-default-paper-size",str)
+ return str
+
+conversions.append (((2,1,34), conv,
+ '''set-paper-size -> set-default-paper-size.'''))
+
+def conv (str):
+ str = re.sub (r"ly:mutable-music-properties",
+ "ly:music-mutable-properties", str)
+ return str
+
+conversions.append (((2,1, 36), conv,
+ '''ly:mutable-music-properties -> ly:music-mutable-properties'''))
+
+
+
+def conv (str):
+ return str
+
+conversions.append (((2, 2, 0), conv,
+ '''clean up version. '''))
+
+def conv (str):
+ return re.sub (r'\\apply\b', r'\\applymusic', str)
+
+conversions.append (((2, 3, 1), conv,
+ '''\\apply -> \\applymusic'''))
+
+def conv (str):
+ if re.search ('textheight', str):
+ sys.stderr.write("\nWarning: tuning of page layout has changed. See reference manual.\n")
+
+ str = re.sub (r'\\OrchestralScoreContext', '\\Score', str)
+ def func(m):
+ if m.group(1) not in ['RemoveEmptyStaff',
+ 'AncientRemoveEmptyStaffContext',
+ 'EasyNotation']:
+ return '\\' + m.group (1)
+ else:
+ return m.group (0)
+
+
+ str = re.sub (r'\\([a-zA-Z]+)Context\b', func, str)
+
+ str = re.sub ('ly:paper-lookup', 'ly:output-def-lookup', str)
+ return str
+
+conversions.append (((2, 3, 2), conv,
+ '''\\FooContext -> \\Foo'''))
+
+def conv (str):
+ str = re.sub (r'\\notes\b', '', str)
+
+ return str
+
+conversions.append (((2, 3, 4), conv,
+ '''remove \\notes'''))
+
+
+
+def conv (str):
+ str = re.sub (r'lastpagefill\s*=\s*"?1"', 'raggedlastbottom = ##t', str)
+ return str
+
+conversions.append (((2, 3, 6), conv,
+ '''lastpagefill -> raggedlastbottom'''))
+
+
+
+def conv (str):
+ str = re.sub (r'\\consistsend', '\\consists', str)
+ str = re.sub (r'\\lyricsto\s+("?[a-zA-Z]+"?)(\s*\\new Lyrics\s*)?\\lyrics',
+ r'\\lyricsto \1 \2', str)
+ return str
+
+conversions.append (((2, 3, 8), conv,
+ '''remove \\consistsend, strip \\lyrics from \\lyricsto.'''))
+
+def conv (str):
+ str = re.sub (r'neo_mensural', 'neomensural', str)
+ str = re.sub (r'if-text-padding', 'bound-padding', str)
+ return str
+
+conversions.append (((2, 3, 9), conv,
+ '''neo_mensural -> neomensural, if-text-padding -> bound-padding'''))
+
+
+
+def conv (str):
+ str = re.sub (r'\\addlyrics', r'\\oldaddlyrics', str)
+ str = re.sub (r'\\newlyrics', r'\\addlyrics', str)
+ if re.search (r"\\override\s*TextSpanner", str):
+ sys.stderr.write ("\nWarning: TextSpanner has been split into DynamicTextSpanner and TextSpanner\n")
+ return str
+
+conversions.append (((2, 3, 10), conv,
+ '''\\addlyrics -> \\oldaddlyrics, \\newlyrics -> \\addlyrics'''))
+
+def conv (str):
+ str = re.sub (r'\\setMmRestFermata\s+(R[0-9.*/]*)',
+ r'\1^\\fermataMarkup', str)
+ return str
+
+conversions.append (((2, 3, 11), conv,
+ '''\\setMmRestFermata -> ^\\fermataMarkup'''))
+
+def conv (str):
+ str = re.sub (r'\\newpage', r'\\pageBreak', str)
+ str = re.sub (r'\\scriptUp', r"""{
+ \\override TextScript #'direction = #1
+ \\override Script #'direction = #1
+}""", str)
+ str = re.sub (r'\\scriptDown', r"""{
+ \\override TextScript #'direction = #-1
+ \\override Script #'direction = #-1
+}""", str)
+ str = re.sub (r'\\scriptBoth', r"""{
+ \\revert TextScript #'direction
+ \\revert Script #'direction
+}""", str)
+ str = re.sub ('soloADue', 'printPartCombineTexts', str)
+ str = re.sub (r'\\applymusic\s*#notes-to-clusters',
+ '\\makeClusters', str)
+
+ str = re.sub (r'pagenumber\s*=', 'firstpagenumber', str)
+ return str
+
+conversions.append (((2, 3, 12), conv,
+ '''\\newpage -> \\pageBreak, junk \\script{up,down,both},
+soloADue -> printPartCombineTexts, #notes-to-clusters -> \\makeClusters
+'''))
+
+
+def conv (str):
+ str = re.sub (r'\\chords\b', r'\\chordmode', str)
+ str = re.sub (r'\\lyrics\b', r'\\lyricmode', str)
+ str = re.sub (r'\\figures\b', r'\\figuremode', str)
+ str = re.sub (r'\\notes\b', r'\\notemode', str)
+ str = re.sub (r'\\drums\b', r'\\drummode', str)
+ str = re.sub (r'\\chordmode\s*\\new ChordNames', r'\\chords', str)
+ str = re.sub (r'\\new ChordNames\s*\\chordmode', r'\\chords', str)
+ str = re.sub (r'\\new FiguredBass\s*\\figuremode', r'\\figures', str)
+ str = re.sub (r'\\figuremode\s*\new FiguredBass', r'\\figures', str)
+ str = re.sub (r'\\new DrumStaff\s*\\drummode', r'\\drums', str)
+ str = re.sub (r'\\drummode\s*\\new DrumStaff', r'\\drums', str)
+
+ return str
+
+conversions.append (((2, 3, 16), conv,
+ '''\foo -> \foomode (for chords, notes, etc.)
+fold \new FooContext \foomode into \foo.'''))
+
+def conv (str):
+ str = re.sub (r'(slur|stem|phrasingSlur|tie|dynamic|dots|tuplet|arpeggio|)Both', r'\1Neutral', str)
+ str = re.sub (r"\\applymusic\s*#\(remove-tag\s*'([a-z-0-9]+)\)",
+ r"\\removeWithTag #'\1", str)
+ return str
+
+conversions.append (((2, 3, 17), conv,
+ '''\foo -> \foomode (for chords, notes, etc.)
+fold \new FooContext \foomode into \foo.'''))
+
+
+def conv (str):
+ str = re.sub (r'Text_item', 'Text_interface', str)
+ return str
+
+conversions.append (((2, 3, 18),
+ conv,
+ '''Text_item -> Text_interface''' ))
+
+def conv (str):
+ str = re.sub (r'\\paper', r'\\layout', str)
+ str = re.sub (r'\\bookpaper', r'\\paper', str)
+ if re.search ('paper-set-staff-size', str):
+ sys.stderr.write ('''\nWarning: staff size should be changed at top-level
+with
+
+ #(set-global-staff-size <STAFF-HEIGHT-IN-POINT>)
+
+''')
+
+
+ str = re.sub (r'#\(paper-set-staff-size', '%Use set-global-staff-size at toplevel\n% #(layout-set-staff-size', str)
+ return str
+
+conversions.append (((2, 3, 22),
+ conv,
+ '''paper -> layout
+ bookpaper -> paper''' ))
+
+
+def conv (str):
+ str = re.sub (r'\\context\s+([a-zA-Z]+)\s*=\s*([a-z]+)\s',
+ r'\\context \1 = "\2" ',
+ str )
+ return str
+
+conversions.append (((2, 3, 23),
+ conv,
+ '''\context Foo = NOTENAME -> \context Foo = "NOTENAME"'''))
+
+def conv (str):
+ def sub(m):
+ return regularize_id (m.group (1))
+ str = re.sub (r'(maintainer_email|maintainer_web|midi_stuff|gourlay_maxmeasures)',
+ sub, str)
+ return str
+
+conversions.append (((2, 3, 24),
+ conv,
+ '''regularize other identifiers.'''))
+
+
+def conv (str):
+ return str
+
+conversions.append (((2, 4, 0),
+ conv,
+ ''))
+
+
+def conv (str):
+ str = re.sub (r'\\quote\s+"?([a-zA-Z0-9]+)"?\s+([0-9.*/]+)',
+ r'\\quoteDuring #"\1" { \skip \2 }',
+ str
+ )
+ return str
+
+conversions.append (((2, 5, 0),
+ conv,
+ ''))
+
+
+def conv (str):
+ str = re.sub (r'ly:import-module',
+ r'ly:module-copy', str)
+ return str
+
+conversions.append (((2, 5, 1),
+ conv,
+ 'ly:import-module -> ly:module-copy'))
+
+def conv (str):
+ str = re.sub (r'\\(column|fill-line|dir-column|center-align|right-align|left-align|bracketed-y-column)\s*<([^<]*)>',
+ r'\\\1 {\2}', str)
+ str = re.sub (r'\\(column|fill-line|dir-column|center-align|right-align|left-align|bracketed-y-column)\s*<([^<]*)>',
+ r'\\\1 {\2}', str)
+ str = re.sub (r'\\(column|fill-line|dir-column|center-align|right-align|left-align|bracketed-y-column)\s*<([^<]*)>',
+ r'\\\1 {\2}', str)
+ return str
+
+conversions.append (((2, 5, 2),
+ conv,
+ '\markup .. < .. > .. -> \markup .. { .. } ..'))
+
+def conv (str):
+ str = re.sub ('ly:find-glyph-by-name', 'ly:font-get-glyph', str)
+ str = re.sub ('"(scripts|clefs|accidentals)-', r'"\1.', str)
+ str = re.sub ("'hufnagel-do-fa", "'hufnagel.do.fa", str)
+ str = re.sub ("'(vaticana|hufnagel|medicaea|petrucci|neomensural|mensural)-", r"'\1.", str)
+ return str
+
+conversions.append (((2, 5, 3),
+ conv,
+ 'ly:find-glyph-by-name -> ly:font-get-glyph, remove - from glyphnames.'))
+
+
+
+def conv (str):
+ if re.search (r"\\encoding", str):
+ sys.stderr.write ("Sorry, input files should be UTF8.\n"
+ + "Please convert by hand.")
+ raise FatalConversionError()
+
+ return str
+
+conversions.append (((2, 5, 2),
+ conv,
+ 'ly:find-glyph-by-name -> ly:font-get-glyph, remove - from glyphnames.'))
+