fix: preserve overlapping notes with same end time in ABC conversion

This commit is contained in:
Xiaohan-Tian
2025-08-28 19:44:21 -07:00
parent 6445325f3a
commit 1fd1486c59
+1 -1
View File
@@ -261,7 +261,7 @@ function formatABCBody(notes: KGMidiNote[], relativeStartBeat: number, timeSigna
while (nextIndex < abcNotes.length && currentNote.endTick > abcNotes[nextIndex].startTick) { while (nextIndex < abcNotes.length && currentNote.endTick > abcNotes[nextIndex].startTick) {
const nextNote = abcNotes[nextIndex]; const nextNote = abcNotes[nextIndex];
if (currentNote.endTick >= nextNote.endTick) { if (currentNote.endTick > nextNote.endTick) {
// Current note completely covers next note - remove next note // Current note completely covers next note - remove next note
abcNotes.splice(nextIndex, 1); abcNotes.splice(nextIndex, 1);
// Don't increment nextIndex since we removed an element // Don't increment nextIndex since we removed an element