|
@@ -12,60 +12,66 @@ export class InstantaniousTempoExpression extends AbstractTempoExpression {
|
|
|
super.parentMultiTempoExpression = parentMultiTempoExpression;
|
|
|
this.setTempoAndTempoType(soundTempo);
|
|
|
}
|
|
|
+
|
|
|
private tempoEnum: TempoEnum;
|
|
|
private tempoInBpm: number;
|
|
|
- private findTempoEnum(inputString: string, pre: string, post: string): TempoEnum {
|
|
|
- var result: TempoEnum = this.splitStringAfterInstructionWord(inputString, InstantaniousTempoExpression.listInstantaniousTempoLarghissimo, pre,
|
|
|
- post);
|
|
|
- if (result != TempoEnum.none)
|
|
|
- return result;
|
|
|
- result = this.splitStringAfterInstructionWord(inputString, InstantaniousTempoExpression.listInstantaniousTempoGrave, pre,
|
|
|
- post);
|
|
|
- if (result != TempoEnum.none)
|
|
|
- return result;
|
|
|
- return TempoEnum.none;
|
|
|
- }
|
|
|
- private splitStringAfterInstructionWord(inputString: string, instruction: KeyValuePair<Array<string>, TempoEnum>, pre: string, post: string): TempoEnum {
|
|
|
- pre = null;
|
|
|
- post = null;
|
|
|
- for (var idx: number = 0, len = instruction.Key.Count; idx < len; ++idx) {
|
|
|
- var instructionWord: string = instruction.Key[idx];
|
|
|
- var separators: string[] = " " + instructionWord, instructionWord + " ","," + instructionWord, instructionWord + ",";
|
|
|
- var splits: string[] = inputString.Split(separators, 2, StringSplitOptions.None);
|
|
|
- if (splits.length > 1) {
|
|
|
- pre = splits[0];
|
|
|
- post = splits[1];
|
|
|
- return instruction.Value;
|
|
|
- }
|
|
|
- }
|
|
|
- return TempoEnum.none;
|
|
|
- }
|
|
|
- static private listInstantaniousTempoLarghissimo: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Larghissimo","Sehr breit","very, very slow" }), TempoEnum.larghissimo);
|
|
|
- static private listInstantaniousTempoGrave: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Grave","Schwer","slow and solemn" }), TempoEnum.grave);
|
|
|
- static private listInstantaniousTempoLento: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Lento","Lent","Langsam","slowly" }), TempoEnum.lento);
|
|
|
- static private listInstantaniousTempoLargo: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Largo","Breit","broadly" }), TempoEnum.largo);
|
|
|
- static private listInstantaniousTempoLarghetto: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Larghetto","Etwas breit","rather broadly" }), TempoEnum.larghetto);
|
|
|
- static private listInstantaniousTempoAdagio: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Adagio","Langsam","Ruhig","slow and stately" }), TempoEnum.adagio);
|
|
|
- static private listInstantaniousTempoAdagietto: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Adagietto","Ziemlich ruhig","Ziemlich langsam","rather slow" }), TempoEnum.adagietto);
|
|
|
- static private listInstantaniousTempoAndanteModerato: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Andante moderato" }), TempoEnum.andanteModerato);
|
|
|
- static private listInstantaniousTempoAndante: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Andante","Gehend","Schreitend","at a walking pace" }), TempoEnum.andante);
|
|
|
- static private listInstantaniousTempoAndantino: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Andantino" }), TempoEnum.andantino);
|
|
|
- static private listInstantaniousTempoModerato: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Moderato","M��ig","Mod�r�","moderately" }), TempoEnum.moderato);
|
|
|
- static private listInstantaniousTempoAllegretto: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Allegretto","fast" }), TempoEnum.allegretto);
|
|
|
- static private listInstantaniousTempoAllegroModerato: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Allegro moderato" }), TempoEnum.allegroModerato);
|
|
|
- static private listInstantaniousTempoAllegro: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Allegro","Rapide","Vite","Rasch","Schnell","Fr�hlich" }), TempoEnum.allegro);
|
|
|
- static private listInstantaniousTempoVivace: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Vivace","Lebhaft","Lebendig","lively and fast" }), TempoEnum.vivace);
|
|
|
- static private listInstantaniousTempoVivacissimo: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Vivacissimo","Sehr lebhaft","Sehr lebendig" }), TempoEnum.vivacissimo);
|
|
|
- static private listInstantaniousTempoAllegrissimo: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Allegrissimo","very fast" }), TempoEnum.allegrissimo);
|
|
|
- static private listInstantaniousTempoPresto: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Presto","Sehr schnell","Geschwind" }), TempoEnum.presto);
|
|
|
- static private listInstantaniousTempoPrestissimo: KeyValuePair<Array<string>, TempoEnum> = new KeyValuePair<Array<string>, TempoEnum>(__init(new Array<string>(), { "Prestissimo","�u�erst schnell" }), TempoEnum.prestissimo);
|
|
|
- static private listInstantaniousTempoChangesGeneral: Array<string> = __init(new Array<string>(), {
|
|
|
+
|
|
|
+ // Must refactor: In c# use 'out' arguments
|
|
|
+ //private findTempoEnum(inputString: string, pre: string, post: string): TempoEnum {
|
|
|
+ // let result: TempoEnum = this.splitStringAfterInstructionWord(inputString, InstantaniousTempoExpression.listInstantaniousTempoLarghissimo, TempoEnum.larghissimo, pre,
|
|
|
+ // post);
|
|
|
+ // if (result !== TempoEnum.none)
|
|
|
+ // return result;
|
|
|
+ // result = this.splitStringAfterInstructionWord(inputString, InstantaniousTempoExpression.listInstantaniousTempoGrave, TempoEnum.grave, pre,
|
|
|
+ // post);
|
|
|
+ // if (result !== TempoEnum.none)
|
|
|
+ // return result;
|
|
|
+ // return TempoEnum.none;
|
|
|
+ //}
|
|
|
+ //private splitStringAfterInstructionWord(inputString: string, instruction: string[], value: TempoEnum, pre: string, post: string): TempoEnum {
|
|
|
+ // pre = undefined;
|
|
|
+ // post = undefined;
|
|
|
+ // for (let idx: number = 0, len = instruction.length; idx < len; ++idx) {
|
|
|
+ // let instructionWord: string = instruction[idx];
|
|
|
+ // let separators: string[] = [" " + instructionWord, instructionWord + " ", "," + instructionWord, instructionWord + ","];
|
|
|
+ // for (let j: number = 0; j < 4; j++) {
|
|
|
+ // let splits:string[] = inputString.split(separators[j], 2);
|
|
|
+ // if (splits.length > 1) {
|
|
|
+ // pre = splits[0];
|
|
|
+ // post = splits[1];
|
|
|
+ // return value;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return TempoEnum.none;
|
|
|
+ //}
|
|
|
+ private static listInstantaniousTempoLarghissimo: string[] = ["Larghissimo","Sehr breit","very, very slow"]; // }), TempoEnum.larghissimo);
|
|
|
+ private static listInstantaniousTempoGrave: string[] = ["Grave","Schwer","slow and solemn"]; // }), TempoEnum.grave);
|
|
|
+ private static listInstantaniousTempoLento: string[] = ["Lento","Lent","Langsam","slowly"]; // }), TempoEnum.lento);
|
|
|
+ private static listInstantaniousTempoLargo: string[] = ["Largo","Breit","broadly"]; // }), TempoEnum.largo);
|
|
|
+ private static listInstantaniousTempoLarghetto: string[] = ["Larghetto","Etwas breit","rather broadly"]; // }), TempoEnum.larghetto);
|
|
|
+ private static listInstantaniousTempoAdagio: string[] = ["Adagio","Langsam","Ruhig","slow and stately"]; // }), TempoEnum.adagio);
|
|
|
+ private static listInstantaniousTempoAdagietto: string[] = ["Adagietto","Ziemlich ruhig","Ziemlich langsam","rather slow"]; // }), TempoEnum.adagietto);
|
|
|
+ private static listInstantaniousTempoAndanteModerato: string[] = ["Andante moderato"]; // }), TempoEnum.andanteModerato);
|
|
|
+ private static listInstantaniousTempoAndante: string[] = ["Andante","Gehend","Schreitend","at a walking pace"]; // }), TempoEnum.andante);
|
|
|
+ private static listInstantaniousTempoAndantino: string[] = ["Andantino"]; // }), TempoEnum.andantino);
|
|
|
+ private static listInstantaniousTempoModerato: string[] = ["Moderato","M��ig","Mod�r�","moderately"]; // }), TempoEnum.moderato);
|
|
|
+ private static listInstantaniousTempoAllegretto: string[] = ["Allegretto","fast"]; // }), TempoEnum.allegretto);
|
|
|
+ private static listInstantaniousTempoAllegroModerato: string[] = ["Allegro moderato"]; // }), TempoEnum.allegroModerato);
|
|
|
+ private static listInstantaniousTempoAllegro: string[] = ["Allegro","Rapide","Vite","Rasch","Schnell","Fr�hlich"]; // }), TempoEnum.allegro);
|
|
|
+ private static listInstantaniousTempoVivace: string[] = ["Vivace","Lebhaft","Lebendig","lively and fast"]; // }), TempoEnum.vivace);
|
|
|
+ private static listInstantaniousTempoVivacissimo: string[] = ["Vivacissimo","Sehr lebhaft","Sehr lebendig"]; // }), TempoEnum.vivacissimo);
|
|
|
+ private static listInstantaniousTempoAllegrissimo: string[] = ["Allegrissimo","very fast"]; // }), TempoEnum.allegrissimo);
|
|
|
+ private static listInstantaniousTempoPresto: string[] = ["Presto","Sehr schnell","Geschwind"]; // }), TempoEnum.presto);
|
|
|
+ private static listInstantaniousTempoPrestissimo: string[] = ["Prestissimo","�u�erst schnell"]; // }), TempoEnum.prestissimo);
|
|
|
+ private static listInstantaniousTempoChangesGeneral: string[] = [
|
|
|
"tempo primo",
|
|
|
"a tempo",
|
|
|
"tempo i",
|
|
|
"rubato",
|
|
|
- "doppio movimento" });
|
|
|
- static private listInstantaniousTempoAddons: Array<string> = __init(new Array<string>(), {
|
|
|
+ "doppio movimento"
|
|
|
+ ];
|
|
|
+ private static listInstantaniousTempoAddons: string[] = [
|
|
|
"assai",
|
|
|
"amoroso",
|
|
|
"cantabile",
|
|
@@ -147,24 +153,26 @@ export class InstantaniousTempoExpression extends AbstractTempoExpression {
|
|
|
"ein wenig",
|
|
|
"alla marcia",
|
|
|
"ad libitum",
|
|
|
- "alla breve" });
|
|
|
+ "alla breve"
|
|
|
+ ];
|
|
|
+
|
|
|
public get Label(): string {
|
|
|
- return label;
|
|
|
+ return this.label;
|
|
|
}
|
|
|
public set Label(value: string) {
|
|
|
- label = value;
|
|
|
+ this.label = value;
|
|
|
}
|
|
|
public get Placement(): PlacementEnum {
|
|
|
- return placement;
|
|
|
+ return this.placement;
|
|
|
}
|
|
|
public set Placement(value: PlacementEnum) {
|
|
|
- placement = value;
|
|
|
+ this.placement = value;
|
|
|
}
|
|
|
public get StaffNumber(): number {
|
|
|
- return staffNumber;
|
|
|
+ return this.staffNumber;
|
|
|
}
|
|
|
public set StaffNumber(value: number) {
|
|
|
- staffNumber = value;
|
|
|
+ this.staffNumber = value;
|
|
|
}
|
|
|
public get Enum(): TempoEnum {
|
|
|
return this.tempoEnum;
|
|
@@ -176,7 +184,7 @@ export class InstantaniousTempoExpression extends AbstractTempoExpression {
|
|
|
this.tempoInBpm = value;
|
|
|
}
|
|
|
public get ParentMultiTempoExpression(): MultiTempoExpression {
|
|
|
- return parentMultiTempoExpression;
|
|
|
+ return this.parentMultiTempoExpression;
|
|
|
}
|
|
|
public getAbsoluteTimestamp(): Fraction {
|
|
|
return (this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp + this.ParentMultiTempoExpression.Timestamp);
|
|
@@ -229,175 +237,178 @@ export class InstantaniousTempoExpression extends AbstractTempoExpression {
|
|
|
}
|
|
|
}
|
|
|
public static isInputStringInstantaniousTempo(inputString: string): boolean {
|
|
|
- if (inputString == null)
|
|
|
+ if (inputString === undefined)
|
|
|
return false;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghissimo.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoGrave.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLento.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLargo.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghetto.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagio.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagietto.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndante.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndantino.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoModerato.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegretto.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegro.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivace.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivacissimo.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPresto.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPrestissimo.Key, inputString))
|
|
|
- return true;
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral, inputString))
|
|
|
- return true;
|
|
|
- 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)
|
|
|
+ );
|
|
|
}
|
|
|
private setTempoAndTempoType(soundTempo: number): void {
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghissimo.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoLarghissimo.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.larghissimo);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.larghissimo;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoGrave.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoGrave.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.grave);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.grave;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLento.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoLento.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.lento);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.lento;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLargo.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoLargo.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.largo);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.largo;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoLarghetto.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoLarghetto.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.larghetto);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.larghetto;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagio.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAdagio.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.adagio);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.adagio;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAdagietto.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAdagietto.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.adagietto);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.adagietto;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAndanteModerato.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.andanteModerato);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.andanteModerato;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndante.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAndante.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.andante);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.andante;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAndantino.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAndantino.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.andantino);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.andantino;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoModerato.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoModerato.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.moderato);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.moderato;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegretto.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAllegretto.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegretto);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.allegretto;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAllegroModerato.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegroModerato);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.allegroModerato;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegro.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAllegro.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegro);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.allegro;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivace.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoVivace.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.vivace);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.vivace;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoVivacissimo.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoVivacissimo.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.vivacissimo);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.vivacissimo;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAllegrissimo.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.allegrissimo);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.allegrissimo;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPresto.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoPresto.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.presto);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.presto;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoPrestissimo.Key, label)) {
|
|
|
- if (soundTempo == 0)
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoPrestissimo.indexOf(this.label) !== -1) {
|
|
|
+ if (soundTempo === 0)
|
|
|
soundTempo = InstantaniousTempoExpression.getDefaultValueForTempoType(TempoEnum.prestissimo);
|
|
|
this.tempoInBpm = soundTempo;
|
|
|
this.tempoEnum = TempoEnum.prestissimo;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoAddons, label)) {
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoAddons.indexOf(this.label) !== -1) {
|
|
|
this.tempoInBpm = 0;
|
|
|
this.tempoEnum = TempoEnum.addon;
|
|
|
+ return;
|
|
|
}
|
|
|
- if (isStringInStringList(InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral, label)) {
|
|
|
+ if (InstantaniousTempoExpression.listInstantaniousTempoChangesGeneral.indexOf(this.label) !== -1) {
|
|
|
this.tempoInBpm = 0;
|
|
|
this.tempoEnum = TempoEnum.changes;
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
export enum TempoEnum {
|
|
|
none,
|
|
|
larghissimo,
|
|
@@ -422,4 +433,4 @@ export enum TempoEnum {
|
|
|
lastRealTempo,
|
|
|
addon,
|
|
|
changes
|
|
|
-}
|
|
|
+}
|