feat(build): Phase 7 — verify 10 mục + fix export MIDI thiếu delta-time + fix WAV float32
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user