Browse Source

fix: 渐变小节问题修复

TIANYONG 10 months ago
parent
commit
787f3a9645
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/helpers/calcSpeed.ts

+ 3 - 3
src/helpers/calcSpeed.ts

@@ -160,13 +160,13 @@ export const getGradualLengthByXml = (xml: string) => {
 	// 结尾处手动插入一个音符节点
 	eles.push({
 		ele: notes[notes.length - 1],
-		index: notes.length,
+		index: notes.length-1,
 		noteInMeasureIndex: 0,
 		textContent: "",
 		type: "metronome",
 		allDuration: 1,
-		leftDuration: 1,
-		measureIndex: measures.length,
+		leftDuration: 0,
+		measureIndex: measures.length-1,
 	});
 
 	const gradualNotes: GradualNote[] = [];