fix: explicit selectInstrument for SpessaSynth bank+program routing
Per md/37_FIXVST3_SUGGEST.md: - Add SonicSF.selectInstrument(channel, bank, program, sfId) method - Always sends controllerChange(CC0, bank) + programChange(prog) to SpessaSynth - _playNoteSpessa also sends CC32 (bank LSB) before programChange - Remove default bank auto-load from init (cleaner startup) - Fix syntax error (double }} from previous edit) - playNote Spessa: use program arg + synthEngine bank/program properly
This commit is contained in:
@@ -6522,10 +6522,11 @@ const App = () => {
|
||||
setInstrumentSelectorTrackId(null);
|
||||
setSynthCategory(null);
|
||||
setSelectedSoundFontId(null);
|
||||
// Trigger SpessaSynth SF3 load when soundfont instrument selected
|
||||
if (window.SonicSF && window.SonicSF.loadSoundFont && instrumentId && typeof instrumentId === 'string' && instrumentId.startsWith('sf_')) {
|
||||
// Trigger SpessaSynth load + program change when soundfont instrument selected
|
||||
if (window.SonicSF && window.SonicSF.selectInstrument && instrumentId && typeof instrumentId === 'string' && instrumentId.startsWith('sf_')) {
|
||||
const sfId = instrumentId.replace('sf_', '');
|
||||
window.SonicSF.loadSoundFont(sfId);
|
||||
const ch = sfBank === 128 ? 9 : 0;
|
||||
window.SonicSF.selectInstrument(ch, sfBank || 0, sfProg || 0, sfId);
|
||||
}
|
||||
setSubTabs(prev => prev.map(s => {
|
||||
if (s.trackId !== trackId) return s;
|
||||
|
||||
Reference in New Issue
Block a user