fix: section track plays GM Piano via program default 0
section cloned tracks have instrumentProgram:undefined. Line 10283 defaulted to 0 -> FluidSynth program_change(ch,0) -> plays whatever SoundFont is loaded (MAIN SF). Added _isSectionClone flag; line 10283 skips program default for section clones -> undefined -> _playNoteFluid silent return.
This commit is contained in:
@@ -8505,7 +8505,8 @@ const App = () => {
|
||||
monitoringEnabled: true,
|
||||
instrumentId: t.instrumentId || null,
|
||||
instrumentProgram: t.instrumentProgram,
|
||||
instrumentName: t.instrumentName || null
|
||||
instrumentName: t.instrumentName || null,
|
||||
_isSectionClone: true
|
||||
})) : tracks.filter(t => t.id === trackId).map(t => ({
|
||||
...t,
|
||||
clips: [],
|
||||
@@ -8521,7 +8522,8 @@ const App = () => {
|
||||
soundfont_bank: undefined,
|
||||
soundfont_program: undefined,
|
||||
instrument_source: null,
|
||||
synth_engine: undefined
|
||||
synth_engine: undefined,
|
||||
_isSectionClone: true
|
||||
}));
|
||||
setSessionTabs(prev => [...prev, { id: tabId, name: tabName, sectionId: sectionId, tracks: clonedTracks, color: section.color || null }]);
|
||||
setActiveTab(tabId);
|
||||
@@ -10280,7 +10282,7 @@ const App = () => {
|
||||
const noteEndSec = noteStartSec + noteDurSec;
|
||||
if (offsetTime < noteEndSec) {
|
||||
const durationMs = noteDurSec * 1000;
|
||||
const program = track.instrumentProgram !== undefined ? track.instrumentProgram : 0;
|
||||
const program = track._isSectionClone ? track.instrumentProgram : (track.instrumentProgram !== undefined ? track.instrumentProgram : 0);
|
||||
if (offsetTime < noteStartSec) {
|
||||
const delay = noteStartSec - offsetTime;
|
||||
const startTime = context.currentTime + delay;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user