from rational import Rational
-# Store command-line options in a global variable, so we can access them everythwere
+# Store command-line options in a global variable, so we can access them everywhere
options = None
class Conversion_Settings:
group_starts.append (pos)
pos += 1
- if len (staves) == 1:
- return staves[0]
for i in staves:
structure.append_staff (i)
return score
p.partial = rational_to_lily_duration (partial_len)
return p
else:
- return Null
+ return None
# Detect repeats and alternative endings in the chord event list (music_list)
# and convert them to the corresponding musicexp objects, containing nested
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
action = "store_true",
default = False,
dest = "midi",
- help = _("add midi-block to .ly file"))
+ help = _("activate midi-block"))
p.add_option_group ('',
description = (