Root cause: child plugin_host render ~50x real-time (9323 blocks/s), bridge
đọc slot đang bị child ghi đè (torn read) và mỗi segment của 1 DAW block
đọc từ nhiều child block khác nhau -> discontinuity -> tạch thay vì âm thật.
- SandboxHostIPC: thêm bridgeConsumed[2] cuối struct (append-only, offsets
cũ giữ nguyên) — child đếm publish/slot, bridge đếm consume/slot.
- plugin_host_main.cpp: sau khi publish 1 block, chờ bridge consume xong
block đó mới render block kế (wait-sau-publish, không phải wait-trước-
render — wait-trước vẫn cho phép publish 2 block liên tiếp giữa 2 lần
consume -> bridge đọc latest sẽ bỏ block). Child giờ publish đúng 1
block/DAW block = real-time; bridge không bao giờ stall (main loop DAW
render + pace mọi iteration) nên không deadlock; nếu bridge chết,
parent_alive break wait.
- SandboxVst2Host: copy full 256 mẫu vào local buffer khi slot đổi, serve
mọi segment của 1 DAW block từ 1 child block nhất quán.
Verify: child pace 371 blocks/2s (real-time 375, trước 18647); domFreq của
waveform = 257.8Hz đúng nốt C4 (note 60) — âm thật, không phải noise;
correlation giữa các block liên tiếp âm đều ~-0.4 (waveform tuần hoàn);
GUI open path không deadlock (pace vẫn real-time, jBridge dialog + Qin_VST_
Window hiện đủ); GUI đóng -> child idle delta 0; silence_all master peak
0.000016.
- plugin_host_main.cpp WM_CLOSE: destroy host window (sau effEditClose
jBridge dialog cũ vẫn sống trong host; mở lại trên cùng window tạo
jBridge dialog thứ 2 chồng lên -> nền trắng, editor không load). Mở lại
tạo window mới sạch, đúng 1 jBridge dialog + Qin_VST_Window.
- plugin_host_main.cpp: bỏ idle-skip khi editor đang attach — preview phím
MIDI trong GUI là âm nội bộ plugin, không qua host MIDI; vòng loop idle
không gọi processAudioBlock nên voice nội bộ không bao giờ render (câm).
GUI mở -> render liên tục; GUI đóng vẫn idle như cũ.
- Verify: mở/đóng/mở lại GUI ch1 -> host mới, đúng 1 editor, âm ch1 peak
0.13 (GUI mở) / 0.10 (sau đóng); bridgeWrite tăng liên tục khi GUI mở.
- plugin_host_main.cpp: chặn WM_CLOSE (đóng GUI nhưng giữ window sống, hide
thay vì destroy), WM_DESTROY reset hwnd; dùng g_hostHwnd toàn cục thay
hwnd local để control OPEN_GUI/CLOSE_GUI tái sử dụng đúng window.
- main.cpp: bỏ qua dedupe hasAttachedView cho instrument child-own
(SandboxVst2Host) — bridge guiOpen_ stale sau khi child tự đóng nên
OPEN_GUI lặp lại phải forward control 4; child tự chặn double-open.
- Verify: WM_CLOSE -> window ẩn còn sống; OPEN_GUI lần 2 -> window hiện lại,
âm ch1 vẫn kêu (peak 0.15), không câm.
1) wavesynth tự phát khi mở app: probe calibrate() render vào live mix
(renderAll process cùng instance) -> thêm calibratingCh_[16], renderAll
bỏ qua channel đang calibrate; plugin_host panic (sustain off + all
notes off + 128 noteOff) ngay sau preset apply để startup im lặng.
2) bấm GUI mở 2 cửa sổ Qin: sandbox VST2 child tự sở hữu top-level window
-> ownsGuiWindow() + main.cpp forward OPEN_GUI control, không tạo native
parent / không registry double-open.
3) play phát nhạc cụ sai: restore clobber — seed preset đè patch thật trong
state file (ch3 63ba3667 -> 7f07473c) do saveStateJob chạy lúc child còn
seed. Fix: queuePreset(waitApply=true) chờ child apply xong (presetOut
memcmp), consume-before-apply (zero presetInLen trước khi apply), deferred
double-load re-check trong main.cpp skip assign trùng path, watchdog
respawn re-queue lastPreset_.
Makes the unlimited-Qin fix durable: bridge writes
%APPDATA%\jBridge\SettingsFilesFor{64,32}BitPlugins\Qin_RV.jBridge
at startup when missing, so every Qin instance runs in its own
auxhost on any machine. Verified: 4 Qin ch0/1/2/9 live, 4 auxhost.exe,
0 ML_RELEASE_ERROR, GUI attachView ok=1 on all.
Qin_RV_x64.dll (Kong Audio) crashed with SEH 0xc0000005 in Bridger64.dll
using the stale install binary (pre-ABI-fix). Copy native_bridge build
Release binary into install/ so the packaged app runs the fixed host.
Also open the native GUI after loading a VST2 instrument (previously
VST3-only), so Qin_RV's editor (Qin_VST_Window via auxhost.exe) shows
automatically on track load.
React onWheel is passive so e.preventDefault() was a no-op, letting the
TCP panel scroll and the ruler slip away from the cursor (no snap).
Add native non-passive capture listener that preventDefault()s wheel
events starting on [data-sf-wheel] ruler containers.
- serializeProjectToSchema now writes master volume_db and mastering gui_open_path/name
- deserialize restores masterVolume + masteringSettings.gui_open_path/name
- track vst_gui_open_path/name fallback to live state (not just _persistFxGui*)
- MasteringModal/FXRackModal reopen effects react to isOpen + restored gui path
- openMasterVstGui/openVstGui store gui name for reopen
- bridge: /preset capture endpoint + RenderFxJob.captureState for GUI knob state
Scroll wheel giảm/tăng volume chỉ hoạt động trên input 4px; chuyển
onWheel+onDoubleClick lên row div (label+dB span cũng ăn), giữ bubbling
từ input. Áp dụng cho main TCP và sub-tab, cả app.jsx và precompiled.
Close/reopen of Mastering panel or FX Rack unmounted the modal, losing
masterGuiOpen/fxGuiOpen state. The native bridge window stayed alive but
hidden, so reopening the panel showed no GUI and no /show was re-posted —
user could not interact with the VST GUI. Persist the embed state at module
scope so remount re-anchors and re-shows the window automatically.
- RenderFxJob: offscreen fx-gui window now WS_POPUP (borderless) so
GetWindowRect == client rect; anchored placement over the embed panel is
exact. WS_OVERLAPPEDWINDOW put the client ~31px lower/right -> cursor
jumped on hover and clicks hit the webview (relay rejected).
- AdjustWindowRect sizes to the window's own style (no caption for POPUP).
- FxGuiServer: mousemove only SetCursorPos while dragging (buttons!=0);
hover no longer teleports the cursor.
- FxGuiServer /show: skip SetWindowPos/resize when rect unchanged (frontend
now re-POSTs /show every ~500ms to re-anchor on scroll/resize).
- app.jsx VstGuiEmbed: drop shownRef one-shot; re-POST /show each refresh.
- Rebuilt bridge (6 locations) + Tauri release (embedded sidecar) + v=202608190002.
bridge_status (Rust binary cu, chua co V10 field loaded_channels) -> queryStatus
fallback khong co loaded_channels -> lc undefined -> silent return 6626 lam GUI
chet im lang o click 2. Bo silent return: mo GUI truc tiep tren bch, an toan vi
C++ handleOpenGui DEFER khi channel chua co instrument.
sf.write() float32 WAVs carry a fact chunk; strict 44+data_size check was
too narrow. Walk chunks instead; bridge header bug (half data_size) still
caught because its data chunk must run to EOF.
- finishWav call sites accumulated n*4 (stereo 16-bit) but float32 writer
emits n*8 bytes -> RIFF/data chunk sizes half the real value; players and
soundfile truncated renders to half length
- gate test now asserts file size == 44 + data_size to catch this