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) {
|
stopNote: function (channel, pitch) {
|
||||||
if (channel < 0 || channel > 15) return;
|
if (channel < 0 || channel > 15) return;
|
||||||
if (_initialized && _fluidModule) {
|
if (_initialized && _fluidModule) {
|
||||||
try {
|
try { _fluidModule._fluid_synth_noteoff(_synthPtr, channel, pitch); } catch (e) {}
|
||||||
_fluidModule._fluid_synth_noteoff(_synthPtr, channel, pitch);
|
try { _fluidModule._fluid_synth_cc(_synthPtr, channel, 120, 0); } catch (e) {}
|
||||||
} catch (e) {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user