try to use local soundfont by default

This commit is contained in:
josc146 2023-11-29 19:17:19 +08:00
parent e858f1477a
commit e687cf02bb

View File

@ -1,5 +1,5 @@
import commonStore, { MonitorData, Platform } from './stores/commonStore'; import commonStore, { MonitorData, Platform } from './stores/commonStore';
import { GetPlatform, ListDirFiles, ReadJson } from '../wailsjs/go/backend_golang/App'; import { FileExists, GetPlatform, ListDirFiles, ReadJson } from '../wailsjs/go/backend_golang/App';
import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshLocalModels, refreshModels } from './utils'; import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshLocalModels, refreshModels } from './utils';
import { getStatus } from './apis'; import { getStatus } from './apis';
import { EventsOn, WindowSetTitle } from '../wailsjs/runtime'; import { EventsOn, WindowSetTitle } from '../wailsjs/runtime';
@ -148,4 +148,10 @@ async function initMidi() {
EventsOn('midiMessage', async (data: MidiMessage) => { EventsOn('midiMessage', async (data: MidiMessage) => {
await (await import('./pages/AudiotrackManager/AudiotrackEditor')).midiMessageHandler(data); await (await import('./pages/AudiotrackManager/AudiotrackEditor')).midiMessageHandler(data);
}); });
if (await FileExists('assets/sound-font/accordion/instrument.json')) {
commonStore.setCompositionParams({
...commonStore.compositionParams,
useLocalSoundFont: true
});
}
} }