fix: route PR notes through bridge when active (VST3/SF2 playback via Play button)

Two guards: schedulePianoRollMidi skips native SF item scheduling while bridge is active; scheduleMidiNoteDispatch lets notes pass to the MIDI router when a piano-roll sub-tab is playing. Verified on Windows: SF2 peak 0.026, VST3 ACDD native GUI + peak 0.074 via Play button. Docs: TEST_NOTES.md, TASKS.md.
This commit is contained in:
2026-08-13 08:21:37 +07:00
parent 36fb546d58
commit f8a981b27f
4 changed files with 18 additions and 10 deletions
+7
View File
@@ -79,3 +79,10 @@ chạy từng mục trên máy Windows (hoặc OS native có đủ toolchain),
- `transport_control` Rust giờ nhận `playhead: Option<u32>`; JS `NativeBridgeService.transport(kind, playhead)`.
- `loadInstrument(filePath, type, channel)`; `dispatchMidiEvent(cmd,...,data2,data3)` hỗ trợ CC/PROGRAM/PITCH_BEND.
- Khi D8 (track→channel map) chưa xong: JS loadInstrument mặc định channel=0 — multi-instance chưa kích hoạt từ UI.
## Kết quả test THẬT Windows 2026-08-12 (build HEAD 36fb546, app.precompiled.js đã sửa 2 guard)
-**YÊU CẦU 1 (SF2 → âm):** Track 01 load `024_BigSymphny` (SF2) → insert MIDI item + note C4 → PR play qua nút Play: `[Play] PianoRoll schedule: notes=1 | track=1`**peak SHM 0.026468**. NOTE_ON dispatch → 0.032. Keybed C4 → 0.0536.
-**YÊU CẦU 2 (VST3 native GUI + âm):** Track 01 chọn VST3 **ACDD** (Ample Sound, `C:\Program Files\Common Files\VST3\Ample Sound\ACDD.vst3`) → `[Bridge] track 1 -> bridge VST3 ch 0 OK` → native GUI mở: class `SonicForge_Native_VST3_Class`, title `ACDD`, client 784x561, child JUCE window. Keybed C4 → **peak 0.115554**; dispatch NOTE_ON ch0 → **0.153984**; PR play qua nút Play → **0.073984** (`[Play] ... sfEngine=no | dest=ok`).
- ⚠️ Phím Space (shortcut transport) qua CDP synthetic/trusted event KHÔNG kích play trên app đang chạy (webview đang giữ bundle cũ cache từ lúc start; cần restart app để load bản v=1700 mới). Nút Play trên transport hoạt động chuẩn. Chưa xác định được lỗi thật của Space — không thuộc 2 yêu cầu bắt buộc.
- ⚠️ Nexus VST3 silent (license). Dùng ACDD demo để chứng minh âm.
- ⚠️ daw_engine.exe serve index.html từ memory lúc start (v=202608121600) dù file trên đĩa đã bump v=202608121700 → restart app mới nhận build mới.
- Ghi chú deploy: copy `app/static/js/app.precompiled.js` + `app/templates/index.html``dist/`, `src-tauri/resources/`, `src-tauri/target/release/` (cùng dưới `daw_engine/_internal/app/`), bump `?v=` chống cache.