alexgorji / musicscore

13 stars 5 forks source link

Nested Tuplets #16

Open smoge opened 7 months ago

smoge commented 7 months ago

We need a bit more information in the Tuplet class to allow nested tuplet, such as tuplet type and an id number

as in:


<note>
  <pitch>...</pitch>
  <duration>...</duration>
  <time-modification>
    <actual-notes>3</actual-notes>
    <normal-notes>2</normal-notes>
  </time-modification>
  <notations>
    <tuplet type="start" number="1"/>
  </notations>
</note>

<!-- Inner Tuplet Start -->
<note>
  <pitch>...</pitch>
  <duration>...</duration>
  <time-modification>
    <actual-notes>5</actual-notes>
    <normal-notes>4</normal-notes>
  </time-modification>
  <notations>
    <tuplet type="start" number="2"/>
  </notations>
</note>
<!-- More notes of the inner tuplet -->
<note>
  <!-- Note details -->
  <notations>
    <tuplet type="stop" number="2"/>
  </notations>
</note>
<!-- Inner Tuplet End -->

<!-- More notes of the outer tuplet -->
<note>
  <!-- Note details -->
  <notations>
    <tuplet type="stop" number="1"/>
  </notations>
</note>