Browse Source

fix(Directions): Fix Segno, Coda and To Coda positioning (#920): To Coda at end, Segno at beginning of measure

RepetitionInstructionReader: Fix repetition words like Segno sometimes placed in the previous or next measure

fix #920
improves previous fixes in #920

VexflowMeasure: Begin shouldn't be used for repetition words (begin is only for rhythm instructions etc.),
instead Left should be used.
sschmid 4 years ago
parent
commit
9643493b00

+ 5 - 3
src/MusicalScore/Graphical/VexFlow/VexFlowMeasure.ts

@@ -110,6 +110,7 @@ export class VexFlowMeasure extends GraphicalMeasure {
             space_above_staff_ln: 0,
             space_below_staff_ln: 0
         });
+        (this.stave as any).MeasureNumber = this.MeasureNumber; // for debug info. vexflow automatically uses stave.measure for rendering measure numbers
         // also see VexFlowMusicSheetDrawer.drawSheet() for some other vexflow default value settings (like default font scale)
 
         if (this.ParentStaff) {
@@ -367,16 +368,17 @@ export class VexFlowMeasure extends GraphicalMeasure {
     public addWordRepetition(repetitionInstruction: RepetitionInstruction): void {
         let instruction: Vex.Flow.Repetition.type = undefined;
         let position: any = Vex.Flow.StaveModifier.Position.END;
+        const xShift: number = this.beginInstructionsWidth;
         switch (repetitionInstruction.type) {
           case RepetitionInstructionEnum.Segno:
             // create Segno Symbol:
             instruction = Vex.Flow.Repetition.type.SEGNO_LEFT;
-            position = Vex.Flow.StaveModifier.Position.BEGIN;
+            position = Vex.Flow.StaveModifier.Position.LEFT;
             break;
           case RepetitionInstructionEnum.Coda:
             // create Coda Symbol:
             instruction = Vex.Flow.Repetition.type.CODA_LEFT;
-            position = Vex.Flow.StaveModifier.Position.BEGIN;
+            position = Vex.Flow.StaveModifier.Position.LEFT;
             break;
           case RepetitionInstructionEnum.DaCapo:
             instruction = Vex.Flow.Repetition.type.DC;
@@ -406,7 +408,7 @@ export class VexFlowMeasure extends GraphicalMeasure {
             break;
         }
         if (instruction) {
-            const repetition: Vex.Flow.Repetition = new Vex.Flow.Repetition(instruction, 0, -this.rules.RepetitionSymbolsYOffset);
+            const repetition: Vex.Flow.Repetition = new Vex.Flow.Repetition(instruction, xShift, -this.rules.RepetitionSymbolsYOffset);
             this.stave.addModifier(repetition, position);
             return;
         }

+ 52 - 48
src/MusicalScore/ScoreIO/MusicSymbolModules/RepetitionInstructionReader.ts

@@ -126,58 +126,62 @@ export class RepetitionInstructionReader {
       // must Trim string and ToLower before compare
       const innerText: string = wordsNode.value.trim().toLowerCase();
       if (StringUtil.StringContainsSeparatedWord(innerText, dsRegEx + " al fine", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // @correctness i don't think we should manipulate the measure index by relative position [ssch]
+        //   it's clearly assigned a measure in the xml
+        //   this has misfired in the past, see test_staverepetitions_coda_etc_positioning.musicxml
+        //   there, it put the 'To Coda' in measure 1, same as the 'Signo', which was not correct.
+        // if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.DalSegnoAlFine);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       const dcRegEx: string = "d\\.\\s?c\\.";
       if (StringUtil.StringContainsSeparatedWord(innerText, dcRegEx + " al coda", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5) {
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5) {
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.DalSegnoAlCoda);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, dcRegEx + " al fine", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.DaCapoAlFine);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, dcRegEx + " al coda", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5) {
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5) {
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.DaCapoAlCoda);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, dcRegEx) ||
         StringUtil.StringContainsSeparatedWord(innerText, "da\\s?capo", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.DaCapo);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, dsRegEx, true) ||
         StringUtil.StringContainsSeparatedWord(innerText, "dal\\s?segno", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5 && this.currentMeasureIndex < this.xmlMeasureList[0].length - 1) { // not in last measure
+        //   measureIndex--;
+        // }
         let newInstruction: RepetitionInstruction;
         if (StringUtil.StringContainsSeparatedWord(innerText, "al\\s?coda", true)) {
           newInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.DalSegnoAlCoda);
@@ -189,54 +193,54 @@ export class RepetitionInstructionReader {
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, "to\\s?coda", true) ||
         StringUtil.StringContainsSeparatedWord(innerText, "a (la )?coda", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5) {
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5) {
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.ToCoda);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, "fine", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition < 0.5) {
-          measureIndex--;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition < 0.5) {
+        //   measureIndex--;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.Fine);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, "coda", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition > 0.5) {
-          measureIndex++;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition > 0.5) {
+        //   measureIndex++;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.Coda);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
       if (StringUtil.StringContainsSeparatedWord(innerText, "segno", true)) {
-        let measureIndex: number = this.currentMeasureIndex;
-        if (relativeMeasurePosition > 0.5) {
-          measureIndex++;
-        }
+        const measureIndex: number = this.currentMeasureIndex;
+        // if (relativeMeasurePosition > 0.5) {
+        //   measureIndex++;
+        // }
         const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.Segno);
         this.addInstruction(this.repetitionInstructions, newInstruction);
         return true;
       }
     } else if (directionTypeNode.element("segno")) {
-      let measureIndex: number = this.currentMeasureIndex;
-      if (relativeMeasurePosition > 0.5) {
-        measureIndex++;
-      }
+      const measureIndex: number = this.currentMeasureIndex;
+      // if (relativeMeasurePosition > 0.5) {
+      //   measureIndex++;
+      // }
       const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.Segno);
       this.addInstruction(this.repetitionInstructions, newInstruction);
       return true;
     } else if (directionTypeNode.element("coda")) {
-      let measureIndex: number = this.currentMeasureIndex;
-      if (relativeMeasurePosition > 0.5) {
-        measureIndex++;
-      }
+      const measureIndex: number = this.currentMeasureIndex;
+      // if (relativeMeasurePosition > 0.5) {
+      //   measureIndex++;
+      // }
       const newInstruction: RepetitionInstruction = new RepetitionInstruction(measureIndex, RepetitionInstructionEnum.Coda);
       this.addInstruction(this.repetitionInstructions, newInstruction);
       return true;

+ 7 - 2
src/VexFlowPatch/src/staverepetition.js

@@ -119,11 +119,16 @@ export class Repetition extends StaveModifier {
       text_x = this.x + stave.options.vertical_bar_width;
       symbol_x = text_x + ctx.measureText(text).width + 12;
     } else if (this.symbol_type === Repetition.type.TO_CODA) {
-      text_x = x + this.x + stave.options.vertical_bar_width;
+      // text_x = x + this.x + this.x_shift + stave.options.vertical_bar_width;
+      // symbol_x = text_x + ctx.measureText(text).width + 12;
+
+      this.x_shift = -(text_x + ctx.measureText(text).width + 12 + stave.options.vertical_bar_width + 12);
+      // TO_CODA and DS_AL_CODA draw in the next measure without this x_shift, not sure why not for other symbols.
+      text_x = this.x + this.x_shift + stave.options.vertical_bar_width;
       symbol_x = text_x + ctx.measureText(text).width + 12;
     } else if (this.symbol_type === Repetition.type.DS_AL_CODA) {
       this.x_shift = -(text_x + ctx.measureText(text).width + 12 + stave.options.vertical_bar_width + 12);
-      // DS_AL_CODA draws in the next measure without this x_shift, not sure why for this symbol specifically.
+      // TO_CODA and DS_AL_CODA draw in the next measure without this x_shift, not sure why not for other symbols.
       text_x = this.x + this.x_shift + stave.options.vertical_bar_width;
       symbol_x = text_x + ctx.measureText(text).width + 12;
     } else {

+ 455 - 0
test/data/test_staverepetitions_coda_etc_positioning.musicxml

@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN"
+  "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <work>
+    <work-title>Test - StaveRepetitions (Coda etc)</work-title>
+  </work>
+  <identification>
+    <creator type="composer"/>
+    <creator type="lyricist"/>
+    <rights/>
+    <encoding>
+      <software>Noteflight version 0.3.2</software>
+      <encoding-date>2013-06-03</encoding-date>
+      <supports attribute="new-system" element="print" type="no" value="no"/>
+      <supports attribute="new-page" element="print" type="no" value="no"/>
+    </encoding>
+  </identification>
+  <defaults>
+    <scaling>
+      <millimeters>2.1166666679999997</millimeters>
+      <tenths>10</tenths>
+    </scaling>
+    <page-layout>
+      <page-height>1320</page-height>
+      <page-width>1020</page-width>
+      <page-margins type="both">
+        <left-margin>59.583333333333336</left-margin>
+        <right-margin>56.66666666666667</right-margin>
+        <top-margin>96.66666666666667</top-margin>
+        <bottom-margin>80</bottom-margin>
+      </page-margins>
+    </page-layout>
+    <system-layout>
+      <system-margins>
+        <left-margin>59.583333333333336</left-margin>
+        <right-margin>26.666666666666668</right-margin>
+      </system-margins>
+      <system-distance>92.5</system-distance>
+      <top-system-distance>145.83333333333334</top-system-distance>
+    </system-layout>
+    <staff-layout>
+      <staff-distance>55</staff-distance>
+    </staff-layout>
+  </defaults>
+  <part-list>
+    <score-part id="P1">
+      <part-name>Piano</part-name>
+      <part-abbreviation>Pno</part-abbreviation>
+      <score-instrument id="P1I1">
+        <instrument-name>Piano</instrument-name>
+      </score-instrument>
+      <midi-instrument id="P1I1">
+        <midi-channel>1</midi-channel>
+        <midi-program>1</midi-program>
+      </midi-instrument>
+    </score-part>
+  </part-list>
+  <part id="P1">
+    <measure number="1">
+      <attributes>
+        <divisions>64</divisions>
+        <key>
+          <fifths>0</fifths>
+          <mode>major</mode>
+        </key>
+        <time>
+          <beats>4</beats>
+          <beat-type>4</beat-type>
+        </time>
+        <staves>2</staves>
+        <clef number="1">
+          <sign>G</sign>
+          <line>2</line>
+        </clef>
+      </attributes>
+      <direction placement="above">
+        <direction-type>
+          <metronome>
+            <beat-unit>quarter</beat-unit>
+            <per-minute>120</per-minute>
+          </metronome>
+        </direction-type>
+        <sound tempo="120"/>
+      </direction>
+      <direction placement="above">
+        <direction-type>
+          <metronome>
+            <beat-unit>quarter</beat-unit>
+            <per-minute>120</per-minute>
+          </metronome>
+        </direction-type>
+        <sound tempo="120"/>
+      </direction>
+      <direction placement="above">
+        <direction-type>
+          <segno/>
+        </direction-type>
+      </direction>
+      <note>
+            <pitch>
+                <step>A</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="start" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>F</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="stop" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>F</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="start" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>A</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="stop" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+    </measure>
+    <measure number="2">
+      <attributes/>
+      <direction placement="above">
+        <direction-type>
+          <words>to coda</words>
+        </direction-type>
+      </direction>
+      <note>
+            <pitch>
+                <step>A</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="start" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>F</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="stop" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>F</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="start" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>A</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="stop" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+      <backup>
+        <duration>256</duration>
+      </backup>
+      <attributes/>
+      <note>
+        <rest/>
+        <duration>256</duration>
+        <voice>3</voice>
+        <type>whole</type>
+        <staff>2</staff>
+      </note>
+    </measure>
+    <measure number="3">
+      <attributes/>
+      <note>
+            <pitch>
+                <step>A</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="start" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>F</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="stop" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>F</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="start" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+        <note>
+            <pitch>
+                <step>A</step>
+                <octave>4</octave>
+            </pitch>
+            <duration>64</duration>
+            <voice>1</voice>
+            <type>quarter</type>
+            <staff>1</staff>
+            <notations>
+                <slur color="#000000" type="stop" orientation="under" placement="below" />
+            </notations>
+            <lyric number="part1verse1" color="#000000">
+                <syllabic>single</syllabic>
+                <text>test</text>
+            </lyric>
+        </note>
+      <direction placement="above">
+        <direction-type>
+          <words>D.S. al Coda</words>
+        </direction-type>
+      </direction>
+      <backup>
+        <duration>256</duration>
+      </backup>
+      <attributes/>
+      <note>
+        <rest/>
+        <duration>256</duration>
+        <voice>3</voice>
+        <type>whole</type>
+        <staff>2</staff>
+      </note>
+    </measure>
+    <measure number="4">
+      <attributes/>
+      <direction placement="above">
+        <direction-type>
+          <coda/>
+        </direction-type>
+      </direction>
+      <note>
+        <pitch>
+          <step>A</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>64</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <staff>1</staff>
+        <notations>
+            <slur color="#000000" type="start" orientation="under" placement="below" />
+        </notations>
+        <lyric number="part1verse1" color="#000000">
+            <syllabic>single</syllabic>
+            <text>test</text>
+        </lyric>
+      </note>
+      <note>
+        <pitch>
+          <step>F</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>64</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <staff>1</staff>
+        <notations>
+            <slur color="#000000" type="stop" orientation="under" placement="below" />
+        </notations>
+        <lyric number="part1verse1" color="#000000">
+            <syllabic>single</syllabic>
+            <text>test</text>
+        </lyric>
+      </note>
+      <note>
+        <pitch>
+          <step>F</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>64</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <staff>1</staff>
+        <notations>
+            <slur color="#000000" type="start" orientation="under" placement="below" />
+        </notations>
+        <lyric number="part1verse1" color="#000000">
+            <syllabic>single</syllabic>
+            <text>test</text>
+        </lyric>
+      </note>
+      <note>
+        <pitch>
+          <step>A</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>64</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <staff>1</staff>
+        <notations>
+            <slur color="#000000" type="stop" orientation="under" placement="below" />
+        </notations>
+        <lyric number="part1verse1" color="#000000">
+            <syllabic>single</syllabic>
+            <text>test</text>
+        </lyric>
+      </note>
+      <backup>
+        <duration>256</duration>
+      </backup>
+      <attributes/>
+      <note>
+        <rest/>
+        <duration>256</duration>
+        <voice>3</voice>
+        <type>whole</type>
+        <staff>2</staff>
+      </note>
+    </measure>
+    <measure number="5">
+      <attributes/>
+      <note>
+        <rest/>
+        <duration>256</duration>
+        <voice>1</voice>
+        <type>whole</type>
+        <staff>1</staff>
+      </note>
+      <backup>
+        <duration>256</duration>
+      </backup>
+      <attributes/>
+      <note>
+        <rest/>
+        <duration>256</duration>
+        <voice>3</voice>
+        <type>whole</type>
+        <staff>2</staff>
+      </note>
+      <barline location="right">
+        <bar-style>light-heavy</bar-style>
+      </barline>
+    </measure>
+  </part>
+</score-partwise>