fix(media-explorer): bridge preview channel 15 + NOTE_ON timing; synth dropdown portal

This commit is contained in:
2026-08-16 16:58:18 +07:00
parent 574c2f885d
commit 223023615d
3 changed files with 32 additions and 10 deletions
+4 -1
View File
@@ -3,7 +3,7 @@
// bridge connected -> NativeBridgeService.dispatchMidiEvent (Rust SHM -> C++ bridge)
// bridge down -> onFallback callback (app.jsx wires SonicSF/Carla path).
(function () {
var MELODIC_CHANNELS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15]; // skip 9 (percussion)
var MELODIC_CHANNELS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14]; // skip 9 (percussion); 15 reserved for Media Explorer preview
var router = {
bridgeConnected: false,
@@ -24,6 +24,9 @@
/** trackId -> MIDI channel; percussion (bank 128) -> ch 9. */
allocateChannel: function (trackId, isPercussion) {
// Media Explorer preview dùng channel 15 cố định — tránh đè channel
// melodic track (0-8,10-14) / percussion (9) đang giữ instrument.
if (trackId === 'media_explorer') return 15;
if (this._channels[trackId]) return this._channels[trackId].ch;
var ch;
if (isPercussion) {