X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fmusicexp.py;h=6bf587be8ff213d184ecac9ca075c87511652de2;hb=485ea672ce8cc791a59ca713f3ea1d01b171f20c;hp=c8898bcc547be6f9f9131839f24ce2697f7863bc;hpb=0fc92037e0f2cf55b69f812989f7c0584e5c310e;p=lilypond.git diff --git a/python/musicexp.py b/python/musicexp.py index c8898bcc54..6bf587be8f 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -892,10 +892,10 @@ class BarLine (Music): self.type = None def print_ly (self, printer): - bar_symbol = { 'regular': "|", 'dotted': ":", 'dashed': ":", + bar_symbol = { 'regular': "|", 'dotted': ":", 'dashed': "dashed", 'heavy': "|", 'light-light': "||", 'light-heavy': "|.", 'heavy-light': ".|", 'heavy-heavy': ".|.", 'tick': "'", - 'short': "'", 'none': "" }.get (self.type, None) + 'short': "'|", 'none': "" }.get (self.type, None) if bar_symbol <> None: printer.dump ('\\bar "%s"' % bar_symbol) else: @@ -991,7 +991,11 @@ class OctaveShiftEvent (SpanEvent): self.span_type = {'up': 1, 'down': -1}.get (type, 0) def ly_octave_shift_indicator (self): # convert 8/15 to lilypond indicators (+-1/+-2) - value = {8: 1, 15: 2}.get (self.size, 0) + try: + value = {8: 1, 15: 2}[self.size] + except KeyError: + warning (_ ("Invalid octave shift size found: %s. Using no shift.") % self.size) + value = 0 # negative values go up! value *= -1*self.span_type return value @@ -1528,6 +1532,8 @@ class ClefChange (Music): ('F', 4): "bass", ('F', 5): "subbass", ("percussion", 2): "percussion", + # Workaround: MuseScore uses PERC instead of percussion + ("PERC", 2): "percussion", ("TAB", 5): "tab"}.get ((self.type, self.position), None) def ly_expression (self): return '\\clef "%s%s"' % (self.clef_name (), self.octave_modifier ())