feat(fx): Phase 1 DAW chain hop nhat — fx_realtime chain JSON giu thu tu, SET_PARAM/REPORT_LATENCY qua WS text, native_render chain builtin+vst3 xen ke, pytest
This commit is contained in:
@@ -232,6 +232,8 @@ def render_fx_chain(input_wav, fx_chain, sample_rate, out_path=None) -> str:
|
||||
)
|
||||
slots = []
|
||||
for fx in fx_chain or []:
|
||||
if not isinstance(fx, dict) or fx.get("active") is False:
|
||||
continue
|
||||
typ = fx.get("type")
|
||||
if typ == "vst3":
|
||||
p = (fx.get("path") or "").strip()
|
||||
@@ -244,7 +246,15 @@ def render_fx_chain(input_wav, fx_chain, sample_rate, out_path=None) -> str:
|
||||
slots.append({"type": "vst3", "path": resolved,
|
||||
"preset_b64": fx.get("preset_b64", "") or "",
|
||||
"bypass": bool(fx.get("bypass"))})
|
||||
elif typ in ("eq", "eqpro", "imager", "maximizer", "compressor",
|
||||
"limiter", "exciter", "rebalance"):
|
||||
# Builtin DSP — chain hợp nhất (spec PLAN_DAW_A.md Phase 1). C++
|
||||
# RenderFxJob xử lý theo id/params (Phase 2); giữ NGUYÊN thứ tự.
|
||||
slots.append({"type": "builtin", "id": typ,
|
||||
"params": dict(fx.get("params") or {}),
|
||||
"bypass": bool(fx.get("bypass"))})
|
||||
elif typ == "builtin":
|
||||
# Legacy: {type: builtin, id: gain} — giữ cho project cũ.
|
||||
slots.append({"type": "builtin", "id": fx.get("id", "gain"),
|
||||
"params": dict(fx.get("params") or {}),
|
||||
"bypass": bool(fx.get("bypass"))})
|
||||
|
||||
Reference in New Issue
Block a user