Benjamin Giesinger 7 роки тому
батько
коміт
a274dcdb3e

+ 9 - 0
external/vexflow/vexflow.d.ts

@@ -69,6 +69,15 @@ declare namespace Vex {
         export class Note extends Tickable {
         }
 
+        export class TextBracket {
+            constructor(note_struct: any);
+            
+            public setContext(ctx: RenderContext): TextBracket;
+
+            public draw(): void;
+
+        }
+
         export class Stem {
             public static UP: number;
             public static DOWN: number;

+ 4 - 21
src/MusicalScore/Graphical/MusicSheetDrawer.ts

@@ -22,7 +22,6 @@ import {MusicSymbol} from "./MusicSymbol";
 import {GraphicalMusicPage} from "./GraphicalMusicPage";
 import {Instrument} from "../Instrument";
 import {MusicSymbolDrawingStyle, PhonicScoreModes} from "./DrawingMode";
-import {GraphicalOctaveShift} from "./GraphicalOctaveShift";
 import {GraphicalObject} from "./GraphicalObject";
 
 /**
@@ -338,6 +337,8 @@ export abstract class MusicSheetDrawer {
         if (staffLine.LyricsDashes.length > 0) {
             this.drawDashes(staffLine.LyricsDashes);
         }
+
+        this.drawOctaveShifts(staffLine);
     }
 
     /**
@@ -353,26 +354,8 @@ export abstract class MusicSheetDrawer {
     //
     // }
 
-    protected drawOctaveShift(staffLine: StaffLine, graphicalOctaveShift: GraphicalOctaveShift): void {
-        this.drawSymbol(graphicalOctaveShift.octaveSymbol, MusicSymbolDrawingStyle.Normal, graphicalOctaveShift.PositionAndShape.AbsolutePosition);
-        const absolutePos: PointF2D = staffLine.PositionAndShape.AbsolutePosition;
-        if (graphicalOctaveShift.dashesStart.x < graphicalOctaveShift.dashesEnd.x) {
-            const horizontalLine: GraphicalLine = new GraphicalLine(graphicalOctaveShift.dashesStart, graphicalOctaveShift.dashesEnd,
-                                                                    this.rules.OctaveShiftLineWidth);
-            this.drawLineAsHorizontalRectangleWithOffset(horizontalLine, absolutePos, <number>GraphicalLayers.Notes);
-        }
-        if (!graphicalOctaveShift.endsOnDifferentStaffLine || graphicalOctaveShift.isSecondPart) {
-            let verticalLine: GraphicalLine;
-            const dashEnd: PointF2D = graphicalOctaveShift.dashesEnd;
-            const octShiftVertLineLength: number = this.rules.OctaveShiftVerticalLineLength;
-            const octShiftLineWidth: number = this.rules.OctaveShiftLineWidth;
-            if (graphicalOctaveShift.octaveSymbol === MusicSymbol.VA8 || graphicalOctaveShift.octaveSymbol === MusicSymbol.MA15) {
-                verticalLine = new GraphicalLine(dashEnd, new PointF2D(dashEnd.x, dashEnd.y + octShiftVertLineLength), octShiftLineWidth);
-            } else {
-                verticalLine = new GraphicalLine(new PointF2D(dashEnd.x, dashEnd.y - octShiftVertLineLength), dashEnd, octShiftLineWidth);
-            }
-            this.drawLineAsVerticalRectangleWithOffset(verticalLine, absolutePos, <number>GraphicalLayers.Notes);
-        }
+    protected drawOctaveShifts(staffLine: StaffLine): void {
+        return;
     }
 
     protected drawStaffLines(staffLine: StaffLine): void {

+ 10 - 0
src/MusicalScore/Graphical/StaffLine.ts

@@ -9,6 +9,7 @@ import {MusicSystem} from "./MusicSystem";
 import {StaffLineActivitySymbol} from "./StaffLineActivitySymbol";
 import {PointF2D} from "../../Common/DataObjects/PointF2D";
 import {GraphicalLabel} from "./GraphicalLabel";
+import { GraphicalOctaveShift } from "./GraphicalOctaveShift";
 
 /**
  * A StaffLine contains the [[Measure]]s in one line of the music sheet
@@ -21,6 +22,7 @@ export abstract class StaffLine extends GraphicalObject {
     protected parentStaff: Staff;
     protected skyLine: number[];
     protected bottomLine: number[];
+    protected octaveShifts: GraphicalOctaveShift[] = [];
     protected lyricLines: GraphicalLine[] = [];
     protected lyricsDashes: GraphicalLabel[] = [];
 
@@ -100,6 +102,14 @@ export abstract class StaffLine extends GraphicalObject {
         this.bottomLine = value;
     }
 
+    public get OctaveShifts(): GraphicalOctaveShift[] {
+        return this.octaveShifts;
+    }
+
+    public set OctaveShifts(value: GraphicalOctaveShift[]) {
+        this.octaveShifts = value;
+    }
+
     public addActivitySymbolClickArea(): void {
         const activitySymbol: StaffLineActivitySymbol = new StaffLineActivitySymbol(this);
         const staffLinePsi: BoundingBox = this.PositionAndShape;

+ 1 - 1
src/MusicalScore/Graphical/VexFlow/VexFlowConverter.ts

@@ -104,7 +104,7 @@ export class VexFlowConverter {
      */
     public static pitch(pitch: Pitch, clef: ClefInstruction): [string, string, ClefInstruction] {
         const fund: string = NoteEnum[pitch.FundamentalNote].toLowerCase();
-        // The octave seems to need a shift of three FIXME?
+        // FIXME: The octave seems to need a shift of three?
         const octave: number = pitch.Octave - clef.OctaveOffset + 3;
         const acc: string = VexFlowConverter.accidental(pitch.Accidental);
         return [fund + "n/" + octave, acc, clef];

+ 6 - 2
src/MusicalScore/Graphical/VexFlow/VexFlowGraphicalNote.ts

@@ -5,7 +5,7 @@ import {ClefInstruction} from "../../VoiceData/Instructions/ClefInstruction";
 import {VexFlowConverter} from "./VexFlowConverter";
 import {Pitch} from "../../../Common/DataObjects/Pitch";
 import {Fraction} from "../../../Common/DataObjects/Fraction";
-import {OctaveEnum} from "../../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
+import {OctaveEnum, OctaveShift} from "../../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
 import { GraphicalVoiceEntry } from "../GraphicalVoiceEntry";
 
 /**
@@ -16,12 +16,16 @@ export class VexFlowGraphicalNote extends GraphicalNote {
                 octaveShift: OctaveEnum = OctaveEnum.NONE,  graphicalNoteLength: Fraction = undefined) {
         super(note, parent, graphicalNoteLength);
         this.clef = activeClef;
+        this.octaveShift = octaveShift;
         if (note.Pitch) {
-            this.vfpitch = VexFlowConverter.pitch(note.Pitch, this.clef);
+            // TODO: Maybe shift to Transpose function when available
+            const drawPitch: Pitch = OctaveShift.getPitchFromOctaveShift(note.Pitch, octaveShift);
+            this.vfpitch = VexFlowConverter.pitch(drawPitch, this.clef);
             this.vfpitch[1] = undefined;
         }
     }
 
+    public octaveShift: OctaveEnum;
     // The pitch of this note as given by VexFlowConverter.pitch
     public vfpitch: [string, string, ClefInstruction];
     // The corresponding VexFlow StaveNote (plus its index in the chord)

+ 32 - 3
src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetCalculator.ts

@@ -14,7 +14,7 @@ import {MultiExpression} from "../../VoiceData/Expressions/MultiExpression";
 import {RepetitionInstruction} from "../../VoiceData/Instructions/RepetitionInstruction";
 import {Beam} from "../../VoiceData/Beam";
 import {ClefInstruction} from "../../VoiceData/Instructions/ClefInstruction";
-import {OctaveEnum} from "../../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
+import {OctaveEnum, OctaveShift} from "../../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
 import {Fraction} from "../../../Common/DataObjects/Fraction";
 import {LyricWord} from "../../VoiceData/Lyrics/LyricsWord";
 import {OrnamentContainer} from "../../VoiceData/OrnamentContainer";
@@ -22,7 +22,6 @@ import {ArticulationEnum} from "../../VoiceData/VoiceEntry";
 import {Tuplet} from "../../VoiceData/Tuplet";
 import {VexFlowMeasure} from "./VexFlowMeasure";
 import {VexFlowTextMeasurer} from "./VexFlowTextMeasurer";
-
 import Vex = require("vexflow");
 import * as log from "loglevel";
 import {unitInPixels} from "./VexFlowMusicSheetDrawer";
@@ -33,6 +32,7 @@ import {GraphicalLabel} from "../GraphicalLabel";
 import {LyricsEntry} from "../../VoiceData/Lyrics/LyricsEntry";
 import {GraphicalLyricWord} from "../GraphicalLyricWord";
 import {VexFlowStaffEntry} from "./VexFlowStaffEntry";
+import { VexFlowOctaveShift } from "./VexFlowOctaveShift";
 
 export class VexFlowMusicSheetCalculator extends MusicSheetCalculator {
 
@@ -272,7 +272,36 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator {
      * @param staffIndex
      */
   protected calculateSingleOctaveShift(sourceMeasure: SourceMeasure, multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void {
-    return;
+    // calculate absolute Timestamp and startStaffLine (and EndStaffLine if needed)
+    const octaveShift: OctaveShift = multiExpression.OctaveShiftStart;
+
+    const startTimeStamp: Fraction = octaveShift.ParentStartMultiExpression.Timestamp;
+    const endTimeStamp: Fraction = octaveShift.ParentEndMultiExpression.Timestamp;
+
+    const startStaffLine: StaffLine = this.graphicalMusicSheet.MeasureList[measureIndex][staffIndex].ParentStaffLine;
+
+    let endMeasure: StaffMeasure = undefined;
+    if (octaveShift.ParentEndMultiExpression !== undefined) {
+        endMeasure = this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(octaveShift.ParentEndMultiExpression.SourceMeasureParent,
+                                                                                           staffIndex);
+    }
+    let startMeasure: StaffMeasure = undefined;
+    if (octaveShift.ParentEndMultiExpression !== undefined) {
+      startMeasure = this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(octaveShift.ParentStartMultiExpression.SourceMeasureParent,
+                                                                                           staffIndex);
+    }
+    if (endMeasure !== undefined) {
+        // calculate GraphicalOctaveShift and RelativePositions
+        const graphicalOctaveShift: VexFlowOctaveShift = new VexFlowOctaveShift(octaveShift, startStaffLine.PositionAndShape);
+        startStaffLine.OctaveShifts.push(graphicalOctaveShift);
+
+        // calculate RelativePosition and Dashes
+        const startStaffEntry: GraphicalStaffEntry = startMeasure.findGraphicalStaffEntryFromTimestamp(startTimeStamp);
+        const endStaffEntry: GraphicalStaffEntry = endMeasure.findGraphicalStaffEntryFromTimestamp(endTimeStamp);
+
+        graphicalOctaveShift.setStartNote(startStaffEntry);
+        graphicalOctaveShift.setEndNote(endStaffEntry);
+    }
   }
 
     /**

+ 15 - 0
src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetDrawer.ts

@@ -1,3 +1,4 @@
+import Vex = require("vexflow");
 import {MusicSheetDrawer} from "../MusicSheetDrawer";
 import {RectangleF2D} from "../../../Common/DataObjects/RectangleF2D";
 import {VexFlowMeasure} from "./VexFlowMeasure";
@@ -12,6 +13,9 @@ import {VexFlowBackend} from "./VexFlowBackend";
 import { VexFlowInstrumentBracket } from "./VexFlowInstrumentBracket";
 import { VexFlowInstrumentBrace } from "./VexFlowInstrumentBrace";
 import { GraphicalLyricEntry } from "../GraphicalLyricEntry";
+import { StaffLine } from "../StaffLine";
+import { GraphicalOctaveShift } from "../GraphicalOctaveShift";
+import { VexFlowOctaveShift } from "./VexFlowOctaveShift";
 
 /**
  * This is a global constant which denotes the height in pixels of the space between two lines of the stave
@@ -120,6 +124,17 @@ export class VexFlowMusicSheetDrawer extends MusicSheetDrawer {
         vexBrace.draw(this.backend.getContext());
     }
 
+    protected drawOctaveShifts(staffLine: StaffLine): void {
+        for (const graphicalOctaveShift of staffLine.OctaveShifts) {
+            if (graphicalOctaveShift) {
+                const ctx: Vex.Flow.RenderContext = this.backend.getContext();
+                const textBracket: Vex.Flow.TextBracket = (graphicalOctaveShift as VexFlowOctaveShift).getTextBracket();
+                textBracket.setContext(ctx);
+                textBracket.draw();
+            }
+        }
+    }
+
     /**
      * Renders a Label to the screen (e.g. Title, composer..)
      * @param graphicalLabel holds the label string, the text height in units and the font parameters

+ 88 - 0
src/MusicalScore/Graphical/VexFlow/VexFlowOctaveShift.ts

@@ -0,0 +1,88 @@
+import Vex = require("vexflow");
+import { GraphicalOctaveShift } from "../GraphicalOctaveShift";
+import { OctaveShift, OctaveEnum } from "../../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
+import { BoundingBox } from "../BoundingBox";
+import { GraphicalStaffEntry } from "../GraphicalStaffEntry";
+import { VexFlowVoiceEntry } from "./VexFlowVoiceEntry";
+import * as log from "loglevel";
+
+/**
+ * The vexflow adaptation of a graphical shift.
+ */
+export class VexFlowOctaveShift extends GraphicalOctaveShift {
+
+    /** Defines the note where the octave shift starts */
+    private startNote: Vex.Flow.StemmableNote;
+    /** Defines the note where the octave shift ends */
+    private endNote: Vex.Flow.StemmableNote;
+    /** Top or bottom of the staffline */
+    private position: string;
+    /** Supscript is a smaller text after the regular text (e.g. va after 8) */
+    private supscript: string;
+    /** Main text element */
+    private text: string;
+
+    /**
+     * Create a new vexflow ocatve shift
+     * @param octaveShift the object read by the ExpressionReader
+     * @param parent the bounding box of the parent
+     */
+    constructor(octaveShift: OctaveShift, parent: BoundingBox) {
+        super(octaveShift, parent);
+        switch (octaveShift.Type) {
+            case OctaveEnum.VA8:
+                this.position = "top";
+                this.supscript = "va";
+                this.text = "8";
+                break;
+                case OctaveEnum.MA15:
+                this.position = "top";
+                this.supscript = "ma";
+                this.text = "15";
+                break;
+                case OctaveEnum.VB8:
+                this.position = "bottom";
+                this.supscript = "vb";
+                this.text = "8";
+                break;
+                case OctaveEnum.MB15:
+                this.position = "bottom";
+                this.supscript = "mb";
+                this.text = "15";
+                break;
+            default:
+                log.error("Unknown or NONE octaveshift. This should not be called!");
+                break;
+        }
+    }
+
+    /**
+     * Set a start note using a staff entry
+     * @param graphicalStaffEntry the staff entry that holds the start note
+     */
+    public setStartNote(graphicalStaffEntry: GraphicalStaffEntry): void {
+        this.startNote = (graphicalStaffEntry.graphicalVoiceEntries[0] as VexFlowVoiceEntry).vfStaveNote;
+    }
+
+    /**
+     * Set an end note using a staff entry
+     * @param graphicalStaffEntry the staff entry that holds the end note
+     */
+    public setEndNote(graphicalStaffEntry: GraphicalStaffEntry): void {
+        this.endNote = (graphicalStaffEntry.graphicalVoiceEntries[0] as VexFlowVoiceEntry).vfStaveNote;
+    }
+
+    /**
+     * Get the actual vexflow text bracket used for drawing
+     */
+    public getTextBracket(): Vex.Flow.TextBracket {
+        return new Vex.Flow.TextBracket({
+            position: this.position,
+            start: this.startNote,
+            stop: this.endNote,
+            superscript: this.supscript,
+            text: this.text,
+        });
+    }
+
+}

+ 29 - 0
src/MusicalScore/VoiceData/Expressions/ContinuousExpressions/OctaveShift.ts

@@ -1,4 +1,5 @@
 import {MultiExpression} from "../MultiExpression";
+import { Pitch } from "../../../../Common/DataObjects/Pitch";
 
 export class OctaveShift {
     constructor(type: string, octave: number) {
@@ -48,6 +49,34 @@ export class OctaveShift {
             this.octaveValue = OctaveEnum.NONE;
         }
     }
+
+    /**
+     * Convert a source (XML) pitch of a note to the pitch needed to draw. E.g. 8va would draw +1 octave so we reduce by 1
+     * @param pitch Original pitch
+     * @param octaveShiftValue octave shift
+     * @returns New pitch with corrected octave shift
+     */
+    public static getPitchFromOctaveShift(pitch: Pitch, octaveShiftValue: OctaveEnum): Pitch {
+        let result: number = pitch.Octave;
+        switch (octaveShiftValue) {
+            case OctaveEnum.VA8:
+                result -= 1;
+                break;
+            case OctaveEnum.VB8:
+                result += 1;
+                break;
+            case OctaveEnum.MA15:
+                result -= 2;
+                break;
+            case OctaveEnum.MB15:
+                result += 2;
+                break;
+            case OctaveEnum.NONE:
+            default:
+                result += 0;
+        }
+        return new Pitch(pitch.FundamentalNote, result, pitch.Accidental);
+    }
 }
 
 export enum OctaveEnum {

+ 1 - 1
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

@@ -175,7 +175,7 @@ export class OpenSheetMusicDisplay {
     public setLogLevel(level: string): void {
         switch (level) {
             case "trace":
-                log.setLevel(log.levels.WARN);
+                log.setLevel(log.levels.TRACE);
                 break;
             case "debug":
                 log.setLevel(log.levels.DEBUG);

+ 375 - 0
test/data/visual_compare/Expression_Test.musicxml

@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="3.1">
+  <work>
+    <work-title>Expression Test</work-title>
+    </work>
+  <identification>
+    <encoding>
+      <software>MuseScore 2.2.1</software>
+      <encoding-date>2018-06-04</encoding-date>
+      <supports element="accidental" type="yes"/>
+      <supports element="beam" type="yes"/>
+      <supports element="print" attribute="new-page" type="yes" value="yes"/>
+      <supports element="print" attribute="new-system" type="yes" value="yes"/>
+      <supports element="stem" type="yes"/>
+      </encoding>
+    </identification>
+  <defaults>
+    <scaling>
+      <millimeters>7.05556</millimeters>
+      <tenths>40</tenths>
+      </scaling>
+    <page-layout>
+      <page-height>1683.36</page-height>
+      <page-width>1190.88</page-width>
+      <page-margins type="even">
+        <left-margin>56.6929</left-margin>
+        <right-margin>56.6929</right-margin>
+        <top-margin>56.6929</top-margin>
+        <bottom-margin>113.386</bottom-margin>
+        </page-margins>
+      <page-margins type="odd">
+        <left-margin>56.6929</left-margin>
+        <right-margin>56.6929</right-margin>
+        <top-margin>56.6929</top-margin>
+        <bottom-margin>113.386</bottom-margin>
+        </page-margins>
+      </page-layout>
+    <word-font font-family="FreeSerif" font-size="10"/>
+    <lyric-font font-family="FreeSerif" font-size="11"/>
+    </defaults>
+  <credit page="1">
+    <credit-words default-x="595.44" default-y="1626.67" justify="center" valign="top" font-size="24">Expression Test</credit-words>
+    </credit>
+  <part-list>
+    <score-part id="P1">
+      <part-name>Klavier</part-name>
+      <part-abbreviation>Klav.</part-abbreviation>
+      <score-instrument id="P1-I1">
+        <instrument-name>Klavier</instrument-name>
+        </score-instrument>
+      <midi-device id="P1-I1" port="1"></midi-device>
+      <midi-instrument id="P1-I1">
+        <midi-channel>1</midi-channel>
+        <midi-program>1</midi-program>
+        <volume>78.7402</volume>
+        <pan>0</pan>
+        </midi-instrument>
+      </score-part>
+    </part-list>
+  <part id="P1">
+    <measure number="1" width="257.52">
+      <print>
+        <system-layout>
+          <system-margins>
+            <left-margin>-0.00</left-margin>
+            <right-margin>0.00</right-margin>
+            </system-margins>
+          <top-system-distance>170.00</top-system-distance>
+          </system-layout>
+        </print>
+      <attributes>
+        <divisions>1</divisions>
+        <key>
+          <fifths>0</fifths>
+          </key>
+        <time>
+          <beats>4</beats>
+          <beat-type>4</beat-type>
+          </time>
+        <clef>
+          <sign>G</sign>
+          <line>2</line>
+          </clef>
+        </attributes>
+      <direction placement="below">
+        <direction-type>
+          <dynamics default-x="6.58" default-y="-80.00">
+            <ppp/>
+            </dynamics>
+          </direction-type>
+        <sound dynamics="17.78"/>
+        </direction>
+      <direction placement="above">
+        <direction-type>
+          <octave-shift type="down" size="8" number="1" default-y="30.00"/>
+          </direction-type>
+        </direction>
+      <note default-x="75.17" default-y="-50.00">
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="120.36" default-y="-45.00">
+        <pitch>
+          <step>D</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <direction placement="below">
+        <direction-type>
+          <dynamics default-x="6.58" default-y="-80.00">
+            <p/>
+            </dynamics>
+          </direction-type>
+        <sound dynamics="54.44"/>
+        </direction>
+      <note default-x="165.55" default-y="-40.00">
+        <pitch>
+          <step>E</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="210.73" default-y="-35.00">
+        <pitch>
+          <step>F</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      </measure>
+    <measure number="2" width="202.74">
+      <direction placement="below">
+        <direction-type>
+          <dynamics default-x="6.58" default-y="-80.00">
+            <fff/>
+            </dynamics>
+          </direction-type>
+        <sound dynamics="140.00"/>
+        </direction>
+      <note default-x="12.00" default-y="-50.00">
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="59.29" default-y="-45.00">
+        <pitch>
+          <step>D</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <direction placement="below">
+        <direction-type>
+          <dynamics default-x="6.58" default-y="-80.00">
+            <f/>
+            </dynamics>
+          </direction-type>
+        <sound dynamics="106.67"/>
+        </direction>
+      <note default-x="106.57" default-y="-40.00">
+        <pitch>
+          <step>E</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="153.86" default-y="-35.00">
+        <pitch>
+          <step>F</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <direction placement="above">
+        <direction-type>
+          <octave-shift type="stop" size="8" number="1"/>
+          </direction-type>
+        </direction>
+      </measure>
+    <measure number="3" width="202.74">
+      <direction placement="below">
+        <direction-type>
+          <octave-shift type="up" size="8" number="1" default-y="-79.41"/>
+          </direction-type>
+        </direction>
+      <note default-x="12.00" default-y="-50.00">
+        <pitch>
+          <step>C</step>
+          <octave>3</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="59.29" default-y="-45.00">
+        <pitch>
+          <step>D</step>
+          <octave>3</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="106.57" default-y="-40.00">
+        <pitch>
+          <step>E</step>
+          <octave>3</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="153.86" default-y="-35.00">
+        <pitch>
+          <step>F</step>
+          <octave>3</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <direction placement="below">
+        <direction-type>
+          <octave-shift type="stop" size="8" number="1"/>
+          </direction-type>
+        </direction>
+      </measure>
+    <measure number="4" width="202.74">
+      <direction placement="below">
+        <direction-type>
+          <wedge type="diminuendo" number="1" default-y="-75.43" relative-x="-1.43"/>
+          </direction-type>
+        </direction>
+      <note default-x="12.00" default-y="-15.00">
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>down</stem>
+        </note>
+      <note default-x="59.29" default-y="-20.00">
+        <pitch>
+          <step>B</step>
+          <octave>4</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>down</stem>
+        </note>
+      <note default-x="106.57" default-y="-25.00">
+        <pitch>
+          <step>A</step>
+          <octave>4</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="153.86" default-y="-30.00">
+        <pitch>
+          <step>G</step>
+          <octave>4</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <direction placement="below">
+        <direction-type>
+          <wedge type="stop" number="1" relative-x="-1.43"/>
+          </direction-type>
+        </direction>
+      </measure>
+    <measure number="5" width="211.74">
+      <barline location="left">
+        <ending number="1" type="start" default-y="28.57"/>
+        </barline>
+      <direction placement="below">
+        <direction-type>
+          <wedge type="crescendo" number="1" default-y="-75.00"/>
+          </direction-type>
+        </direction>
+      <note default-x="12.00" default-y="-15.00">
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>down</stem>
+        </note>
+      <note default-x="59.29" default-y="-20.00">
+        <pitch>
+          <step>B</step>
+          <octave>4</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>down</stem>
+        </note>
+      <note default-x="106.57" default-y="-25.00">
+        <pitch>
+          <step>A</step>
+          <octave>4</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <note default-x="153.86" default-y="-30.00">
+        <pitch>
+          <step>G</step>
+          <octave>4</octave>
+          </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+        <stem>up</stem>
+        </note>
+      <direction placement="below">
+        <direction-type>
+          <wedge type="stop" number="1"/>
+          </direction-type>
+        </direction>
+      <barline location="right">
+        <bar-style>light-heavy</bar-style>
+        <ending number="1" type="discontinue"/>
+        </barline>
+      </measure>
+    </part>
+  </score-partwise>