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:
2026-08-10 20:38:54 +07:00
parent e89a594b7c
commit a0d8725541
8 changed files with 447 additions and 48 deletions
+4 -1
View File
@@ -332,10 +332,12 @@ def detect() -> dict:
platform = _detect_platform()
runtime = _detect_runtime()
carla = find_carla() if runtime == "desktop" else ""
docker = _in_docker()
return {
"platform": platform,
"runtime": runtime, # "desktop" | "headless"
"docker": _in_docker(),
"docker": docker,
"environment": "docker" if docker else "standalone", # luồng âm instrument: docker→FluidSynthWASM, standalone→native OS
"has_display": _has_display(),
"tauri_bridge": _tauri_bridge_ready(),
"carla_path": carla,
@@ -375,6 +377,7 @@ def capabilities() -> dict:
"runtime": d["runtime"],
"platform": d["platform"],
"docker": d["docker"],
"environment": d["environment"],
"features": features,
"default_dirs": {
"vst": d["default_vst_dirs"],