X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fmusicxml.py;h=0400cce2532de083414c0ebbb3a730cc75e32b75;hb=ccf589356edbab728b502396603d8937638f7d18;hp=5c845f841a99238be14b71790f60e1a9f485649a;hpb=bb641f642aef4866223930498de213573d3fc52a;p=lilypond.git diff --git a/python/musicxml.py b/python/musicxml.py index 5c845f841a..0400cce253 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -15,7 +15,7 @@ def error (str): 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 @@ -430,8 +430,6 @@ class Attributes (Measure_element): else: i.message (_ ("Key alteration octave given for a " "non-existing alteration nr. %s, available numbers: %s!") % (nr, len(alterations))) - i.message ( "Non-standard key signature (after octave %s for alter nr %s): %s" % (i.get_text (), nr, alterations)) - i.message ( "Non-standard key signature with alterations %s found!" % alterations) return alterations def get_transposition (self): @@ -541,6 +539,8 @@ class Syllabic (Music_xml_node): return (text == "begin") or (text == "middle") class Elision (Music_xml_node): pass +class Extend (Music_xml_node): + pass class Text (Music_xml_node): pass @@ -828,7 +828,7 @@ class Part (Music_xml_node): if not (isinstance (n, Note) or isinstance (n, Attributes) or isinstance (n, Direction) or isinstance (n, Partial) or isinstance (n, Barline) or isinstance (n, Harmony) or - isinstance (n, FiguredBass) ): + isinstance (n, FiguredBass) or isinstance (n, Print)): continue if isinstance (n, Attributes) and not start_attr: @@ -844,7 +844,7 @@ class Part (Music_xml_node): voices[v].add_element (staff_attributes) continue - if isinstance (n, Partial) or isinstance (n, Barline): + if isinstance (n, Partial) or isinstance (n, Barline) or isinstance (n, Print): for v in voices.keys (): voices[v].add_element (n) continue @@ -1147,6 +1147,9 @@ class BeatUnitDot (Music_xml_node): class PerMinute (Music_xml_node): pass +class Print (Music_xml_node): + pass + ## need this, not all classes are instantiated @@ -1175,6 +1178,7 @@ class_dict = { 'direction-type': DirType, 'duration': Duration, 'elision': Elision, + 'extend': Extend, 'frame': Frame, 'frame-note': Frame_Note, 'figured-bass': FiguredBass, @@ -1196,6 +1200,7 @@ class_dict = { 'pedal': Pedal, 'per-minute': PerMinute, 'pitch': Pitch, + 'print': Print, 'rest': Rest, 'root': Root, 'score-part': Score_part,