FIX: preview soundfont (MIDI keyboard) không tự động qua mastering FX main out
- Thêm ensureMasteringRouting() đồng bộ graph mastering + routing SF + route gains NGAY trước khi preview (keybed onMouseDown, playDrawPreview, playMidiPreview, mở piano roll tab) — hết phải bật/tắt nút power mới có tác dụng - applyMasteringSettings sig thêm masterConnected/isBypassed — toggle power luôn re-apply tham số module
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
### [2026-08-10] Task: Preview soundfont + MIDI keyboard không đi qua mastering FX main out (phải bật/tắt power mới có tác dụng)
|
||||
- **Tóm tắt thay đổi:** Routing âm thanh SF preview (keybed/draw/MIDI file) chỉ được đồng bộ khi masteringSettings ĐỔI (toggle power) — bắt đầu preview KHÔNG chạy lại `updateSfRouting` + đồng bộ route gains → âm preview không tự động qua mastering chain cho tới khi bật/tắt nút power. Fix: (1) thêm `ensureMasteringRouting()` trong App (toggleMasteringOnMaster theo trạng thái hiện tại — early-return nếu đúng; applyMasteringSettings; updateSfRouting) — gọi tại: keybed onMouseDown, playDrawPreview, playMidiPreview (Media Explorer), mở piano roll tab (setTimeout 60ms sau setActiveTab); (2) thêm `masterConnected`/`isBypassed` vào sig của `applyMasteringSettings` — toggle power luôn re-apply tham số module (hết blind-spot early-return); (3) expose `window.__ensureMasteringRouting`. Đã kiểm chứng bằng test jsdom (AudioContext mock theo dõi connect): khi mastering ON, path SF_ROUTE → masterBus.input → inputAnalyser → eqLowFilter (mastering chain) → destination là ĐÚNG — vấn đề nằm ở chỗ không re-sync routing tại thời điểm preview.
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js` (rebuild babel), `app/templates/index.html` (?v= bump 202608101400), `dist/daw_engine/_internal/app/static/**` + `templates/index.html`
|
||||
- **Ghi chú/Test (nếu có):** pytest 86 passed, 7 skipped. Smoke test jsdom: bundle eval OK; bundle chứa __ensureMasteringRouting (5 chỗ) + sig masterConnected. Test graph jsdom: SF → EQ module đạt khi mastering ON (cả từ đầu lẫn sau toggle) — routing wiring đúng, fix tập trung vào re-sync khi preview.
|
||||
|
||||
### [2026-08-10] Task: Fix 6 lỗi âm thanh/Carla/temp-save/Ctrl-S/FX Chain
|
||||
- **Tóm tắt thay đổi:**
|
||||
(1) **Soundfont preview âm loop không dừng**: `soundfontPlayer.js` — note đang CHỜ load soundfont giờ được đăng ký trong `_pendingNoteOns` + `_noteGeneration` trước khi load → `stopNote` (thả phím MIDI Keyboard) / `stopAll` / `panic` hủy được note deferred (trước đây note bắn TRỄ sau khi thả phím/Stop → âm loop không dừng).
|
||||
|
||||
Reference in New Issue
Block a user