summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRodolfo Zitellini <rwz@xhero.org>2012-06-19 17:24:28 +0200
committerJulien Rioux <jrioux@physics.utoronto.ca>2012-06-25 04:23:50 -0400
commit75691ab991a6624021ac07870dcce9f996395053 (patch)
treeb2df76518098ab79bb81a201272dfd36a45629d0 /scripts
parent9d3a999b3ae3502633858c50185c0180949d405c (diff)
musicxml2ly: Treat accidentals parentheses as cautionary
Diffstat (limited to 'scripts')
-rw-r--r--scripts/musicxml2ly.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py
index 5d44c39cfb..a898e64a71 100644
--- a/scripts/musicxml2ly.py
+++ b/scripts/musicxml2ly.py
@@ -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