Browse Source

Merge branch 'feature-tianyong-newVersion' into ktyq-online-new

TIANYONG 3 months ago
parent
commit
92595acc48
3 changed files with 4 additions and 5 deletions
  1. 2 1
      src/helpers/calcSpeed.ts
  2. 2 1
      src/helpers/formateMusic.ts
  3. 0 3
      src/helpers/metronome.ts

+ 2 - 1
src/helpers/calcSpeed.ts

@@ -41,6 +41,7 @@ export const speedInfo: { [key in string]: number } = {
 	slow: 1.333333333,
 	slowly: 1.333333333,
 	faster: 1.333333333,
+	"molto allargando": 1.333333333,
 };
 
 /**
@@ -184,7 +185,7 @@ export const getGradualLengthByXml = (xml: string) => {
 		}
 		const isKeyWork = keys.find((k) => {
 			const ks = k.split(" ");
-			return textContent && ks.includes(textContent);
+			return textContent && ks.includes(textContent) || k === textContent;
 		});
 		if (ele.type === "metronome" || (ele.type === "words" && (textContent.startsWith("a tempo") || isKeyWork)) || isLastNoteAndNotClosed) {
 			const indexOf = gradualNotes.findIndex((item) => item.length === 1);

+ 2 - 1
src/helpers/formateMusic.ts

@@ -793,7 +793,8 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 	const customNoteCurrentTime = customData.customNoteCurrentTime;
 	const detailId = state.examSongId + "";
 	const partIndex = state.partIndex + "";
-	let fixtime = browserInfo.huawei ? 0.08 : 0; //getFixTime()
+	// let fixtime = browserInfo.huawei ? 0.08 : 0; //getFixTime()
+	let fixtime = 0;
 	const allNotes: any[] = [];
 	const allNoteId: string[] = [];
 	const allMeasures: any[] = [];

+ 0 - 3
src/helpers/metronome.ts

@@ -150,9 +150,6 @@ class Metronome {
 
 	// 播放
 	sound = (currentTime: number) => {
-		if (!state.sectionStatus){
-			currentTime = setCurrentTime(currentTime);
-		}
 		let index = -1;
 		let activeMetro = -1;
 		for (let i = 0; i < metronomeData.metroList.length; i++) {