fix(bridge): đồng đều âm lượng VSTi jbridge, GUI native lên top, modal instrument lọc FX

- calibrate: probe sandbox (jbridge) theo real-time pacing — child render qua SHM
  consumer-sync, probe µs-speed chỉ đo được silence/attack → makeup=1.0 mọi channel.
  Thêm virtual probeNeedsRealtime() (SandboxVst2Host → true), calibrate() Sleep
  ~1 block/5.8ms để child kịp nhận MIDI + render steady-state → makeup đo peak thật
  (3 channel Qin ≈ 2.6, trước đây = 1.0 → âm lượng đồng đều giữa các track/VSTi).
- OPEN_GUI: SetWindowPos(HWND_TOPMOST) + SetForegroundWindow + BringWindowToTop
  → GUI VSTi hiển thị ở top window, tương tác ngay.
- /api/v1/plugins/available: filter vst_instruments + extra theo is_fx của
  fx_vst_bridge --scan (trước merge entry) — modal Select Instrument chỉ còn
  soundfont + VSTi, không hiện VST FX (90 → 33).
This commit is contained in:
2026-08-21 10:18:25 +07:00
parent da7ae02509
commit d7756b08ab
6 changed files with 41 additions and 2 deletions
@@ -83,6 +83,13 @@ public:
virtual uint32_t bankOf(uint32_t channel) const { return 0; }
virtual uint32_t programOf(uint32_t channel) const { return 0; }
// Engines whose render is paced by an external process (sandbox VST2
// child): the auto-calibration probe must consume at ~real-time speed so
// the child can wake, pick up the MIDI and render each block. Direct
// engines (VST3/VST2-in-proc/SF2/SFZ) render synchronously in
// processAudioBlock and probe at µs speed.
virtual bool probeNeedsRealtime() const { return false; }
// Real-time Audio PCM Float32 rendering loop
virtual void processAudioBlock(float* outputL, float* outputR, uint32_t numSamples) = 0;
};