]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/musicxml.py
Fix min_page_count in page-turn-breaking.
[lilypond.git] / python / musicxml.py
index b6a5bbeac87fde3fbef733ffde49c03d318a722a..76e33ceb7b6792b5acb3615cfe50ae3a4d920730 100644 (file)
@@ -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
@@ -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
@@ -997,7 +997,10 @@ class Beam (Music_xml_spanner):
     def get_type (self):
        return self.get_text ()
     def is_primary (self):
-        return self.number == "1"
+        if hasattr (self, 'number'):
+            return self.number == "1"
+        else:
+            return True
 
 class Wavy_line (Music_xml_spanner):
     pass
@@ -1147,6 +1150,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
@@ -1197,6 +1203,7 @@ class_dict = {
         'pedal': Pedal,
         'per-minute': PerMinute,
        'pitch': Pitch,
+        'print': Print,
        'rest': Rest,
         'root': Root,
         'score-part': Score_part,