]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/abc2ly.py
release: 1.2.13
[lilypond.git] / scripts / abc2ly.py
index 2fb57404e6924213d2242e6e8ce024675ef12615..4a5cb5d44641c7792b7fc5fe16b516ac108bc09b 100644 (file)
@@ -505,12 +505,13 @@ def try_parse_header_line (ln, state):
                if g == 'K': # KEY
                        a = check_clef(a)
                        if a:
-                               __main__.global_key  =compute_key (a)# ugh.
                                m = re.match ('^([^ \t]*) *(.*)$', a) # seperate clef info
                                if m:
+                                       __main__.global_key  =compute_key (m.group(1))# ugh.
                                        voices_append ('\\key %s;' % lily_key(m.group(1)))
                                        check_clef(m.group(2))
                                else:
+                                       __main__.global_key  =compute_key (a)# ugh.
                                        voices_append ('\\key %s;' % lily_key(a))
                if g == 'O': # Origin
                        header ['origin'] = a