Cut short the starting delay of midis if too long

This commit is contained in:
hhhzzzsss 2024-05-31 22:38:00 -05:00
parent 707b5e6f0c
commit 3d2f89e10f

View file

@ -127,6 +127,17 @@ public class MidiConverter {
song.sort(); song.sort();
// Shift to beginning if delay is too long
if (!song.notes.isEmpty()) {
long shift = song.notes.get(0).time - 1000;
if (song.notes.get(0).time > 1000) {
for (Note note : song.notes) {
note.time -= shift;
}
}
song.length -= shift;
}
return song; return song;
} }