]> git.donarmstrong.com Git - lilypond.git/commitdiff
musicxml2ly: Treat accidentals parentheses as cautionary
authorRodolfo Zitellini <rwz@xhero.org>
Tue, 19 Jun 2012 15:24:28 +0000 (17:24 +0200)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Mon, 25 Jun 2012 08:23:50 +0000 (04:23 -0400)
scripts/musicxml2ly.py

index 5d44c39cfb30374cd20f2502a4ef37a12dc7c9c3..a898e64a71622535e9306c5021362ccc169f55b6 100644 (file)
@@ -1784,8 +1784,12 @@ def musicxml_note_to_lily_main_event (n):
 
         acc = n.get_maybe_exist_named_child ('accidental')
         if acc:
-            # let's not force accs everywhere.
-            event.cautionary = acc.cautionary
+            # AccidentalCautionary in lily has parentheses
+            # so treat accidental explicitly in parentheses as cautionary
+            if hasattr(acc, 'parentheses') and acc.parentheses == "yes":
+                event.cautionary = True
+            else:
+                event.cautionary = acc.cautionary
             # TODO: Handle editorial accidentals
             # TODO: Handle the level-display setting for displaying brackets/parentheses