@item --lxml
use the lxml.etree Python package for XML-parsing; uses less memory and cpu time.
-@item --nd --no-articulation-directions
+@item -m, --midi
+activate midi-block.
+
+@item -nd --no-articulation-directions
do not convert directions (@code{^}, @code{_} or @code{-}) for
articulations, dynamics, etc.
are produced in the output.
The @emph{articulate} project is one attempt to get more of the
-information in the score into he MIDI. It works by shortening
+information in the score into MIDI. It works by shortening
notes not under slurs, to @q{articulate} the notes. The amount of
shortening depends on any articulation markings attached to a
note: staccato halves the note value, tenuto gives a note its full
printer.dump (m)
printer.dump ("}")
+ def print_ly_chords (self,printer):
+ try:
+ for [staff_id, voices] in self.part_information:
+ for [v, lyrics, figuredbass, chordnames] in voices:
+ if chordnames:
+ printer ('\context ChordNames = "%s" \\%s' % (chordnames, chordnames))
+ printer.newline ()
+ except TypeError:
+ return
+
def print_ly (self, printer):
+ self.print_ly_chords (printer)
if self.stafftype:
printer.dump ("\\new %s" % self.stafftype)
self.print_ly_overrides (printer)
sub_staff_type = self.stafftype
for [staff_id, voices] in self.part_information:
- # Chord names need to come before the staff itself!
- for [v, lyrics, figuredbass, chordnames] in voices:
- if chordnames:
- printer ('\context ChordNames = "%s" \\%s' % (chordnames, chordnames))
-
- # now comes the real staff definition:
if staff_id:
printer ('\\context %s = "%s" << ' % (sub_staff_type, staff_id))
else:
def escape_ly_output_string (input_string):
return_string = input_string
- needs_quotes = not re.match (u"^[a-zA-ZäöüÜÄÖß,\.!:ñ]*$", return_string);
+ needs_quotes = not re.match (u"^[a-zA-ZäöüÜÄÖßñ]*$", return_string);
if needs_quotes:
return_string = "\"" + string.replace (return_string, "\"", "\\\"") + "\""
return return_string
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
action = "store_true",
default = False,
dest = "midi",
- help = _("add midi-block to .ly file"))
+ help = _("activate midi-block"))
p.add_option_group ('',
description = (