From: Reinhold Kainhofer Date: Fri, 11 Apr 2008 18:55:38 +0000 (+0200) Subject: MusicXML: Generate chord names context before staff (=> above the staff!) X-Git-Tag: release/2.11.44-1~4^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=08982125770411da10f36f5861f30d570af07114;p=lilypond.git MusicXML: Generate chord names context before staff (=> above the staff!) Signed-off-by: Reinhold Kainhofer --- diff --git a/python/musicexp.py b/python/musicexp.py index d0fc398f6b..5efff8a416 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -1524,6 +1524,12 @@ 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: @@ -1533,8 +1539,6 @@ class Staff (StaffGroup): nr_voices = len (voices) for [v, lyrics, figuredbass, chordnames] in voices: n += 1 - if chordnames: - printer ('\context ChordNames = "%s" \\%s' % (chordnames, chordnames)) voice_count_text = '' if nr_voices > 1: voice_count_text = {1: ' \\voiceOne', 2: ' \\voiceTwo',