Improve handling of time and zero-pressure events in MIDI export

This commit is contained in:
2026-07-14 06:48:53 +02:00
parent 4bba670084
commit 06efaaa0ea
2 changed files with 20 additions and 1 deletions

View File

@@ -52,11 +52,12 @@ export function buildMidiClipEnvelopes(
}
eventCount++;
const time = event.position / 96;
if (value === previousValue) {
points.push({ time, value });
return;
}
const time = event.position / 96;
points.push({ time, value: previousValue });
points.push({ time, value });
previousValue = value;