Commit Graph

15 Commits

Author SHA1 Message Date
admin 7c22ae1f02 refactor(bridge): split fx bridge, stabilize VST3 host chain, drop old install engines
- remove diagnostic canaries from audio hot path (crackle fix) and
  stuck C5 note raw-MIDI test (Vst2Instrument::init noteOff)
- split native bridge into daw_vst_bridge (VSTi) + fx_vst_bridge (VST FX)
- VST3: processData prepare before setActive, zero input buses, accept
  both .vstpreset and bridge-state blob in RenderJob presets
- native_render/vst_engine: bridge-exe discovery + render_fx_chain + /fx-gui
- delete old install/ engine binaries (install via sidecar+resources now)
- add BUILD_LAYOUT.md, build_selfcheck, tools/ diagnostics
2026-08-20 09:42:42 +07:00
3dtours c382afe2a6 feat: embed native VST GUI in mastering + fx rack panels (bridge --fx-gui frame capture + input relay)
Linux parts (0L1-4L1 per TASKS_LINUX_WINDOWS.md):
- native_bridge: FxGuiServer.cpp HTTP server (Winsock) — /frame BitBlt +
  PrintWindow fallback -> JPEG (libjpeg-turbo q70), /input PostMessage relay
  (mouse/wheel/key, coords scaled), /close, /ping; RenderFxJob fxGuiSetup +
  run_fx_gui_server (offscreen); main.cpp --fx-gui dispatch; vcpkg +
  CMakeLists WIN32-only + JPEG.
- api: open_fx_gui embed flag spawn --fx-gui, parse SF_FXGUI_PORT -> embed_url,
  fx-gui/close endpoint; 4 unit tests.
- ui: VstGuiEmbed component (frame refresh 100ms, ping 2s, input relay,
  scale coords) shared by MasteringModal + FXRackModal; swap graph<->GUI,
  cleanup on unmount, dead-bridge toast fallback.
- docs: TASKS_LINUX_WINDOWS.md, WALKTHROUGH_WINDOWS.md, PLAN status.
Windows tasks 0W1-4W1 remain (build + E2E real VST).
2026-08-17 22:37:55 +07:00
admin b261eb0d7e feat: VST FX rack per-track + masterbus render via native_bridge 2026-08-17 21:31:57 +07:00
admin e79dae5d5c phase4: Linux native_bridge build (Docker) — sfizz from source, --render SF2/SFZ
- Dockerfile: build sfizz tu native_bridge/sfizz-src (hoac git clone v1.2.3),
  sed fix sfizz.pc (-llibsfizz -> -lsfizz), cmake bridge voi 3 flag SMTG OFF
  (VSTGUI/plugin/hosting examples) — bridge headless chi can --render.
- CMakeLists: nhanh non-WIN32 build daw_vst_bridge tu main_linux.cpp +
  RenderJob.cpp + NativeInstrumentEngine.cpp (SF2/SF3 + SFZ; VST3/VST2
  hosting Windows-only, guard #ifdef _WIN32). gui_probe/plugin_host/
  seh_channel_test chi build tren Windows.
- RenderJob.cpp: JSON parser (sheredom json.h) khong con phu thuoc
  HAVE_VST3SDK — render SF2/SFZ chay duoc khong can VST3 SDK.
- NativeInstrumentEngine.cpp: guard windows.h/VST3/VST2/Sandbox/SEH.
- main.cpp: g_engine unconditional + guard disable_ime_contexts (_WIN32).
- engine.spec: bo pedalboard collect_dynamic_libs + hidden imports.
- vst_engine/render_engine: DecentSampler -> NotImplementedError + huong
  dan convert .dspreset -> .vstpreset; pianobook fallback synth.
- Verified: WSL Ubuntu 24.04 build OK, bridge Linux --render SF2 ra WAV
  44100 stereo peak 1575; Python tests 115 passed 1 skipped.
- Dockerfile build chua test duoc (may khong co Docker).
2026-08-17 11:46:24 +07:00
admin 0cca84c5f9 feat(bridge): add --render offline CLI (Phase 0 of pedalboard replacement)
daw_vst_bridge --render <job.json> --out <clip.wav> renders MIDI notes
through the same instrument engines as realtime (SF2/SFZ/VST3/VST2) to a
16-bit stereo WAV, headless, no SHM. Mirrors plugins.py/vst_engine.py
note semantics (velocity int(vel*127), bank CC0 + program at t=0, beatSec
60/max(30,bpm), totalNeeded max(1024,endSample), no tail). Chunk clamped
to 256 to match VST3 host prepared buffers. Uses vendored sheredom json.h
(gated on HAVE_VST3SDK); rc: 0 ok, 1 arg/job error, 2 load fail, 3 crash.
Partial output removed on failure. Verified: SF2, SFZ, Nexus VST3 render
non-silent at exact duration; 9/9 tests pass.
2026-08-17 08:04:25 +07:00
admin 4111995a5c Add VST2 hosting to native bridge; fix CC7 data2 routing verified via SHM test
VST2 (Steinberg 2.4 ABI) host via Vst2Instrument: aeffect.h, dispatcher,
process events/replacing, kEffectStartProcess, headless GUI skip.
- create_instrument returns Vst2Instrument for InstrumentType::VST2
- 64B-aligned scratch buffers for SIMD plugins; SEH crash capture module+stack
- plugins.py: VST2 resolves .dll/.so; vst_engine.py reports VST2 type
- app.jsx: derive instrumentType from scan (VST3 vs VST2), not hardcoded
- Install exes refreshed from Release build

SF2 FluidSynth audio verified end-to-end through SHM ring (energy 1.33):
silence was a test-harness bug (CC7 value written to velocity field, bridge
reads data2) — app sends data2 correctly. All temporary diagnostics removed.
2026-08-17 07:55:46 +07:00
admin 462a5104d2 G4.2: bridge-side plugin process pool — SandboxVst3Host spawns/respawns plugin_host.exe per channel, MIDI forward + audio snapshot + watchdog mute/respawn, crash isolation verified 2026-08-16 10:52:04 +07:00
admin 7de00955d8 G4.1: sandbox plugin host (plugin_host.exe) PoC — Nexus runs in child process, GUI + audio via SHM, crash isolation verified 2026-08-16 10:36:01 +07:00
admin 0b8e80fe2c G3.2+G3.3: classify hang/crash vs audio stall + SEH per-channel plugin crash isolation (mute channel) 2026-08-16 10:23:08 +07:00
admin 1fe2d261fd G2.0: StateStore (JSON state file + atomic write) 2026-08-16 07:08:37 +07:00
admin 3587a34e31 G1.1: fix probe crash (std::thread joinable dtor -> terminate); xac nhan openGUI tren worker thread OK; closeGUI truoc teardown 2026-08-15 20:50:43 +07:00
admin eac7f2feb8 G0.4: save/restore preset quanh reload khi close GUI (captureState/restoreState, memorystream link truc tiep) 2026-08-15 20:04:56 +07:00
admin 90241f626f fix crash daw_vst_bridge 0xc000041d khi mở GUI Nexus rồi switch sang Ample: over-gate JUCE message window (g_juceOwnerTids, chỉ chạy khi close_in_flight) + gỡ VEH tạm và mọi log [dbg] chẩn đoán, giữ [NativeBridge] production; deploy exe FINAL (đã verify 3 run driver) 2026-08-15 11:35:50 +07:00
admin d8f8506077 fix: GUI VST native window qua bridge + audio path bridge (SF2 preview/play câm)
- open_vst_gui: bo WebviewWindowBuilder/thread, chi push_control type=4 (hwnd=0 -> bridge tao window)
- main.cpp: create_native_vst_window (class SonicForge_Native_VST3_Class, 800x600, khong TOPMOST),
  tao trong ChannelWorker job, map guiWindows, capture arg2 by value (fix dangling)
- app.jsx: guard isBridgeActive() 8 cho -> bridge active thi moi note di router -> pushEvent -> bridge
  (truoc day SF2 cam vi HAS_PYFLUIDSYNTH=FALSE -> /soundfont-render 501; VST3 path cu dung nativeSf/Carla)
- E2E: SF2 NOTE_ON qua dispatchMidiEvent -> SHM peak 0.029745; Nexus GUI native hwnd OK (license/preset)
- docs: TASKS.md + TEST_NOTES.md ghi batch fix + ket qua; gitignore vendor/junk
2026-08-12 22:12:43 +07:00
locpham c3368d0a91 feat: native host bridge integration — C++ bridge, Rust SHM, JS routing, build scripts, docs
- native_bridge/: InstrumentEngineManager multi-channel, sample-accurate, CC/program/pitchbend, transport, Vst3Instrument stub (HAVE_VST3SDK)
- src-tauri: shm.rs, bridge spawn + audio pump + health monitor, open_vst_gui, externalBin, commands
- app: UnifiedMidiRouter, NativeBridgeService, bridgeAudioNode, audioRoutingEngine, Plugin Manager UI, Bridge/WASM indicator, set_position sync
- build: 3 ps1 (force-added, build/ ignored), verify_bundle --check-bridge, CI workflow
- docs: TASKS.md, TEST_NOTES.md (Windows verify checklist), install/report updates
2026-08-11 23:37:29 +07:00