Przeglądaj źródła

Merge branch 'feature-tianyong' into klx-test

TIANYONG 3 miesięcy temu
rodzic
commit
c5428a8e6f
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 1 1
      osmd-extended
  2. 2 1
      src/helpers/formateMusic.ts

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 2932a178d64983901e533ffd0d6abb1a8235a046
+Subproject commit 251b2c2d7bf36880c97129563e86400f971485c8

+ 2 - 1
src/helpers/formateMusic.ts

@@ -1138,7 +1138,8 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 				notes.push(...n.Notes);
 				return notes;
 			}, [] as any);
-			voiceNotes = voiceNotes.filter((note: any) => !note.IsGraceNote)
+			// 过滤掉倚音和和弦音符
+			voiceNotes = voiceNotes.filter((note: any) => (!note.IsGraceNote && !note.IsChordNote) )
 			voiceNotes = voiceNotes.sort((a: any, b: any) => a?.length?.realValue - b?.length?.realValue);
 			currentTime = voiceNotes?.[0]?.length?.realValue || 0;