FIX: (1) masteringConnected default true + ensureMasteringRouting/refreshCarlaStatus ở mọi đường play — MIDI item/preview qua mastering ngay khi chạy app; (2) _instrumentEpoch chống cache stale + retry bank 0 — hết chọn Synth String nghe Piano; (3) /carla-status + auto-open Carla + route exclusive chỉ khi Carla sống (fallback FluidSynth tránh câm); (4) keybed giữ note theo thời gian bấm (auto-off 5s phòng hờ, mouseup dừng ngay)
This commit is contained in:
@@ -681,6 +681,21 @@ def _send_carla_all_notes_off() -> bool:
|
||||
return ok
|
||||
|
||||
|
||||
@router.get("/carla-status")
|
||||
async def carla_status():
|
||||
"""Kiểm tra Carla bridge còn sống không (do app spawn) + cổng OSC đang dùng.
|
||||
|
||||
Frontend dùng để quyết định: route MIDI item EXCLUSIVE qua Carla (chỉ khi
|
||||
Carla đang chạy) hay fallback FluidSynth (luôn có âm) — tránh câm toàn
|
||||
phần khi Carla bị đóng."""
|
||||
_prune_carla_processes()
|
||||
return {
|
||||
"success": True,
|
||||
"running": len(_CARLA_PROCESSES) > 0,
|
||||
"osc_port": _carla_osc_port(),
|
||||
}
|
||||
|
||||
|
||||
@router.post("/carla-stop")
|
||||
async def carla_stop(authorization: Optional[str] = Header(None)):
|
||||
"""Unload Carla bridge: tắt mọi note đang ngân + terminate tiến trình Carla
|
||||
|
||||
Reference in New Issue
Block a user