Ver código fonte

Merge branch 'feature-tianyong' of http://git.dayaedu.com/tianyong/gym-music-score into hqyDev

黄琪勇 5 meses atrás
pai
commit
66a8f01a97
2 arquivos alterados com 3 adições e 3 exclusões
  1. 1 1
      osmd-extended
  2. 2 2
      src/helpers/formateMusic.ts

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 8a653186333a6f49d85b61d348e9009ba2803a07
+Subproject commit 03fa7c2e5b7ad0445360e69636a441ec4f8ea97a

+ 2 - 2
src/helpers/formateMusic.ts

@@ -859,7 +859,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 
 	let preNoteMeasureNumber = 0; // 上一个小节的number值
 
-	let currentRealTempo; // 当前小节的速度与拍号信息
+	let currentRealTempo: any = {}; // 当前小节的速度与拍号信息
 
 	const _notes = [] as any[];
 	if (state.gradualTimes) {
@@ -976,7 +976,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 			note.maxNoteNum = maxNoteNum;
 			note.trackIndex = minIndex;
 			currentRealTempo = iterator.currentMeasure.tempoExpressions.length ? iterator.currentMeasure.tempoExpressions.find((item: any) => item?.InstantaneousTempo?.isMetronomeMark)?.InstantaneousTempo || currentRealTempo : currentRealTempo;
-			const { beatUnit="quarter", dotted=false, tempoInBpm } = currentRealTempo
+			const { beatUnit="quarter", dotted=false, tempoInBpm=state.originSpeed } = currentRealTempo
 			const speedBeatUnit = beatUnitTo(beatUnit, dotted)
 			_notes.push({
 				note,