From b5344e41f749352e97ec40126b38c71b4f1a847e Mon Sep 17 00:00:00 2001 From: 3dtours Date: Mon, 27 Jul 2026 20:09:49 +0700 Subject: [PATCH] fix: default instrument for tracks without instrument set _playNoteFluid: when no synthEngine and no program, fallback to program 0 on channel (default piano) so unconfigured tracks still produce sound via FluidSynth --- app/static/js/services/soundfontPlayer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/static/js/services/soundfontPlayer.js b/app/static/js/services/soundfontPlayer.js index 4edc156..b2ecae9 100644 --- a/app/static/js/services/soundfontPlayer.js +++ b/app/static/js/services/soundfontPlayer.js @@ -392,6 +392,11 @@ try { _fluidModule._fluid_synth_program_change(_synthPtr, ch, usedProg); } catch (e) {} + } else { + if (ch === undefined) ch = 0; + try { + _fluidModule._fluid_synth_program_change(_synthPtr, ch, 0); + } catch (e) {} } if (ch === undefined) ch = (usedBank === 128 ? 9 : 0); var ctx = getCtx();