fix: thêm CC120 (All Sound Off) vào stopNote
_fluid_synth_noteoff chưa đủ để tắt âm với instrument loop. Thêm CC120 kill tất cả voices trên channel để note tắt ngay.
This commit is contained in:
@@ -305,9 +305,8 @@
|
||||
stopNote: function (channel, pitch) {
|
||||
if (channel < 0 || channel > 15) return;
|
||||
if (_initialized && _fluidModule) {
|
||||
try {
|
||||
_fluidModule._fluid_synth_noteoff(_synthPtr, channel, pitch);
|
||||
} catch (e) {}
|
||||
try { _fluidModule._fluid_synth_noteoff(_synthPtr, channel, pitch); } catch (e) {}
|
||||
try { _fluidModule._fluid_synth_cc(_synthPtr, channel, 120, 0); } catch (e) {}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user