diff --git a/wiki.md b/wiki.md index bbe7c6a..2fedf6a 100644 --- a/wiki.md +++ b/wiki.md @@ -421,3 +421,8 @@ - **Root cause 3:** pitch/channel always integers from msg.data[] ✅ - **Added:** _lazyInit() called from playNote when _initialized false - **Oscillator fallback:** 2000ms instead of 60000ms (quick preview before init) + +### [2026-07-27 12:05] Task: Fix Tremolo String continuous sustain after MIDI note-off +- **Tóm tắt thay đổi:** Root cause: `stopNote()` used CC 123 (All Notes Off) which merely enters SoundFont's release envelope. Sustained instruments like Tremolo Strings (GM#44) have 2-5s release tails. Fix: replaced CC 123 with CC 120 (All Sound Off) in `stopNote()` and `stopAll()`. CC 120 sets `voice.isActive = false` immediately, bypassing the release envelope entirely, so the note stops instantly on key release. +- **Các file ảnh hưởng:** `app/static/js/services/soundfontPlayer.js` +- **Ghi chú/Test (nếu có):** Test với MIDI keyboard + Tremolo Strings instrument: note tắt ngay khi release key. CC 120 tác dụng lên toàn bộ channel (kill all voices) — phù hợp với keyboard preview use-case.