X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=python%2Fmusicexp.py;h=a564f29ce500700a9c1bd34a783800ee69d11377;hb=7b5ff8ac30bccd7c31954d6fffeb0cf333fd9d4f;hp=8610f8aa44f138886c5a1bed5cb4963a3f43a34f;hpb=689382813a007255352a32847ab884ed67192fcc;p=lilypond.git diff --git a/python/musicexp.py b/python/musicexp.py index 8610f8aa44..a564f29ce5 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -1489,7 +1489,7 @@ class KeySignatureChange (Music): elif self.non_standard_alterations: alterations = [self.format_non_standard_alteration (a) for a in self.non_standard_alterations] - return "\\set Staff.keySignature = #`(%s)" % string.join (alterations, " ") + return "\\set Staff.keyAlterations = #`(%s)" % string.join (alterations, " ") else: return '' @@ -1807,7 +1807,18 @@ class StaffGroup: printer.dump (m) printer.dump ("}") + def print_ly_chords (self,printer): + try: + for [staff_id, voices] in self.part_information: + for [v, lyrics, figuredbass, chordnames] in voices: + if chordnames: + printer ('\context ChordNames = "%s" \\%s' % (chordnames, chordnames)) + printer.newline () + except TypeError: + return + def print_ly (self, printer): + self.print_ly_chords (printer) if self.stafftype: printer.dump ("\\new %s" % self.stafftype) self.print_ly_overrides (printer) @@ -1848,12 +1859,6 @@ class Staff (StaffGroup): sub_staff_type = self.stafftype for [staff_id, voices] in self.part_information: - # Chord names need to come before the staff itself! - for [v, lyrics, figuredbass, chordnames] in voices: - if chordnames: - printer ('\context ChordNames = "%s" \\%s' % (chordnames, chordnames)) - - # now comes the real staff definition: if staff_id: printer ('\\context %s = "%s" << ' % (sub_staff_type, staff_id)) else: