Browse Source

Reverted occurences of isStringInStringList

Andrea Condoluci 9 years ago
parent
commit
31c65ea0c8

+ 3 - 3
src/MusicalScore/ScoreIO/InstrumentReader.ts

@@ -421,7 +421,7 @@ export class InstrumentReader {
       first.FirstInstructionsStaffEntries[staffIndex] = firstStaffEntry;
     } else {
       firstStaffEntry = first.FirstInstructionsStaffEntries[staffIndex];
-      firstStaffEntry.removeFirstInstructionOfType<ClefInstruction>();
+      firstStaffEntry.removeFirstInstructionOfTypeClefInstruction();
     }
     clefInstruction.Parent = firstStaffEntry;
     firstStaffEntry.Instructions.splice(0, 0, clefInstruction);
@@ -444,7 +444,7 @@ export class InstrumentReader {
       } else {
         let firstStaffEntry: SourceStaffEntry = first.FirstInstructionsStaffEntries[j];
         keyInstruction.Parent = firstStaffEntry;
-        firstStaffEntry.removeFirstInstructionOfType<KeyInstruction>();
+        firstStaffEntry.removeFirstInstructionOfTypeKeyInstruction();
         if (firstStaffEntry.Instructions[0] instanceof ClefInstruction) {
           firstStaffEntry.Instructions.splice(1, 0, keyInstruction);
         } else {
@@ -806,7 +806,7 @@ export class InstrumentReader {
               } else {
                 firstStaffEntry = sourceMeasure.FirstInstructionsStaffEntries[j];
                 newKeyInstruction.Parent = firstStaffEntry;
-                firstStaffEntry.removeFirstInstructionOfType<KeyInstruction>();
+                firstStaffEntry.removeFirstInstructionOfTypeKeyInstruction();
                 if (firstStaffEntry.Instructions.length === 0) {
                   firstStaffEntry.Instructions.Add(newKeyInstruction);
                 } else {

+ 2 - 2
src/MusicalScore/ScoreIO/MusicSheetReader.ts

@@ -249,7 +249,7 @@ export class MusicSheetReader /*implements IMusicSheetReader*/ {
           this.currentMeasure.FirstInstructionsStaffEntries[i] !== undefined &&
           !(this._lastElement(this.currentMeasure.FirstInstructionsStaffEntries[i].Instructions) instanceof RhythmInstruction)
         ) {
-          this.currentMeasure.FirstInstructionsStaffEntries[i].removeAllInstructionsOfType<RhythmInstruction>();
+          this.currentMeasure.FirstInstructionsStaffEntries[i].removeAllInstructionsOfTypeRhythmInstruction();
           this.currentMeasure.FirstInstructionsStaffEntries[i].Instructions.push(rhythmInstruction.clone());
         }
         if (this.currentMeasure.FirstInstructionsStaffEntries[i] === undefined) {
@@ -268,7 +268,7 @@ export class MusicSheetReader /*implements IMusicSheetReader*/ {
         if (this.currentMeasure.FirstInstructionsStaffEntries[i] === undefined) {
           this.currentMeasure.FirstInstructionsStaffEntries[i] = new SourceStaffEntry(undefined, undefined);
         } else {
-          this.currentMeasure.FirstInstructionsStaffEntries[i].removeAllInstructionsOfType<RhythmInstruction>();
+          this.currentMeasure.FirstInstructionsStaffEntries[i].removeAllInstructionsOfTypeRhythmInstruction();
         }
         this.currentMeasure.FirstInstructionsStaffEntries[i].Instructions.push(rhythmInstruction);
       }

+ 19 - 20
src/MusicalScore/VoiceData/Expressions/ContinuousExpressions/continuousDynamicExpression.ts

@@ -1,6 +1,7 @@
 import {PlacementEnum, AbstractExpression} from "../abstractExpression";
 import {MultiExpression} from "../multiExpression";
 import {Fraction} from "../../../../Common/DataObjects/fraction";
+import {AbstractTempoExpression} from "../abstractTempoExpression";
 
 export class ContinuousDynamicExpression extends AbstractExpression {
     //constructor(placement: PlacementEnum, staffNumber: number, label: string) {
@@ -20,6 +21,7 @@ export class ContinuousDynamicExpression extends AbstractExpression {
         this.startVolume = -1;
         this.endVolume = -1;
     }
+    
     private static listContinuousDynamicIncreasing: string[] = ["crescendo", "cresc", "cresc.", "cres."];
     private static listContinuousDynamicDecreasing: string[] = ["decrescendo", "decresc", "decr.", "diminuendo", "dim.", "dim"];
     // private static listContinuousDynamicGeneral: string[] = ["subito","al niente","piu","meno"];
@@ -81,38 +83,35 @@ export class ContinuousDynamicExpression extends AbstractExpression {
         this.label = value;
     }
     public static isInputStringContinuousDynamic(inputString: string): boolean {
-        if (inputString == null)
-            return false;
-        if (ContinuousDynamicExpression.listContinuousDynamicIncreasing.indexOf(inputString) !== -1)
-            return true;
-        if (ContinuousDynamicExpression.listContinuousDynamicDecreasing.indexOf(inputString) !== -1)
-            return true;
-        return false;
+        if (inputString === undefined) { return false; }
+        return (
+            ContinuousDynamicExpression.isStringInStringList(ContinuousDynamicExpression.listContinuousDynamicIncreasing, inputString)
+            || ContinuousDynamicExpression.isStringInStringList(ContinuousDynamicExpression.listContinuousDynamicDecreasing, inputString)
+        );
     }
     public getInterpolatedDynamic(currentAbsoluteTimestamp: Fraction): number {
-        var continuousAbsoluteStartTimestamp: Fraction = this.StartMultiExpression.AbsoluteTimestamp;
-        var continuousAbsoluteEndTimestamp: Fraction;
-        if (this.EndMultiExpression != null)
+        let continuousAbsoluteStartTimestamp: Fraction = this.StartMultiExpression.AbsoluteTimestamp;
+        let continuousAbsoluteEndTimestamp: Fraction;
+        if (this.EndMultiExpression !== undefined) {
             continuousAbsoluteEndTimestamp = this.EndMultiExpression.AbsoluteTimestamp;
-        else {
+        } else {
             continuousAbsoluteEndTimestamp = Fraction.plus(this.startMultiExpression.SourceMeasureParent.AbsoluteTimestamp, this.startMultiExpression.SourceMeasureParent.Duration);
         }
-        if (currentAbsoluteTimestamp < continuousAbsoluteStartTimestamp)
-            return -1;
-        if (currentAbsoluteTimestamp > continuousAbsoluteEndTimestamp)
-            return -2;
-        var interpolationRatio: number = Fraction.minus(currentAbsoluteTimestamp, continuousAbsoluteStartTimestamp).RealValue / Fraction.minus(continuousAbsoluteEndTimestamp, continuousAbsoluteStartTimestamp).RealValue;
-        var interpolatedVolume: number = Math.max(0.0, Math.min(99.9, this.startVolume + (this.endVolume - this.startVolume) * interpolationRatio));
-        return <number>interpolatedVolume;
+        if (currentAbsoluteTimestamp.lt(continuousAbsoluteStartTimestamp)) { return -1; }
+        if (currentAbsoluteTimestamp.lt(continuousAbsoluteEndTimestamp)) { return -2; }
+        let interpolationRatio: number = Fraction.minus(currentAbsoluteTimestamp, continuousAbsoluteStartTimestamp).RealValue / Fraction.minus(continuousAbsoluteEndTimestamp, continuousAbsoluteStartTimestamp).RealValue;
+        let interpolatedVolume: number = Math.max(0.0, Math.min(99.9, this.startVolume + (this.endVolume - this.startVolume) * interpolationRatio));
+        return interpolatedVolume;
     }
     public isWedge(): boolean {
         return this.label === undefined;
     }
     private setType(): void {
-        if (ContinuousDynamicExpression.listContinuousDynamicIncreasing.indexOf(this.label) !== -1)
+        if (ContinuousDynamicExpression.isStringInStringList(ContinuousDynamicExpression.listContinuousDynamicIncreasing, this.label)) {
             this.dynamicType = ContDynamicEnum.crescendo;
-        else if (ContinuousDynamicExpression.listContinuousDynamicDecreasing.indexOf(this.label) !== -1)
+        } else if (ContinuousDynamicExpression.isStringInStringList(ContinuousDynamicExpression.listContinuousDynamicDecreasing, this.label)) {
             this.dynamicType = ContDynamicEnum.diminuendo;
+        }
     }
 }
 

+ 4 - 4
src/MusicalScore/VoiceData/Expressions/ContinuousExpressions/continuousTempoExpression.ts

@@ -48,16 +48,16 @@ export class ContinuousTempoExpression extends AbstractTempoExpression {
     public static isInputStringContinuousTempo(inputString: string): boolean {
         if (inputString == null)
             return false;
-        if (ContinuousTempoExpression.listContinuousTempoFaster.indexOf(inputString) !== -1)
+        if (ContinuousTempoExpression.isStringInStringList(ContinuousTempoExpression.listContinuousTempoFaster, inputString))
             return true;
-        if (ContinuousTempoExpression.listContinuousTempoSlower.indexOf(inputString) !== -1)
+        if (ContinuousTempoExpression.isStringInStringList(ContinuousTempoExpression.listContinuousTempoSlower, inputString))
             return true;
         return false;
     }
     private setTempoType(): void {
-        if (ContinuousTempoExpression.listContinuousTempoFaster.indexOf(this.label) !== -1)
+        if (ContinuousTempoExpression.isStringInStringList(ContinuousTempoExpression.listContinuousTempoFaster, this.label))
             this.tempoType = ContinuousTempoType.accelerando;
-        else if (ContinuousTempoExpression.listContinuousTempoSlower.indexOf(this.label) !== -1)
+        else if (ContinuousTempoExpression.isStringInStringList(ContinuousTempoExpression.listContinuousTempoSlower, this.label))
             this.tempoType = ContinuousTempoType.ritardando;
     }
     public get AbsoluteTimestamp(): Fraction {

+ 2 - 1
src/MusicalScore/VoiceData/Expressions/abstractTempoExpression.ts

@@ -8,6 +8,7 @@ export class AbstractTempoExpression {
         this.staffNumber = staffNumber;
         this.parentMultiTempoExpression = parentMultiTempoExpression;
     }
+
     protected label: string;
     protected placement: PlacementEnum;
     protected staffNumber: number;
@@ -46,4 +47,4 @@ export class AbstractTempoExpression {
     private static stringContainsSeparatedWord(str: string, word: string): boolean {
         return (str === word || str.indexOf(" " + word) !== -1 || str.indexOf(word + " ") !== -1);
     }
-}
+}

+ 1 - 1
src/MusicalScore/VoiceData/Expressions/dynamicExpressionSymbolEnum.ts

@@ -5,4 +5,4 @@ export enum DynamicExpressionSymbolEnum {
     z = 3,
     m = 4,
     r = 5
-}
+}

+ 1 - 1
src/MusicalScore/VoiceData/Expressions/instantaniousDynamicExpression.ts

@@ -94,7 +94,7 @@ export class InstantaniousDynamicExpression extends AbstractExpression {
     }
     public static isInputStringInstantaniousDynamic(inputString:string): boolean {
         if (inputString === null) { return false; }
-        return (InstantaniousDynamicExpression.listInstantaniousDynamics.indexOf(inputString) !== -1);
+        return InstantaniousDynamicExpression.isStringInStringList(InstantaniousDynamicExpression.listInstantaniousDynamics, inputString);
     }
 
     //public getInstantaniousDynamicSymbol(expressionSymbolEnum:DynamicExpressionSymbolEnum): FontInfo.MusicFontSymbol {

+ 41 - 41
src/MusicalScore/VoiceData/Expressions/instantaniousTempoExpression.ts

@@ -237,168 +237,168 @@ export class InstantaniousTempoExpression extends AbstractTempoExpression {
         if (inputString === undefined)
             return false;
         return (
-            (InstantaniousTempoExpression.listInstantaniousTempoLarghissimo.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoGrave.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoLento.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoLargo.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoLarghetto.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAdagio.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAdagietto.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAndante.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAndantino.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoModerato.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAllegretto.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAllegro.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoVivace.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoVivacissimo.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoPresto.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoPrestissimo.indexOf(inputString) !== -1)
-            || (InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral.indexOf(inputString) !== -1)
+            (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghissimo, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoGrave, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLento, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLargo, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghetto, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagio, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagietto, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndante, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndantino, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoModerato, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegretto, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegro, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivace, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivacissimo, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPresto, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPrestissimo, inputString))
+            || (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral, inputString))
         );
     }
     private setTempoAndTempoType(soundTempo: number): void {
-        if (InstantaniousTempoExpression.listInstantaniousTempoLarghissimo.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghissimo, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.larghissimo);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.larghissimo;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoGrave.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoGrave, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.grave);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.grave;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoLento.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLento, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.lento);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.lento;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoLargo.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLargo, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.largo);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.largo;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoLarghetto.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghetto, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.larghetto);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.larghetto;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAdagio.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagio, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.adagio);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.adagio;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAdagietto.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagietto, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.adagietto);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.adagietto;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.andanteModerato);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.andanteModerato;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAndante.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndante, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.andante);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.andante;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAndantino.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndantino, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.andantino);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.andantino;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoModerato.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoModerato, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.moderato);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.moderato;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAllegretto.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegretto, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegretto);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.allegretto;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegroModerato);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.allegroModerato;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAllegro.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegro, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegro);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.allegro;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoVivace.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivace, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.vivace);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.vivace;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoVivacissimo.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivacissimo, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.vivacissimo);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.vivacissimo;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegrissimo);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.allegrissimo;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoPresto.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPresto, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.presto);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.presto;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoPrestissimo.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPrestissimo, this.label)) {
             if (soundTempo === 0)
                 soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.prestissimo);
             this.tempoInBpm = soundTempo;
             this.tempoEnum = TempoEnum.prestissimo;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoAddons.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAddons, this.label)) {
             this.tempoInBpm = 0;
             this.tempoEnum = TempoEnum.addon;
             return;
         }
-        if (InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral.indexOf(this.label) !== -1) {
+        if (InstantaniousTempoExpression.isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral, this.label)) {
             this.tempoInBpm = 0;
             this.tempoEnum = TempoEnum.changes;
             return;

+ 68 - 68
src/MusicalScore/VoiceData/Expressions/moodExpression.ts

@@ -76,144 +76,144 @@ export class MoodExpression extends AbstractExpression {
     public static isInputStringMood(inputString: string): boolean {
         if (inputString == null)
             return false;
-        if (inputString === MoodExpression.listMoodAffettuoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAffettuoso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodAgitato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAgitato, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodAnimato[0] || inputString === MoodExpression.listMoodAnimato[1])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAnimato, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodAppassionato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAppassionato, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodBrillante[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodBrillante, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodCantabile[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodCantabile, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodDolce[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodDolce, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodEnergico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodEnergico, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodEroico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodEroico, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodEspressivo[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodEspressivo, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodFurioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodFurioso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodGiocoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGiocoso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodGioioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGioioso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodGrandioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGrandioso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodGrazioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGrazioso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodLacrimoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodLacrimoso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodLeggiero[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodLeggiero, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodMaestoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMaestoso, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodMalinconico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMalinconico, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodMarcato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMarcato, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodMarziale[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMarziale, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodMesto[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMesto, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodMorendo[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMorendo, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodNobilmente[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodNobilmente, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodPatetico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodPatetico, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodPesante[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodPesante, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodSaltando[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSaltando, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodSautille[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSautille, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodScherzando[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodScherzando, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodSostenuto[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSostenuto, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodSpiccato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSpiccato, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodTenerezza[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodTenerezza, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodTranquillamente[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodTranquillamente, inputString))
             return true;
-        if (inputString === MoodExpression.listMoodTrionfante[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodTrionfante, inputString))
             return true;
         return false;
     }
     private setMoodType(): void {
-        if (this.label === MoodExpression.listMoodAffettuoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAffettuoso, this.label))
             this.moodType = MoodEnum.Affettuoso;
-        if (this.label === MoodExpression.listMoodAgitato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAgitato, this.label))
             this.moodType = MoodEnum.Agitato;
-        if (this.label === MoodExpression.listMoodAnimato[0] || this.label === MoodExpression.listMoodAnimato[1])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAnimato, this.label))
             this.moodType = MoodEnum.Animato;
-        if (this.label === MoodExpression.listMoodAppassionato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodAppassionato, this.label))
             this.moodType = MoodEnum.Appassionato;
-        if (this.label === MoodExpression.listMoodBrillante[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodBrillante, this.label))
             this.moodType = MoodEnum.Brillante;
-        if (this.label === MoodExpression.listMoodCantabile[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodCantabile, this.label))
             this.moodType = MoodEnum.Cantabile;
-        if (this.label === MoodExpression.listMoodDolce[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodDolce, this.label))
             this.moodType = MoodEnum.Dolce;
-        if (this.label === MoodExpression.listMoodEnergico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodEnergico, this.label))
             this.moodType = MoodEnum.Energico;
-        if (this.label === MoodExpression.listMoodEroico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodEroico, this.label))
             this.moodType = MoodEnum.Eroico;
-        if (this.label === MoodExpression.listMoodEspressivo[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodEspressivo, this.label))
             this.moodType = MoodEnum.Espressivo;
-        if (this.label === MoodExpression.listMoodFurioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodFurioso, this.label))
             this.moodType = MoodEnum.Furioso;
-        if (this.label === MoodExpression.listMoodGiocoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGiocoso, this.label))
             this.moodType = MoodEnum.Giocoso;
-        if (this.label === MoodExpression.listMoodGioioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGioioso, this.label))
             this.moodType = MoodEnum.Gioioso;
-        if (this.label === MoodExpression.listMoodGrandioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGrandioso, this.label))
             this.moodType = MoodEnum.Grandioso;
-        if (this.label === MoodExpression.listMoodGrazioso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodGrazioso, this.label))
             this.moodType = MoodEnum.Grazioso;
-        if (this.label === MoodExpression.listMoodLacrimoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodLacrimoso, this.label))
             this.moodType = MoodEnum.Lacrimoso;
-        if (this.label === MoodExpression.listMoodLeggiero[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodLeggiero, this.label))
             this.moodType = MoodEnum.Leggiero;
-        if (this.label === MoodExpression.listMoodMaestoso[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMaestoso, this.label))
             this.moodType = MoodEnum.Maestoso;
-        if (this.label === MoodExpression.listMoodMalinconico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMalinconico, this.label))
             this.moodType = MoodEnum.Malinconico;
-        if (this.label === MoodExpression.listMoodMarcato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMarcato, this.label))
             this.moodType = MoodEnum.Marcato;
-        if (this.label === MoodExpression.listMoodMarziale[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMarziale, this.label))
             this.moodType = MoodEnum.Marziale;
-        if (this.label === MoodExpression.listMoodMesto[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMesto, this.label))
             this.moodType = MoodEnum.Mesto;
-        if (this.label === MoodExpression.listMoodMorendo[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodMorendo, this.label))
             this.moodType = MoodEnum.Morendo;
-        if (this.label === MoodExpression.listMoodNobilmente[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodNobilmente, this.label))
             this.moodType = MoodEnum.Nobilmente;
-        if (this.label === MoodExpression.listMoodPatetico[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodPatetico, this.label))
             this.moodType = MoodEnum.Patetico;
-        if (this.label === MoodExpression.listMoodPesante[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodPesante, this.label))
             this.moodType = MoodEnum.Pesante;
-        if (this.label === MoodExpression.listMoodSaltando[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSaltando, this.label))
             this.moodType = MoodEnum.Saltando;
-        if (this.label === MoodExpression.listMoodSautille[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSautille, this.label))
             this.moodType = MoodEnum.Sautille;
-        if (this.label === MoodExpression.listMoodScherzando[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodScherzando, this.label))
             this.moodType = MoodEnum.Scherzando;
-        if (this.label === MoodExpression.listMoodSostenuto[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSostenuto, this.label))
             this.moodType = MoodEnum.Sostenuto;
-        if (this.label === MoodExpression.listMoodSpiccato[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodSpiccato, this.label))
             this.moodType = MoodEnum.Spiccato;
-        if (this.label === MoodExpression.listMoodTenerezza[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodTenerezza, this.label))
             this.moodType = MoodEnum.Tenerezza;
-        if (this.label === MoodExpression.listMoodTranquillamente[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodTranquillamente, this.label))
             this.moodType = MoodEnum.Tranquillamente;
-        if (this.label === MoodExpression.listMoodTrionfante[0])
+        if (MoodExpression.isStringInStringList(MoodExpression.listMoodTrionfante, this.label))
             this.moodType = MoodEnum.Trionfante;
     }
 }

+ 59 - 4
src/MusicalScore/VoiceData/SourceStaffEntry.ts

@@ -6,6 +6,9 @@ import {VoiceEntry} from "./VoiceEntry";
 import {Note} from "./Note";
 import {StaffEntryLink} from "./StaffEntryLink";
 import {ChordSymbolContainer} from "./ChordSymbolContainer";
+import {ClefInstruction} from "./Instructions/ClefInstruction";
+import {KeyInstruction} from "./Instructions/KeyInstruction";
+import {RhythmInstruction} from "./Instructions/RhythmInstruction";
 
 export class SourceStaffEntry {
   constructor(verticalContainerParent: VerticalSourceStaffEntryContainer, parentStaff: Staff) {
@@ -62,26 +65,78 @@ export class SourceStaffEntry {
   public set ChordContainer(value: ChordSymbolContainer) {
     this.chordSymbolContainer = value;
   }
-  public removeAllInstructionsOfType<T>(): number {
+  //public removeAllInstructionsOfType<T>(): number {
+  //  let i: number = 0;
+  //  let ret: number = 0;
+  //  while (i < this.instructions.length) {
+  //    if (this.instructions[i] instanceof T) {
+  //      this.instructions.splice(i, 1);
+  //      ret++;
+  //    } else { i++; }
+  //  }
+  //  return ret;
+  //}
+  //public removeFirstInstructionOfType<T>(): boolean {
+  //  for (let i: number = 0; i < this.instructions.length; i++) {
+  //    if (this.instructions[i] instanceof T) {
+  //      this.instructions.splice(i, 1);
+  //      return true;
+  //    }
+  //  }
+  //  return false;
+  //}
+  public removeAllInstructionsOfTypeClefInstruction(): number {
     let i: number = 0;
     let ret: number = 0;
     while (i < this.instructions.length) {
-      if (this.instructions[i] instanceof T) {
+      if (this.instructions[i] instanceof ClefInstruction) {
         this.instructions.splice(i, 1);
         ret++;
       } else { i++; }
     }
     return ret;
   }
-  public removeFirstInstructionOfType<T>(): boolean {
+  public removeFirstInstructionOfTypeClefInstruction(): boolean {
     for (let i: number = 0; i < this.instructions.length; i++) {
-      if (this.instructions[i] instanceof T) {
+      if (this.instructions[i] instanceof ClefInstruction) {
         this.instructions.splice(i, 1);
         return true;
       }
     }
     return false;
   }
+  public removeAllInstructionsOfTypeKeyInstruction(): number {
+    let i: number = 0;
+    let ret: number = 0;
+    while (i < this.instructions.length) {
+      if (this.instructions[i] instanceof KeyInstruction) {
+        this.instructions.splice(i, 1);
+        ret++;
+      } else { i++; }
+    }
+    return ret;
+  }
+  public removeFirstInstructionOfTypeKeyInstruction(): boolean {
+    for (let i: number = 0; i < this.instructions.length; i++) {
+      if (this.instructions[i] instanceof KeyInstruction) {
+        this.instructions.splice(i, 1);
+        return true;
+      }
+    }
+    return false;
+  }
+  public removeAllInstructionsOfTypeRhythmInstruction(): number {
+    let i: number = 0;
+    let ret: number = 0;
+    while (i < this.instructions.length) {
+      if (this.instructions[i] instanceof RhythmInstruction) {
+        this.instructions.splice(i, 1);
+        ret++;
+      } else { i++; }
+    }
+    return ret;
+  }
+
   public calculateMinNoteLength(): Fraction {
     let duration: Fraction = new Fraction(Number.MAX_VALUE, 1);
     for (let idx: number = 0, len: number = this.VoiceEntries.length; idx < len; ++idx) {

+ 7 - 7
src/MusicalScore/VoiceData/VerticalSourceStaffEntryContainer.ts

@@ -6,7 +6,7 @@ export class VerticalSourceStaffEntryContainer {
     constructor(parentMeasure: SourceMeasure, timestamp: Fraction, size: number) {
         this.timestamp = timestamp;
         this.size = size;
-        this.initialize();
+        this.staffEntries = new Array(size);
         this.parentMeasure = parentMeasure;
     }
     private timestamp: Fraction;
@@ -46,11 +46,11 @@ export class VerticalSourceStaffEntryContainer {
         this.parentMeasure = value;
     }
     public getAbsoluteTimestamp(): Fraction {
-        return new Fraction(this.timestamp + this.parentMeasure.AbsoluteTimestamp);
-    }
-    private initialize(): void {
-        for (let i: number = 0; i < this.size; i++) {
-            this.staffEntries.push(undefined);
-        }
+        return Fraction.plus(this.timestamp, this.parentMeasure.AbsoluteTimestamp);
     }
+    //private initialize(): void {
+    //    for (let i: number = 0; i < this.size; i++) {
+    //        this.staffEntries.push(undefined);
+    //    }
+    //}
 }

+ 285 - 282
src/MusicalScore/VoiceData/VoiceEntry.ts

@@ -12,304 +12,307 @@ import {AccidentalEnum} from "../../Common/DataObjects/pitch";
 
 
 export class VoiceEntry {
-  constructor(timestamp: Fraction, parentVoice: Voice, parentSourceStaffEntry: SourceStaffEntry) {
-    this.timestamp = timestamp;
-    this.parentVoice = parentVoice;
-    this.parentSourceStaffEntry = parentSourceStaffEntry;
-  }
-  public GraceVoiceEntriesBefore: VoiceEntry[];
-  public GraceVoiceEntriesAfter: VoiceEntry[];
-  private parentVoice: Voice;
-  private parentSourceStaffEntry: SourceStaffEntry;
-  private timestamp: Fraction;
-  private notes: Note[] = [];
-  private articulations: ArticulationEnum[] = [];
-  private technicalInstructions: TechnicalInstruction[] = [];
-  private lyricsEntries: { [n: number]: LyricsEntry; } = {};
-  private arpeggiosNotesIndices: number[] = [];
-  private ornamentContainer: OrnamentContainer;
-  public get ParentSourceStaffEntry(): SourceStaffEntry {
-    return this.parentSourceStaffEntry;
-  }
-  public get ParentVoice(): Voice {
-    return this.parentVoice;
-  }
-  public get Timestamp(): Fraction {
-    return this.timestamp;
-  }
-  public set Timestamp(value: Fraction) {
-    this.timestamp = value;
-  }
-  public get Notes(): Note[] {
-    return this.notes;
-  }
-  public get Articulations(): ArticulationEnum[] {
-    return this.articulations;
-  }
-  public get TechnicalInstructions(): TechnicalInstruction[] {
-    return this.technicalInstructions;
-  }
-  public get LyricsEntries(): { [n: number]: LyricsEntry; } {
-    return this.lyricsEntries;
-  }
-  public set LyricsEntries(value: { [n: number]: LyricsEntry; }) {
-    this.lyricsEntries = value;
-  }
-  public get ArpeggiosNotesIndices(): number[] {
-    return this.arpeggiosNotesIndices;
-  }
-  public set ArpeggiosNotesIndices(value: number[]) {
-    this.arpeggiosNotesIndices = value;
-  }
-  public get OrnamentContainer(): OrnamentContainer {
-    return this.ornamentContainer;
-  }
-  public set OrnamentContainer(value: OrnamentContainer) {
-    this.ornamentContainer = value;
-  }
-  public static isSupportedArticulation(articulation: ArticulationEnum): boolean {
-    switch (articulation) {
-      case ArticulationEnum.accent:
-      case ArticulationEnum.strongaccent:
-      case ArticulationEnum.invertedstrongaccent:
-      case ArticulationEnum.staccato:
-      case ArticulationEnum.staccatissimo:
-      case ArticulationEnum.spiccato:
-      case ArticulationEnum.tenuto:
-      case ArticulationEnum.fermata:
-      case ArticulationEnum.invertedfermata:
-      case ArticulationEnum.breathmark:
-      case ArticulationEnum.caesura:
-      case ArticulationEnum.lefthandpizzicato:
-      case ArticulationEnum.naturalharmonic:
-      case ArticulationEnum.snappizzicato:
-      case ArticulationEnum.upbow:
-      case ArticulationEnum.downbow:
-        return true;
-      default:
-        return false;
+    constructor(timestamp: Fraction, parentVoice: Voice, parentSourceStaffEntry: SourceStaffEntry) {
+        this.timestamp = timestamp;
+        this.parentVoice = parentVoice;
+        this.parentSourceStaffEntry = parentSourceStaffEntry;
     }
-  }
-  public hasTie(): boolean {
-    for (let idx: number = 0, len: number = this.Notes.length; idx < len; ++idx) {
-      let note: Note = this.Notes[idx];
-      if (note.NoteTie !== undefined) { return true; }
+    public GraceVoiceEntriesBefore: VoiceEntry[];
+    public GraceVoiceEntriesAfter: VoiceEntry[];
+    private parentVoice: Voice;
+    private parentSourceStaffEntry: SourceStaffEntry;
+    private timestamp: Fraction;
+    private notes: Note[] = [];
+    private articulations: ArticulationEnum[] = [];
+    private technicalInstructions: TechnicalInstruction[] = [];
+    private lyricsEntries: { [n: number]: LyricsEntry; } = {};
+    private arpeggiosNotesIndices: number[] = [];
+    private ornamentContainer: OrnamentContainer;
+    public get ParentSourceStaffEntry(): SourceStaffEntry {
+        return this.parentSourceStaffEntry;
     }
-    return false;
-  }
-  public hasSlur(): boolean {
-    for (let idx: number = 0, len: number = this.Notes.length; idx < len; ++idx) {
-      let note: Note = this.Notes[idx];
-      if (note.NoteSlurs.length > 0) { return true; }
+    public get ParentVoice(): Voice {
+        return this.parentVoice;
     }
-    return false;
-  }
-  public isStaccato(): boolean {
-    for (let idx: number = 0, len: number = this.Articulations.length; idx < len; ++idx) {
-      let articulation: ArticulationEnum = this.Articulations[idx];
-      if (articulation === ArticulationEnum.staccato) { return true; }
+    public get Timestamp(): Fraction {
+        return this.timestamp;
     }
-    return false;
-  }
-  public isAccent(): boolean {
-    for (let idx: number = 0, len: number = this.Articulations.length; idx < len; ++idx) {
-      let articulation: ArticulationEnum = this.Articulations[idx];
-      if (articulation === ArticulationEnum.accent || articulation === ArticulationEnum.strongaccent) {
-        return true;
-      }
+    public set Timestamp(value: Fraction) {
+        this.timestamp = value;
     }
-    return false;
-  }
-  public getVerseNumberForLyricEntry(lyricsEntry: LyricsEntry): number {
-    let lyricsEntries: { [n: number]: LyricsEntry; } = this.lyricsEntries;
-    for (let key in lyricsEntries) {
-      if (lyricsEntries.hasOwnProperty(key)) { // FIXME check has own property
-          if (lyricsEntry === this.lyricsEntries[key]) {
-              return key;
-          }
-      }
+    public get Notes(): Note[] {
+        return this.notes;
     }
-    return 1;
-  }
-  public createVoiceEntriesForOrnament(activeKey: KeyInstruction): VoiceEntry[] {
-    return this.createVoiceEntriesForOrnament(this, activeKey);
-  }
-  public createVoiceEntriesForOrnament(voiceEntryWithOrnament: VoiceEntry, activeKey: KeyInstruction): VoiceEntry[] {
-    let voiceEntries: VoiceEntry[] = [];
-    if (voiceEntryWithOrnament.ornamentContainer === undefined) {
-      return;
+    public get Articulations(): ArticulationEnum[] {
+        return this.articulations;
     }
-    let baseNote: Note = this.notes[0];
-    let baselength: Fraction = baseNote.calculateNoteLengthWithoutTie();
-    let baseVoice: Voice = voiceEntryWithOrnament.ParentVoice;
-    let baseTimestamp: Fraction = voiceEntryWithOrnament.Timestamp;
-    let currentTimestamp: Fraction = Fraction.CreateFractionFromFraction(baseTimestamp);
-    //let length: Fraction;
-    switch (voiceEntryWithOrnament.ornamentContainer.GetOrnament) {
-      case OrnamentEnum.Trill: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 8);
-          let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
-          let alteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
-          if (voiceEntryWithOrnament.OrnamentContainer.AccidentalAbove !== AccidentalEnum.NONE) {
-            alteration = <AccidentalEnum><number>voiceEntryWithOrnament.ornamentContainer.AccidentalAbove;
-          }
-          for (let i: number = 0; i < 8; i++) {
-            currentTimestamp = Fraction.plus(baseTimestamp, new Fraction(i * length.Numerator, length.Denominator));
-            if ((i % 2) === 0) {
-              this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-            } else {
-              this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, alteration, voiceEntries);
-            }
-          }
+    public get TechnicalInstructions(): TechnicalInstruction[] {
+        return this.technicalInstructions;
+    }
+    public get LyricsEntries(): { [n: number]: LyricsEntry; } {
+        return this.lyricsEntries;
+    }
+    public set LyricsEntries(value: { [n: number]: LyricsEntry; }) {
+        this.lyricsEntries = value;
+    }
+    public get ArpeggiosNotesIndices(): number[] {
+        return this.arpeggiosNotesIndices;
+    }
+    public set ArpeggiosNotesIndices(value: number[]) {
+        this.arpeggiosNotesIndices = value;
+    }
+    public get OrnamentContainer(): OrnamentContainer {
+        return this.ornamentContainer;
+    }
+    public set OrnamentContainer(value: OrnamentContainer) {
+        this.ornamentContainer = value;
+    }
+    public static isSupportedArticulation(articulation: ArticulationEnum): boolean {
+        switch (articulation) {
+            case ArticulationEnum.accent:
+            case ArticulationEnum.strongaccent:
+            case ArticulationEnum.invertedstrongaccent:
+            case ArticulationEnum.staccato:
+            case ArticulationEnum.staccatissimo:
+            case ArticulationEnum.spiccato:
+            case ArticulationEnum.tenuto:
+            case ArticulationEnum.fermata:
+            case ArticulationEnum.invertedfermata:
+            case ArticulationEnum.breathmark:
+            case ArticulationEnum.caesura:
+            case ArticulationEnum.lefthandpizzicato:
+            case ArticulationEnum.naturalharmonic:
+            case ArticulationEnum.snappizzicato:
+            case ArticulationEnum.upbow:
+            case ArticulationEnum.downbow:
+                return true;
+            default:
+                return false;
+        }
+    }
+    public hasTie(): boolean {
+        for (let idx: number = 0, len: number = this.Notes.length; idx < len; ++idx) {
+            let note: Note = this.Notes[idx];
+            if (note.NoteTie !== undefined) { return true; }
+        }
+        return false;
+    }
+    public hasSlur(): boolean {
+        for (let idx: number = 0, len: number = this.Notes.length; idx < len; ++idx) {
+            let note: Note = this.Notes[idx];
+            if (note.NoteSlurs.length > 0) { return true; }
         }
-        break;
-      case OrnamentEnum.Turn: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
-          let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
-          let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
-          let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
-          let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
-          this.createAlteratedVoiceEntry(
-            currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries
-          );
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp += length;
-          this.createAlteratedVoiceEntry(
-            currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries
-          );
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+        return false;
+    }
+    public isStaccato(): boolean {
+        for (let idx: number = 0, len: number = this.Articulations.length; idx < len; ++idx) {
+            let articulation: ArticulationEnum = this.Articulations[idx];
+            if (articulation === ArticulationEnum.staccato) { return true; }
         }
-        break;
-      case OrnamentEnum.InvertedTurn: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
-          let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
-          let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
-          let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
-          let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
-          this.createAlteratedVoiceEntry(
-            currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries
-          );
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp += length;
-          this.createAlteratedVoiceEntry(
-            currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries
-          );
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+        return false;
+    }
+    public isAccent(): boolean {
+        for (let idx: number = 0, len: number = this.Articulations.length; idx < len; ++idx) {
+            let articulation: ArticulationEnum = this.Articulations[idx];
+            if (articulation === ArticulationEnum.accent || articulation === ArticulationEnum.strongaccent) {
+                return true;
+            }
         }
-        break;
-      case OrnamentEnum.DelayedTurn: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 2);
-          let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
-          let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
-          let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
-          let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp = Fraction.plus(baseTimestamp, length);
-          length.Denominator = baselength.Denominator * 8;
-          this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries);
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp += length;
-          this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries);
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+        return false;
+    }
+    public getVerseNumberForLyricEntry(lyricsEntry: LyricsEntry): number {
+        let lyricsEntries: { [n: number]: LyricsEntry; } = this.lyricsEntries;
+        for (let key in lyricsEntries) {
+            if (lyricsEntries.hasOwnProperty(key)) { // FIXME check has own property
+                if (lyricsEntry === this.lyricsEntries[key]) {
+                    return +key;
+                }
+            }
         }
-        break;
-      case OrnamentEnum.DelayedInvertedTurn: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 2);
-          let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
-          let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
-          let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
-          let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp = Fraction.plus(baseTimestamp, length);
-          length.Denominator = baselength.Denominator * 8;
-          this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries);
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp += length;
-          this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries);
-          currentTimestamp += length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+        return 1;
+    }
+    //public createVoiceEntriesForOrnament(activeKey: KeyInstruction): VoiceEntry[] {
+    //    return this.createVoiceEntriesForOrnament(this, activeKey);
+    //}
+    public createVoiceEntriesForOrnament(voiceEntryWithOrnament: VoiceEntry, activeKey: KeyInstruction): VoiceEntry[] {
+        if (voiceEntryWithOrnament === undefined) {
+            voiceEntryWithOrnament = this;
         }
-        break;
-      case OrnamentEnum.Mordent: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
-          let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
-          let alteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp += length;
-          this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, alteration, voiceEntries);
-          length.Denominator = baselength.Denominator * 2;
-          currentTimestamp = baseTimestamp + length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+        let voiceEntries: VoiceEntry[] = [];
+        if (voiceEntryWithOrnament.ornamentContainer === undefined) {
+            return;
         }
-        break;
-      case OrnamentEnum.InvertedMordent: {
-          let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
-          let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
-          let alteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
-          currentTimestamp += length;
-          this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, lowerPitch, alteration, voiceEntries);
-          length.Denominator = baselength.Denominator * 2;
-          currentTimestamp = baseTimestamp + length;
-          this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+        let baseNote: Note = this.notes[0];
+        let baselength: Fraction = baseNote.calculateNoteLengthWithoutTie();
+        let baseVoice: Voice = voiceEntryWithOrnament.ParentVoice;
+        let baseTimestamp: Fraction = voiceEntryWithOrnament.Timestamp;
+        let currentTimestamp: Fraction = Fraction.CreateFractionFromFraction(baseTimestamp);
+        //let length: Fraction;
+        switch (voiceEntryWithOrnament.ornamentContainer.GetOrnament) {
+            case OrnamentEnum.Trill: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 8);
+                let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
+                let alteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
+                if (voiceEntryWithOrnament.OrnamentContainer.AccidentalAbove !== AccidentalEnum.NONE) {
+                    alteration = <AccidentalEnum><number>voiceEntryWithOrnament.ornamentContainer.AccidentalAbove;
+                }
+                for (let i: number = 0; i < 8; i++) {
+                    currentTimestamp = Fraction.plus(baseTimestamp, new Fraction(i * length.Numerator, length.Denominator));
+                    if ((i % 2) === 0) {
+                        this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                    } else {
+                        this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, alteration, voiceEntries);
+                    }
+                }
+            }
+                break;
+            case OrnamentEnum.Turn: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
+                let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
+                let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
+                let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
+                let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
+                this.createAlteratedVoiceEntry(
+                    currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries
+                );
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createAlteratedVoiceEntry(
+                    currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries
+                );
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+            }
+                break;
+            case OrnamentEnum.InvertedTurn: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
+                let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
+                let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
+                let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
+                let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
+                this.createAlteratedVoiceEntry(
+                    currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries
+                );
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createAlteratedVoiceEntry(
+                    currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries
+                );
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+            }
+                break;
+            case OrnamentEnum.DelayedTurn: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 2);
+                let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
+                let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
+                let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
+                let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp = Fraction.plus(baseTimestamp, length);
+                length.Denominator = baselength.Denominator * 8;
+                this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+            }
+                break;
+            case OrnamentEnum.DelayedInvertedTurn: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 2);
+                let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
+                let lowerAlteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
+                let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
+                let higherAlteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp = Fraction.plus(baseTimestamp, length);
+                length.Denominator = baselength.Denominator * 8;
+                this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, lowerPitch, lowerAlteration, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, higherAlteration, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+            }
+                break;
+            case OrnamentEnum.Mordent: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
+                let higherPitch: Pitch = baseNote.Pitch.getTransposedPitch(1);
+                let alteration: AccidentalEnum = activeKey.getAlterationForPitch(higherPitch);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, higherPitch, alteration, voiceEntries);
+                length.Denominator = baselength.Denominator * 2;
+                currentTimestamp = Fraction.plus(baseTimestamp, length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+            }
+                break;
+            case OrnamentEnum.InvertedMordent: {
+                let length: Fraction = new Fraction(baselength.Numerator, baselength.Denominator * 4);
+                let lowerPitch: Pitch = baseNote.Pitch.getTransposedPitch(-1);
+                let alteration: AccidentalEnum = activeKey.getAlterationForPitch(lowerPitch);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+                currentTimestamp.Add(length);
+                this.createAlteratedVoiceEntry(currentTimestamp, length, baseVoice, lowerPitch, alteration, voiceEntries);
+                length.Denominator = baselength.Denominator * 2;
+                currentTimestamp = Fraction.plus(baseTimestamp, length);
+                this.createBaseVoiceEntry(currentTimestamp, length, baseVoice, baseNote, voiceEntries);
+            }
+                break;
+            default:
+                throw new RangeError();
         }
-        break;
-      default:
-        throw new RangeError();
+        return voiceEntries;
+    }
+    private createBaseVoiceEntry(
+        currentTimestamp: Fraction, length: Fraction, baseVoice: Voice, baseNote: Note, voiceEntries: VoiceEntry[]
+    ): void {
+        let voiceEntry: VoiceEntry = new VoiceEntry(currentTimestamp, baseVoice, baseNote.ParentStaffEntry);
+        let pitch: Pitch = new Pitch(baseNote.Pitch.FundamentalNote, baseNote.Pitch.Octave, baseNote.Pitch.Accidental);
+        let note: Note = new Note(voiceEntry, undefined, length, pitch);
+        voiceEntry.Notes.push(note);
+        voiceEntries.push(voiceEntry);
+    }
+    private createAlteratedVoiceEntry(
+        currentTimestamp: Fraction, length: Fraction, baseVoice: Voice, higherPitch: Pitch,
+        alteration: AccidentalEnum, voiceEntries: VoiceEntry[]
+    ): void {
+        let voiceEntry: VoiceEntry = new VoiceEntry(currentTimestamp, baseVoice, undefined);
+        let pitch: Pitch = new Pitch(higherPitch.FundamentalNote, higherPitch.Octave, alteration);
+        let note: Note = new Note(voiceEntry, undefined, length, pitch);
+        voiceEntry.Notes.push(note);
+        voiceEntries.push(voiceEntry);
     }
-    return voiceEntries;
-  }
-  private createBaseVoiceEntry(
-    currentTimestamp: Fraction, length: Fraction, baseVoice: Voice, baseNote: Note, voiceEntries: VoiceEntry[]
-  ): void {
-    let voiceEntry: VoiceEntry = new VoiceEntry(currentTimestamp, baseVoice, baseNote.ParentStaffEntry);
-    let pitch: Pitch = new Pitch(baseNote.Pitch.FundamentalNote, baseNote.Pitch.Octave, baseNote.Pitch.Accidental);
-    let note: Note = new Note(voiceEntry, undefined, length, pitch);
-    voiceEntry.Notes.push(note);
-    voiceEntries.push(voiceEntry);
-  }
-  private createAlteratedVoiceEntry(
-    currentTimestamp: Fraction, length: Fraction, baseVoice: Voice, higherPitch: Pitch,
-    alteration: AccidentalEnum, voiceEntries: VoiceEntry[]
-  ): void {
-    let voiceEntry: VoiceEntry = new VoiceEntry(currentTimestamp, baseVoice, undefined);
-    let pitch: Pitch = new Pitch(higherPitch.FundamentalNote, higherPitch.Octave, alteration);
-    let note: Note = new Note(voiceEntry, undefined, length, pitch);
-    voiceEntry.Notes.push(note);
-    voiceEntries.push(voiceEntry);
-  }
 }
 
 export enum ArticulationEnum {
-  accent,
-  strongaccent,
-  invertedstrongaccent,
-  staccato,
-  staccatissimo,
-  spiccato,
-  tenuto,
-  fermata,
-  invertedfermata,
-  breathmark,
-  caesura,
-  lefthandpizzicato,
-  naturalharmonic,
-  snappizzicato,
-  upbow,
-  downbow,
-  scoop,
-  plop,
-  doit,
-  falloff,
-  stress,
-  unstress,
-  detachedlegato,
-  otherarticulation
+    accent,
+    strongaccent,
+    invertedstrongaccent,
+    staccato,
+    staccatissimo,
+    spiccato,
+    tenuto,
+    fermata,
+    invertedfermata,
+    breathmark,
+    caesura,
+    lefthandpizzicato,
+    naturalharmonic,
+    snappizzicato,
+    upbow,
+    downbow,
+    scoop,
+    plop,
+    doit,
+    falloff,
+    stress,
+    unstress,
+    detachedlegato,
+    otherarticulation
 }