docs: wiki entry activeNotes array fix

This commit is contained in:
2026-07-27 16:00:42 +07:00
parent 8965643450
commit 15ec35d8d9
+6
View File
@@ -433,6 +433,12 @@
- **Ghi chú/Test (nếu có):** Server render (pyfluidsynth) + client preview (FluidSynth WASM) = cùng C++ core → 100% audio parity. Cần clear browser cache. Babel 8 syntax error pre-existing (JSX `{ if(...) { } }` trong app.jsx), không rebuild được app.precompiled.js.
---
### [2026-07-27 15:59] Fix: _activeNotes array — multi-track ARM cùng pitch
- **Tóm tắt thay đổi:** Khi 2 track ARM play cùng MIDI pitch, `_activeNotes['0:60']` bị overwrite (track2 ghi đè track1). `stopNote` chỉ stop 1 track. Fix: `_activeNotes[key] = [ch1, ch2, ...]` array. `stopNote` iterate all channels.
- **Các file ảnh hưởng:** `soundfontPlayer.js`
- **Ghi chú/Test (nếu có):** ARM 2 track, play note → thả phím → cả 2 track stop.
---
### [2026-07-27 15:47] Fix: Multi-track ARM + activeNotes cho stopNote
- **Tóm tắt thay đổi:** MIDI handler `find(t=>isArmed)``filter(...)` loop all armed tracks. Thêm `_activeNotes[ch:pitch]` map để `stopNote` lookup đúng channel sau khi đổi SoundFont (channel allocation thay đổi).
- **Các file ảnh hưởng:** `soundfontPlayer.js`, `app.precompiled.js`