lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixes bug in abc2ly and abc2ly regtest (issue 6500059)


From: PhilEHolmes
Subject: Fixes bug in abc2ly and abc2ly regtest (issue 6500059)
Date: Fri, 31 Aug 2012 16:53:09 +0000

Reviewers: ,

Description:
Working my way through the output from make doc I found:

abc2ly:warning:ignoring unknown key: `none'

It came from the regtest clefs.abc.  Running this through abc2ly and
lilypond revealed that the regtest is wrongly constructed - skipped
notes were not indicated in the abc lyrics.  abc2ly also treated a key
of "none" wrongly - it's not an error, it does indicate no key
signature.  This patch fixes both problems.

Please review this at http://codereview.appspot.com/6500059/

Affected files:
  M input/regression/abc2ly/clefs.abc
  M scripts/abc2ly.py


Index: input/regression/abc2ly/clefs.abc
diff --git a/input/regression/abc2ly/clefs.abc b/input/regression/abc2ly/clefs.abc
old mode 100644
new mode 100755
index 18403238ac01858d0848936732100329e8ccd91c..18ed718ca5546a3083da78a258dd5baee3aaa021
--- a/input/regression/abc2ly/clefs.abc
+++ b/input/regression/abc2ly/clefs.abc
@@ -3,11 +3,11 @@ T: Various different clefs
 L: 1/4
 K: none
 CEGc | [K: C treble] CEGc |[K: Cm bass]CEGc |
-w: none | treble | bass |
+w: none * * * | treble * * * | bass * * * |
 [K: C bass3]CEGc | [K: Cm alto4]CEGc| [K: C alto]CEGc |
-w: baritone | tenor | alto |
+w: baritone * * * | tenor * * * | alto * * * |
 [K: Cm alto2]CEGc | [K: C alto1]CEGc | [K: Cm treble-8]CEGc |
-w: mezzosoprano | soprano | treble-8 |
+w: mezzosoprano * * * | soprano * * * | treble-8 * * |
 [K: C treble-8va]CEGc | [K: Cm treble+8]CEGc | [K: C treble8]CEGc |]
-w: treble-8va | treble+8 | treble8 |
+w: treble-8va * * | treble+8 * * * | treble8 * * * |

Index: scripts/abc2ly.py
diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py
index d04068fa31cdaa25a51aef3d902ac3a36a1951ec..60900ca8315d78890eebea3a208b4a139790c8f0 100644
--- a/scripts/abc2ly.py
+++ b/scripts/abc2ly.py
@@ -433,6 +433,8 @@ key_lookup = {         # abc to lilypond key mode names
 }

 def lily_key (k):
+    if k == 'none':
+        return
     orig = "" + k
     # UGR
     k = k.lower ()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]