fix: section track plays GM Piano via program default 0
section cloned tracks have instrumentProgram:undefined. Line 10283 defaulted to 0 -> FluidSynth program_change(ch,0) -> plays whatever SoundFont is loaded (MAIN SF). Added _isSectionClone flag; line 10283 skips program default for section clones -> undefined -> _playNoteFluid silent return.
This commit is contained in:
@@ -539,6 +539,12 @@
|
||||
- **Ghi chú/Test (nếu có):** `npm run build` pass. Ctrl+Click+Drag section/MIDI item → copy đến vị trí mới, item không bị selected.
|
||||
---
|
||||
|
||||
### [2026-07-28 09:30] Task: Thêm _isSectionClone flag — tắt âm thanh mặc định trong SECTION-TAB
|
||||
- **Tóm tắt thay đổi:** Thêm `_isSectionClone: true` vào section cloned tracks. Line 10283 kiểm tra flag: nếu section clone và không instrument → `undefined` (silent); nếu MAIN track và không instrument → `0` (GM Piano). Trước đây section cloned tracks đi qua line 10283 với `instrumentProgram: undefined` → default 0 → play GM Piano.
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
|
||||
- **Ghi chú/Test (nếu có):** `npm run build` pass. SECTION-TAB không instrument → im lặng. MAIN track không instrument → GM Piano.
|
||||
---
|
||||
|
||||
### [2026-07-28 09:27] Task: Silent fallback — không nghe âm thanh mặc định
|
||||
- **Tóm tắt thay đổi:** Thay oscillator fallback bằng silent return trong `_playNoteFluid` (soundfontPlayer.js:395). Khi không có instrument data, không play bất kỳ âm thanh nào (cả oscillator lẫn FluidSynth).
|
||||
- **Các file ảnh hưởng:** `app/static/js/services/soundfontPlayer.js`
|
||||
|
||||
Reference in New Issue
Block a user