feat(build): Phase 7 — verify 10 mục + fix export MIDI thiếu delta-time + fix WAV float32

This commit is contained in:
2026-08-21 15:29:47 +07:00
parent a667d0354f
commit bcd8e37e86
4 changed files with 2194 additions and 2164 deletions
+1
View File
@@ -275,6 +275,7 @@ def _build_midi_file(req: MidiExportRequest) -> bytes:
events.sort(key=lambda e: (e[0], 0 if e[1] == 0x80 else 1))
body = bytearray()
name_bytes = (tr.name or "Track").encode("utf-8", "replace")[:255]
_write_vlq(body, 0) # delta-time 0 bat buoc truoc meta event - file chuan MIDI (mido/DAW parse duoc)
body.append(0xFF); body.append(0x03); body.append(len(name_bytes)); body.extend(name_bytes)
last = 0
for tick, status, pitch, vel in events: