diff --git a/app/static/js/services/nativeBridgeService.js b/app/static/js/services/nativeBridgeService.js index d7aec79..1643d19 100644 --- a/app/static/js/services/nativeBridgeService.js +++ b/app/static/js/services/nativeBridgeService.js @@ -86,12 +86,14 @@ * 1. LOAD NEW INSTRUMENT INTO BRIDGE (VST3 / VST2 / SF2 / SF3 / SFZ) * instrumentType: 'VST3' | 'VST2' | 'SF2' | 'SF3' | 'SFZ' * channel: MIDI channel to assign this instrument to (A10 multi-instance). + * NOTE: sends a PANIC (all notes off) first so held notes never stick across a hot-swap. */ loadInstrument: async function (filePath, instrumentType, channel) { this.activeInstrumentType = instrumentType; console.log('[BridgeService] Loading ' + instrumentType + ' asset: ' + filePath + ' ch=' + channel); if (!this._tauri()) return false; try { + await window.__TAURI__.core.invoke('transport_control', { kind: 'panic' }); await window.__TAURI__.core.invoke('load_native_instrument', { path: filePath, instrumentType: INSTRUMENT_TYPE[instrumentType] !== undefined ? INSTRUMENT_TYPE[instrumentType] : 0, diff --git a/app/templates/index.html b/app/templates/index.html index d27d853..44ee2cd 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -39,7 +39,7 @@ - + @@ -50,7 +50,7 @@ - +