]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Implement different styles of tuplet brackets and numbers
authorReinhold Kainhofer <reinhold@kainhofer.com>
Thu, 20 Nov 2008 18:07:05 +0000 (19:07 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 21 Nov 2008 01:23:43 +0000 (02:23 +0100)
Curved brackets are not yet working...

input/regression/musicxml/12c-Tuplet-Styles.xml
python/musicexp.py
scripts/musicxml2ly.py

index d2825d82c915c1020fc3928e27e8d50fef4c5c50..6b55d4d8aba5c2fff69341523fd0d5aff2e1c316 100644 (file)
@@ -24,7 +24,7 @@
           <mode>major</mode>
         </key>
         <time symbol="common">
-          <beats>4</beats>
+          <beats>5</beats>
           <beat-type>4</beat-type>
         </time>
         <clef>
@@ -44,9 +44,8 @@
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="yes" number="1" placement="below" type="start"/>
+          <tuplet bracket="yes" number="1" type="start"/>
         </notations>
       </note>
       <note>
@@ -61,7 +60,6 @@
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
@@ -75,7 +73,6 @@
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
@@ -92,9 +89,8 @@
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="yes" number="1" placement="below" show-number="none" type="start"/>
+          <tuplet bracket="yes" number="1" show-number="none" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="yes" number="1" placement="below" show-number="both" type="start"/>
+          <tuplet bracket="yes" number="1" show-number="both" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="yes" number="1" placement="below" type="start"/>
+          <tuplet bracket="yes" number="1" show-number="both" show-type="actual" type="start"/>
+        </notations>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+        <notations>
+          <tuplet number="1" type="stop"/>
+        </notations>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+        <notations>
+          <tuplet bracket="yes" number="1" show-number="both" show-type="both" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet number="1" placement="below" type="start"/>
+          <tuplet bracket="yes" line-shape="curved" number="1" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet number="1" placement="below" show-number="none" type="start"/>
+          <tuplet bracket="yes" line-shape="curved" number="1" show-number="none" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet number="1" placement="below" show-number="both" type="start"/>
+          <tuplet bracket="yes" line-shape="curved" number="1" show-number="both" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet number="1" placement="below" type="start"/>
+          <tuplet bracket="yes" line-shape="curved" number="1" show-number="both" show-type="actual" type="start"/>
+        </notations>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+        <notations>
+          <tuplet number="1" type="stop"/>
+        </notations>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+        <notations>
+          <tuplet bracket="yes" line-shape="curved" number="1" show-number="both" show-type="both" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="no" number="1" placement="below" type="start"/>
+          <tuplet bracket="no" number="1" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
           <tuplet bracket="no" number="1" show-number="none" type="start"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="no" number="1" placement="below" show-number="both" type="start"/>
+          <tuplet bracket="no" number="1" show-number="both" type="start"/>
+        </notations>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+        <notations>
+          <tuplet number="1" type="stop"/>
+        </notations>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>136</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+        <time-modification>
+          <actual-notes>3</actual-notes>
+          <normal-notes>2</normal-notes>
+        </time-modification>
+        <notations>
+          <tuplet bracket="no" number="1" show-number="both" show-type="actual" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
-          <tuplet bracket="no" number="1" placement="below" type="start"/>
+          <tuplet bracket="no" number="1" show-number="both" show-type="both" type="start"/>
         </notations>
       </note>
       <note>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>3</actual-notes>
           <normal-notes>2</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>4</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
           <tuplet number="1" placement="below" show-number="both" type="start"/>
         </notations>
           <actual-notes>4</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>4</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>4</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">begin</beam>
         <notations>
           <tuplet number="1" placement="below" type="start"/>
         </notations>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">continue</beam>
       </note>
       <note>
         <pitch>
           <actual-notes>17</actual-notes>
           <normal-notes>3</normal-notes>
         </time-modification>
-        <beam number="1">end</beam>
         <notations>
           <tuplet number="1" type="stop"/>
         </notations>
         <duration>204</duration>
         <voice>1</voice>
         <type>eighth</type>
-        <beam number="1">begin</beam>
       </note>
       <note>
         <pitch>
         <duration>204</duration>
         <voice>1</voice>
         <type>eighth</type>
-        <beam number="1">end</beam>
       </note>
       <barline location="right">
         <bar-style>light-heavy</bar-style>
index c0b298f36797fd9a775c0afb588c77ea9bff4a37..bdd707476198a031ce5ca783dad876d03cda5fb3 100644 (file)
@@ -452,7 +452,47 @@ class RelativeMusic (MusicWrapper):
         relative_pitches = prev_relative_pitches
 
 class TimeScaledMusic (MusicWrapper):
+    def __init__ (self):
+        MusicWrapper.__init__ (self)
+        self.display_number = "actual" # valid values "actual" | "both" | None
+        # Display the basic note length for the tuplet:
+        self.display_type = None       # value values "actual" | "both" | None
+        self.display_bracket = "bracket" # valid values "bracket" | "curved" | None
+
     def print_ly (self, func):
+        if self.display_bracket == None:
+            func ("\\once \\override TupletBracket #'stencil = ##f")
+            func.newline ()
+        elif self.display_bracket == "curved":
+            warning (_ ("Tuplet brackets of curved shape are not correctly implemented"))
+            func ("\\once \\override TupletBracket #'stencil = #ly:slur::print")
+            func.newline ()
+
+        base_number_function = {None: "#f", 
+             "actual": "tuplet-number::calc-denominator-text", 
+             "both": "tuplet-number::calc-fraction-text"}.get (self.display_number, None)
+
+        if self.display_type == "actual":
+            base_duration = "8" # TODO!!!
+            func ("\\once \\override TupletNumber #'text = #(tuplet-number::append-note-wrapper %s \"%s\")" %
+                (base_number_function, base_duration))
+            func.newline ()
+        elif self.display_type == None:
+            if self.display_number == None:
+                func ("\\once \\override TupletNumber #'stencil = ##f")
+                func.newline ()
+            elif self.display_number == "both":
+                func ("\\once \\override TupletNumber #'text = #%s" % base_number_function)
+                func.newline ()
+        elif self.display_type == "both":
+            warning (_ ("Tuplet brackets displaying both note durations are not implemented, using default"))
+            if self.display_number == None:
+                func ("\\once \\override TupletNumber #'stencil = ##f")
+                func.newline ()
+            elif self.display_number == "both":
+                func ("\\once \\override TupletNumber #'text = #%s" % base_number_function)
+                func.newline ()
+
         func ('\\times %d/%d ' %
            (self.numerator, self.denominator))
         func.add_factor (Rational (self.numerator, self.denominator))
index 48ad092feb3e6bc358e509365b3cdb6f0dfb4387..b124e99ebe57430969c415af8ae510c3badb84cf 100644 (file)
@@ -44,6 +44,7 @@ def error_message (str):
 
 needed_additional_definitions = []
 additional_definitions = {
+
   "snappizzicato": """#(define-markup-command (snappizzicato layout props) ()
   (interpret-markup layout props
     (markup #:stencil
@@ -54,6 +55,7 @@ additional_definitions = {
             (list 'draw-line 0.1 0 0.1 0 1)
             '(-0.1 . 0.1) '(0.1 . 1)))
         0.7 X))))""",
+
   "eyeglasses": """eyeglassesps = #"0.15 setlinewidth
       -0.9 0 translate
       1.1 1.1 scale
@@ -72,7 +74,20 @@ additional_definitions = {
       3.30 2.00 lineto
       3.42 2.26 3.80 2.40 3.65 1.70 curveto
       stroke"
-eyeglasses =  \markup { \with-dimensions #'(0 . 4.4) #'(0 . 2.5) \postscript #eyeglassesps }"""
+eyeglasses =  \markup { \with-dimensions #'(0 . 4.4) #'(0 . 2.5) \postscript #eyeglassesps }""",
+
+  "tuplet-note-wrapper": """      % a formatter function, which is simply a wrapper around an existing 
+      % tuplet formatter function. It takes the value returned by the given
+      % function and appends a note of given length. 
+  #(define-public ((tuplet-number::append-note-wrapper function note) grob)
+    (let* ((txt (if function (function grob) #f)))
+      (if txt 
+        (markup txt #:fontsize -5 #:note note UP)
+        (markup #:fontsize -5 #:note note UP)
+      )
+    )
+  )""",
+
 }
 
 def round_to_two_digits (val):
@@ -592,6 +607,30 @@ def group_repeats (music_list):
         # TODO: Implement repeats until the end without explicit ending bar
     return music_list
 
+def musicxml_tuplet_to_lily (tuplet_elt, fraction):
+    tsm = musicexp.TimeScaledMusic ()
+    tsm.numerator = fraction[0]
+    tsm.denominator  = fraction[1]
+
+    if hasattr (tuplet_elt, 'bracket') and tuplet_elt.bracket == "no":
+        tsm.display_bracket = None
+    elif hasattr (tuplet_elt, 'line-shape') and getattr (tuplet_elt, 'line-shape') == "curved":
+        tsm.display_bracket = "curved"
+    else:
+        tsm.display_bracket = "bracket"
+
+    display_values = {"none": None, "actual": "actual", "both": "both"}
+    if hasattr (tuplet_elt, "show-number"):
+        tsm.display_number = display_values.get (getattr (tuplet_elt, "show-number"), "actual")
+        if getattr (tuplet_elt, "show-number") == "both":
+            needed_additional_definitions.append ("tuplet-note-wrapper")
+    if hasattr (tuplet_elt, "show-type"):
+        tsm.display_type = display_values.get (getattr (tuplet_elt, "show-type"), None)
+
+    # TODO: Handle non-standard display (extract the type from the tuplet-actual 
+    # and tuplet-normal children
+    # TODO: We need the type from the time-modification tag!
+    return tsm
 
 
 def group_tuplets (music_list, events):
@@ -615,18 +654,19 @@ def group_tuplets (music_list, events):
         if hasattr (tuplet_elt, 'number'):
             nr = getattr (tuplet_elt, 'number')
         if tuplet_elt.type == 'start':
-            tuplet_info = [j, None, fraction]
+            tuplet_object = musicxml_tuplet_to_lily (tuplet_elt, fraction)
+            tuplet_info = [j, None, tuplet_object]
             indices.append (tuplet_info)
             brackets[nr] = tuplet_info
         elif tuplet_elt.type == 'stop':
             bracket_info = brackets.get (nr, None)
             if bracket_info:
-                bracket_info[1] = j
+                bracket_info[1] = j # Set the ending position to j
                 del brackets[nr]
 
     new_list = []
     last = 0
-    for (i1, i2, frac) in indices:
+    for (i1, i2, tsm) in indices:
         if i1 > i2:
             continue
 
@@ -635,12 +675,8 @@ def group_tuplets (music_list, events):
         last = i2 + 1
         seq.elements = music_list[i1:last]
 
-        tsm = musicexp.TimeScaledMusic ()
         tsm.element = seq
 
-        tsm.numerator = frac[0]
-        tsm.denominator  = frac[1]
-
         new_list.append (tsm)
 
     new_list.extend (music_list[last:])
@@ -1999,6 +2035,7 @@ def musicxml_voice_to_lily_voice (voice):
         for notations in notations_children:
             for tuplet_event in notations.get_tuplets():
                 mod = n.get_maybe_exist_typed_child (musicxml.Time_modification)
+                # TODO: Extract the type of note (for possible display later on!)
                 frac = (1,1)
                 if mod:
                     frac = mod.get_fraction ()