feat: tách luồng âm instrument theo môi trường — docker dùng FluidSynthWASM, standalone dùng native pyfluidsynth (+Carla VSTi)
- runtime: detect()/capabilities() trả environment (docker|standalone) - vst_engine: render_soundfont_midi_to_audio (pyfluidsynth native, event-stream, release tail) - plugins: POST /soundfont-render — render MIDI notes -> WAV (auth, fallback default SF) - frontend: SonicRuntime.environment + dataset.environment; app.jsx route preview/transport: standalone+SF -> soundfont-render WAV (playNativeSfNote/scheduleNativeSfItem), docker giữ WASM, VSTi standalone giữ Carla bridge
This commit is contained in:
@@ -20,9 +20,15 @@ window.SonicRuntime = window.SonicRuntime || { loaded: false, capabilities: null
|
||||
var c = data && data.success ? data : { features: {} };
|
||||
window.SonicRuntime.capabilities = c;
|
||||
window.SonicRuntime.loaded = true;
|
||||
// environment: "docker" | "standalone" — quyết định luồng âm
|
||||
// instrument: docker → FluidSynthWASM (client), standalone →
|
||||
// native (backend pyfluidsynth / Carla). Không phải docker =
|
||||
// standalone (Windows/Linux/macOS chạy trực tiếp trên OS).
|
||||
window.SonicRuntime.environment = c.environment || (c.docker ? 'docker' : 'standalone');
|
||||
var html = document.documentElement;
|
||||
html.dataset.runtime = c.runtime || 'unknown';
|
||||
html.dataset.platform = c.platform || '';
|
||||
html.dataset.environment = window.SonicRuntime.environment;
|
||||
html.dataset.carla = (c.features && c.features.carla_local) ? '1' : '0';
|
||||
if (c.features && c.features.carla_local === false) {
|
||||
document.querySelectorAll('[data-carla-only]').forEach(function (el) {
|
||||
|
||||
Reference in New Issue
Block a user