#
# source file of the GNU LilyPond music typesetter
#
-# (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+# (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
# Jan Nieuwenhuizen <janneke@gnu.org>
conversions.append (((2,1,17), conv, """\\partcombine syntax change to \\newpartcombine"""))
+
def conv (str):
str = re.sub (r'\\newpartcombine', r'\\partcombine', str)
str = re.sub (r'\\autochange\s+Staff', r'\\autochange ', str)
\\autochange Staff -> \\autochange
"""))
+
+
+
+def conv (str):
+ str = re.sub (r'\\include "drumpitch-init.ly"','', str)
+ str = re.sub (r'\\pitchnames ','pitchnames = ', str)
+ str = re.sub (r'\\chordmodifiers ','chordmodifiers = ', str)
+ str = re.sub (r'\bdrums\b\s*=','drumContents = ', str)
+ str = re.sub (r'\\drums\b','\\drumContents ', str)
+
+
+ if re.search ('drums->paper', str):
+ sys.stderr.write ("\nDrum notation found. Check file manually!")
+
+ str = re.sub (r"""\\apply\s+#\(drums->paper\s+'([a-z]+)\)""",
+ r"""\property DrumStaff.drumStyleTable = #\1-style""",
+ str)
+
+ if re.search ('Thread', str):
+ sys.stderr.write ("\nThread found. Check file manually!\n");
+
+ str = re.sub (r"""(\\once\s*)?\\property\s+Thread\s*\.\s*NoteHead\s*"""
+ + r"""\\(set|override)\s*#'style\s*=\s*#'harmonic"""
+ + r"""\s+([a-z]+[,'=]*)([0-9]*\.*)"""
+ ,r"""<\3\\harmonic>\4""", str)
+
+ str = re.sub (r"""\\new Thread""", """\context Voice""", str)
+ str = re.sub (r"""Thread""", """Voice""", str)
+
+ if re.search ('\bLyrics\b', str):
+ sys.stderr.write ("\nLyrics found. Check file manually!\n");
+
+ str = re.sub (r"""LyricsVoice""", r"""L@ricsVoice""", str)
+ str = re.sub (r"""\bLyrics\b""", r"""LyricsVoice""", str)
+ str = re.sub (r"""LyricsContext""", r"""LyricsVoiceContext""", str)
+ str = re.sub (r"""L@ricsVoice""", r"""LyricsVoice""",str)
+
+
+ return str
+
+conversions.append (((2,1,19), conv, """Drum notation changes, Removing \chordmodifiers, \notenames.
+Harmonic notes. Thread context removed. Lyrics context removed."""))
+
################################
# END OF CONVERSIONS
################################