Explorar el Código

feat: "allargando", "molto allargando"识别为渐变

TIANYONG hace 3 meses
padre
commit
2031a20868
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/helpers/calcSpeed.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);