]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Fix single-note tuplets (e.g. on tremolo notes)
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 18 Nov 2008 20:49:46 +0000 (21:49 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 18 Nov 2008 20:51:21 +0000 (21:51 +0100)
Also remove duplicate code block

input/regression/musicxml/12c-Tuplet-Styles.xml [new file with mode: 0644]
input/regression/musicxml/12d-Tremolo-Tuplets.xml [new file with mode: 0644]
scripts/musicxml2ly.py

diff --git a/input/regression/musicxml/12c-Tuplet-Styles.xml b/input/regression/musicxml/12c-Tuplet-Styles.xml
new file mode 100644 (file)
index 0000000..c8e063c
--- /dev/null
@@ -0,0 +1,957 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN"\r
+                                "http://www.musicxml.org/dtds/partwise.dtd">\r
+<score-partwise version="1.1">\r
+  <identification>\r
+    <miscellaneous>\r
+      <miscellaneous-field name="description">Different tuplet styles:\r
+          default, none, x:y, x:y-note; Each with bracket, slur and none.\r
+          Finally, non-standard 4:3 and 17:2 tuplets are given.</miscellaneous-field>\r
+    </miscellaneous>\r
+  </identification>\r
+  <part-list>\r
+    <score-part id="P1">\r
+      <part-name print-object="no">MusicXML Part</part-name>\r
+    </score-part>\r
+  </part-list>\r
+  <!--=========================================================-->\r
+  <part id="P1">\r
+    <measure number="1">\r
+      <attributes>\r
+        <divisions>408</divisions>\r
+        <key>\r
+          <fifths>0</fifths>\r
+          <mode>major</mode>\r
+        </key>\r
+        <time symbol="common">\r
+          <beats>4</beats>\r
+          <beat-type>4</beat-type>\r
+        </time>\r
+        <clef>\r
+          <sign>G</sign>\r
+          <line>2</line>\r
+        </clef>\r
+      </attributes>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="yes" number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="yes" number="1" placement="below" show-number="none" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="yes" number="1" placement="below" show-number="both" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="yes" number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="2">\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" placement="below" show-number="none" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" placement="below" show-number="both" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="3">\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="no" number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="no" number="1" show-number="none" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="no" number="1" placement="below" show-number="both" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet bracket="no" number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>136</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="4">\r
+      <print new-system="yes">\r
+        <system-layout>\r
+          <system-distance>114</system-distance>\r
+        </system-layout>\r
+      </print>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>153</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>4</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" placement="below" show-number="both" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>153</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>4</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>153</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>4</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>153</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>4</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" placement="below" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>17</actual-notes>\r
+          <normal-notes>3</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>204</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <beam number="1">begin</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>C</step>\r
+          <octave>5</octave>\r
+        </pitch>\r
+        <duration>204</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <beam number="1">end</beam>\r
+      </note>\r
+      <barline location="right">\r
+        <bar-style>light-heavy</bar-style>\r
+      </barline>\r
+    </measure>\r
+  </part>\r
+  <!--=========================================================-->\r
+</score-partwise>\r
diff --git a/input/regression/musicxml/12d-Tremolo-Tuplets.xml b/input/regression/musicxml/12d-Tremolo-Tuplets.xml
new file mode 100644 (file)
index 0000000..7a7792d
--- /dev/null
@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN"\r
+                                "http://www.musicxml.org/dtds/partwise.dtd">\r
+<score-partwise version="1.1">\r
+  <identification>\r
+    <miscellaneous>\r
+      <miscellaneous-field name="description">Tremolo tuplets are tuplets on \r
+          single notes with a tremolo ornament. The application shall correctly\r
+          import these notes with 2/3 or their time...</miscellaneous-field>\r
+    </miscellaneous>\r
+  </identification>\r
+  <part-list>\r
+    <score-part id="P1">\r
+      <part-name print-object="no">MusicXML Part</part-name>\r
+    </score-part>\r
+  </part-list>\r
+  <!--=========================================================-->\r
+  <part id="P1">\r
+    <measure number="1">\r
+      <attributes>\r
+        <divisions>36</divisions>\r
+        <key>\r
+          <fifths>0</fifths>\r
+          <mode>major</mode>\r
+        </key>\r
+        <time>\r
+          <beats>3</beats>\r
+          <beat-type>4</beat-type>\r
+        </time>\r
+        <clef>\r
+          <sign>G</sign>\r
+          <line>2</line>\r
+        </clef>\r
+      </attributes>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+        <notations>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+        <notations>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+        <notations>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+          <articulations>\r
+            <staccato placement="below"/>\r
+          </articulations>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="2">\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>quarter</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>quarter</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>quarter</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="3">\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>72</duration>\r
+        <voice>1</voice>\r
+        <type>half</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>6</actual-notes>\r
+          <normal-notes>4</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>quarter</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="4">\r
+      <note>\r
+        <pitch>\r
+          <step>F</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">begin</beam>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">continue</beam>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>12</duration>\r
+        <voice>1</voice>\r
+        <type>eighth</type>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+        </time-modification>\r
+        <beam number="1">end</beam>\r
+        <notations>\r
+          <tuplet number="1" type="stop"/>\r
+        </notations>\r
+      </note>\r
+      <direction placement="below">\r
+        <direction-type>\r
+          <dynamics>\r
+            <fp/>\r
+          </dynamics>\r
+        </direction-type>\r
+      </direction>\r
+      <note>\r
+        <pitch>\r
+          <step>A</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>72</duration>\r
+        <voice>1</voice>\r
+        <type>half</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>6</actual-notes>\r
+          <normal-notes>4</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+    </measure>\r
+    <!--=======================================================-->\r
+    <measure number="5">\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>72</duration>\r
+        <voice>1</voice>\r
+        <type>half</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>6</actual-notes>\r
+          <normal-notes>4</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+      <note>\r
+        <pitch>\r
+          <step>G</step>\r
+          <octave>4</octave>\r
+        </pitch>\r
+        <duration>36</duration>\r
+        <voice>1</voice>\r
+        <type>quarter</type>\r
+        <dot/>\r
+        <time-modification>\r
+          <actual-notes>3</actual-notes>\r
+          <normal-notes>2</normal-notes>\r
+          <normal-type>eighth</normal-type>\r
+        </time-modification>\r
+        <notations>\r
+          <tuplet number="1" type="start"/>\r
+          <tuplet number="1" type="stop"/>\r
+          <ornaments>\r
+            <tremolo>1</tremolo>\r
+          </ornaments>\r
+        </notations>\r
+      </note>\r
+      <barline location="right">\r
+        <bar-style>light-heavy</bar-style>\r
+      </barline>\r
+    </measure>\r
+  </part>\r
+  <!--=========================================================-->\r
+</score-partwise>\r
index 08f2dc97ba937b33578acd637798dca3059413fa..4a04cb4af857c6c936f325b22700902e58f29cc6 100644 (file)
@@ -618,7 +618,7 @@ def group_tuplets (music_list, events):
     new_list = []
     last = 0
     for (i1, i2, frac) in indices:
-        if i1 >= i2:
+        if i1 > i2:
             continue
 
         new_list.extend (music_list[last:i1])
@@ -2109,14 +2109,6 @@ def musicxml_voice_to_lily_voice (voice):
                     is_beamed = True
                 elif beam_ev.span_direction == 1: # beam and thus melisma ends here
                     is_beamed = False
-            
-        if tuplet_event:
-            mod = n.get_maybe_exist_typed_child (musicxml.Time_modification)
-            frac = (1,1)
-            if mod:
-                frac = mod.get_fraction ()
-                
-            tuplet_events.append ((ev_chord, tuplet_event, frac))
 
         # Extract the lyrics
         if not rest and not ignore_lyrics: