Commit Graph

33 Commits

Author SHA1 Message Date
admin 1390ad545b Phase 2: BuiltinFxChain C++ (8 DSP) + control ring SET_PARAM/REPORT_LATENCY
- native_bridge/src/BuiltinFxChain.{h,cpp}: 8 builtin DSP port 1:1 từ
  Python _apply_builtin_fx_chain (eq/eqpro/compressor/limiter/exciter/rebalance)
  và JS MASTER_MODULE_IO (imager/maximizer). Biquad RBJ DF2T, block-wise
  stateful. createBuiltinFx trả nullptr cho gain/normalize (legacy).
- RenderFxJob: FxSlot thêm bfx, parse builtin 8 loại, runBuiltinSlotSafe SEH,
  realtimeRunChain nhánh builtin, chainGen()/entryLatencies(), setParam
  áp live lên bfx; Vst3Fx latencySamples từ getLatencySamples().
- RealtimeFxLoop: drain ctrl ring (SET_PARAM -> chain.setParam, drop cũ khi
  đầy) + REPORT_LATENCY khi gen đổi (ipc->lat[] ring, lastGen).
- FxRealtimeIPC.h: header 18 u32 (72B), ctrl/lat slots 8, FxCtrlCmd 24B,
  FxLatReport 8B, static_asserts.
- app/core/fx_realtime.py: mirror header 72B (ctrl_write/read, lat_write/read,
  slots), set_param ghi ctrl ring qua _ctrl_enqueue_locked (guard shm),
  get_latencies drain lat ring qua _lat_drain.
- tests/test_builtin_fx_golden.py: golden SNR C++ vs Python (8 cases, ngưỡng
  30dB) + order test eq/compressor xen kẽ.
- TASKS_DAW_A.md: tick 2.1-2.9.

Test: 136 passed (4 fx_realtime_chain + 8 builtin golden + regression).
2026-08-22 19:55:08 +07:00
admin fd790c1dc6 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 2026-08-22 19:26:43 +07:00
admin 5ad2c681e7 Remove Carla native VSTi bridge entirely
Drop Carla integration across frontend and backend:
- plugins.py: remove /carla-midi, /carla-status, /carla-stop, /open-in-carla,
  /carla-play-notes endpoints and Carla process management
- runtime.py: remove find_carla / _carla_* helpers, detect and capabilities
- app.jsx: remove Carla bridge UI, SonicCarlaMidi routing, shouldRouteCarla
  guards, VST row Carla button and preset fallback
- system.py: remove /carla-path
- Keep audio path unchanged (tracks -> masterBus -> output -> analyser),
  directOut only for offline render

Build frontend, tests pass (124 passed).
2026-08-22 18:39:49 +07:00
admin 6dfe390bda feat(fx-gui): đưa audio vào process GUI — meter VST nhảy theo âm thật qua SHM peek
- GUI process peek ring SHM đầu vào (không consume, không tranh chấp RealtimeFxLoop)
- gọi fx->processAudio() trên instance GUI để meter/UI plugin chuyển động theo âm thật
- performEdit forward sang controller -> meter điều khiển bởi param cũng cập nhật
- bridge /shm: frontend đẩy tên session live vào mỗi GUI đang mở (start/stop/open)
- tests: 127 passed
2026-08-22 17:06:37 +07:00
admin edc647ded6 fix(rt): restart fxRt khi chain VST doi trong luc realtime dang chay
- masteringSettings effect goi fxRtStart() khong dieu kien: early-return
  khi active + cung chainKey, stop+start lai khi chain doi (insert/remove/
  bypass/reorder VST trong MASTER FX CHAIN) — truoc day nhanh chainKey
  chet vi branch chi chay khi !fxRt.active
- test list_scan_all: path plugin phai ton tai tren dia (loc entry chet
  truoc cache); dung _scan_json helper voi file that trong tmp_path
- bump cache-bust app.precompiled.js -> 202608212300
2026-08-22 16:13:10 +07:00
3dtours 34d43f5018 fix(fx-list): MASTERING PANEL khong hien thi VST FX da scan trong Plugin Manager (cache _fx_scan_all ket [] vinh vien)
- vst_engine: list_scan_all cache co TTL 300s (FX_SCAN_TTL) + chi cache khi
  find_fx_bridge_exe() co exe (thieu bridge -> tra [] NHUNG khong cache de
  lan sau thu lai) — truoc day ket [] vi mui gio, MASTERING PANEL rong.
- vst_engine: them invalidate_fx_scan() clear cache scan VST.
- plugins.py: POST /scan (Plugin Manager Scan) goi _invalidate_fx_scan_cache()
  -> MASTERING PANEL lan mo ke tiep quet lai voi dirs moi; response them
  fx_cache_invalidated.
- app.jsx: MasteringModal/FXRackModal load listFx() lai moi lan mo modal
  (deps [isOpen]/[track.id]) + loading state; VstPluginPicker nhan prop
  loading -> hien 'Dang quet VST FX...' thay vi 'Khong co VST FX'.
- precompiled rebuild (LF) + index.html ?v=202608220330; dist sync.
- tests: +4 test cache TTL/invalidate/no-bridge (TestFxScanCache).
2026-08-22 03:34:33 +00:00
admin b10b0e77f4 Phase 1-2 (PLAN_MASTERBUS_FX_RACK_VST): tests cho render_fx_chain + API fx-render; plan HOÀN THÀNH Phase 0-4
- test_native_render: render_fx_chain builtin gain e2e (bridge --render-fx)
- test_plugin_api: POST /api/v1/plugins/fx-render builtin gain
- PLAN_MASTERBUS_FX_RACK_VST.md: cap nhat trang thai cac phase (0-4 da implement tu cac commit truoc + phan nay)
2026-08-19 21:21:33 +07:00
3dtours 50cfed3340 test(gate): accept fact/other chunks — validate data chunk ends at EOF
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.
2026-08-18 17:36:56 +07:00
3dtours ba9ceeea90 fix(bridge): WAV header data_size for IEEE float32 (was 16-bit byte count)
- 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
2026-08-18 17:35:54 +07:00
3dtours a2f93138be Normalize Linux audio pipeline to lossless Float32 (skill: lossless-audio-compliance)
- native bridge WAV writers: 16-bit PCM truncation -> IEEE Float32 (fmt 3, bit-exact)
- vendor sheredom_json.h (vst3sdk 3.8.1 lacks moduleinfo/json.h)
- Dockerfile: drop nonexistent sfizz tag v1.2.3
- Python sf.write -> subtype=FLOAT everywhere
- resample_poly -> kaiser(16) window (>=130dB stopband)
- audio_editor._write_wav_lossless(): FLOAT passthrough, TPDF dither only for
  8/16/24-bit final exports
- app.jsx WAV encoders: Float32 default, TPDF dither for integer depths, fix 24-bit
- tests: lossless compliance gate (null test < -140dBFS, float32 format) 9/9 pass
- TASKS_WINDOWS_AUDIO_NORMALIZE.md: Windows-side remaining tasks
2026-08-18 11:50:26 +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 dc331f39d8 phase5: mặc định RENDER_ENGINE=bridge, gỡ pedalboard khỏi requirements/source/LICENSE
- config.py: SF_RENDER_ENGINE default 'bridge' (pedalboard GPL-3.0 đã gỡ)
- requirements.txt: bỏ pedalboard==0.9.19
- vst_engine.py: bỏ HAS_PEDALBOARD/check_pedalboard_safe/load_vst/import pedalboard;
  midi_events_to_messages giữ làm utility thuần (không gate pedalboard)
- render_engine.py: bỏ nhánh elif vst and HAS_PEDALBOARD + import thừa
- plugins.py: preview/midi-render chỉ qua native_bridge; guard SF_RENDER_ENGINE=bridge
- runtime.py: _vst_render_available() check bridge exe (SF_BRIDGE_PATH/install/) thay find_spec('pedalboard')
- LICENSE.md/THIRD_PARTY_LICENSES.md: bỏ cảnh báo GPL-3.0 pedalboard, đánh số lại
- tests: bỏ test golden so pedalboard + test requires_pedalboard; 114 passed 0 skip
2026-08-17 12:58:51 +07:00
admin efe26e3277 phase3: render_engine export qua native_bridge, FX scipy fallback, bỏ pedalboard branch
- VSTi track: SF_RENDER_ENGINE=bridge → native_render.render_offline (velocity
  float 0..1 từ midi_events MIDI 0..127), fallback oscillator khi lỗi
- chorus/reverb/gain: luôn dùng scipy/numpy fallback, xóa nhánh HAS_PEDALBOARD
- bỏ top-level import pedalboard (Pedalboard/Gain/Chorus/Reverb)
- test mới: bridge branch fallback, FX chorus/reverb scipy
2026-08-17 11:10:43 +07:00
admin 3d963eb8dd phase2: fix velocity double-scaling in bridge job, bank/program parity, golden RMS test
- render_offline: send velocity as float 0..1 (RenderJob.cpp scales *127);
  old int(0.8*127) was scaled again -> clamp 127, velocity ignored
- forward soundfont_bank/program into bridge job (presence-based, matches
  midi_events_to_messages)
- new tests: bridge branch dispatch (SF_RENDER_ENGINE=bridge -> 404),
  bridge vs pedalboard golden RMS comparison (plan section 6)
2026-08-17 11:04:01 +07:00
admin 235dee103d Phase 2: native_render Python client (bridge --render) + SF_RENDER_ENGINE flag cho preview/midi-render 2026-08-17 10:49:54 +07:00
admin 29f7fecb35 fix(ui): GUI button inline same row + same height as Synth/File/FX in TCP 2026-08-14 08:04:33 +07:00
3dtours 61cb4b846f FIX: 11 bugs bảo mật/ổn định (static mount chặn dotfile, delete traversal, cleanup giữ clips serverFileId, upload whitelist, password strength, auth audio endpoints, pedalboard==0.9.19, vendor CDN local) + FEATURE: Carla bridge preview/export MIDI notes âm VSTi (POST /midi-render, /carla-play-notes, nút Preview VSTi/Export MIDI->Audio; pedalboard 0.9.19 raw MIDI bytes; SONICFORGE_STORAGE_DIR cô lập test storage) 2026-08-10 18:46:54 +07:00
3dtours 30a40b2bca FEAT: Plugins Manager - danh sach thu muc da muc (Add Directory + x xoa), scan phan loai rieng re VST/SoundFont theo dir
- Backend: plugin_dirs (list) thay vst_dir/soundfont_dir rieng — luu plugin_dirs.json, backward compat gop field cu; scan walk tung dir phan loai .vst3/.dll/.so -> vst_found, .sf2/.sf3 -> soundfonts (kem dir goc)
- SoundFontAutoScanner: system_sf_dirs (list) — scan tat ca thu muc user khai bao
- Frontend: PluginManagerModal — nut Add Directory (Tauri dialog / prompt fallback), moi dir co nut x xoa, nut Scan -> hien danh sach rieng re VST Instruments + SoundFonts (kem duong dan thu muc)
- Tests: +2 (save/get/scan phan loai, xoa dir)
2026-08-09 02:52:10 +00:00
3dtours 8fc1c2641b FIX: chỉnh sửa mute và unmute realtime, sửa lỗi save dự án và chèn chung các items vào một track 2026-08-03 17:22:19 +07:00
3dtours a9da813cb1 FEAT: thêm nút bypass cho track strip để bypass không qua mastering panel 2026-08-03 15:47:10 +07:00
3dtours eb61015cff FIX: sửa MASTERING PANEL thay đổi knob thì thay đổi các thông số hiển thị 2026-07-30 11:18:35 +07:00
3dtours 47af85c072 FIX: sửa UNDO/REDO bị lỗi màn hình đen 2026-07-29 18:19:02 +07:00
3dtours cff3950670 feat: AI Copilot suggestion chips + typeahead dropdown
- Suggestion chips bar: context-aware (amber for rearrange, indigo for creation)
- Typeahead dropdown: keyword matching on ≥2 chars, Tab to select
- getSelectedMidiItemInfo helper for context detection
- Backend: 4 rearrange presets in ai_presets.py
- PromptTemplateManager: getContextualSuggestions(hasSelectedItem)
2026-07-28 11:20:26 +07:00
3dtours 421535ca0e feat: AI MIDI Prompt Template & Preset Engine
- promptTemplateManager.js: standalone service with keyword scoring, CRUD, fav toggle
- ai_presets.py: backend CRUD router (JSON file, auth isolation)
- AIPresetModal: PromptTemplateManager, star/fav column, backend API sync
- Piano Roll AI: preset matching support
- 7 tests: matching, CRUD, anonymous auth, user isolation
2026-07-28 10:42:30 +07:00
3dtours 225f23516f feat: thêm soundfont và VSTi cho MIDI 2026-07-23 17:47:46 +07:00
3dtours 0e44e44ecb feat: bổ sung MIDI 2026-07-23 08:32:23 +07:00
3dtours 85a8dc6d17 fix: time selection click and shiftclick 2026-07-20 19:44:23 +07:00
3dtours 2a44b81cf5 fix: cannot login with default password 2026-07-20 11:50:07 +07:00
3dtours c8ebdb50b0 fix: refactor 2026-07-20 10:39:07 +07:00
3dtours 95dc9346ef fix&feat: hiển thị tools chỉnh sửa audioclip 2026-07-19 10:19:25 +07:00
3dtours d2e0010d88 fix&feat: 12_SUBTAB.md chỉnh sửa audioclip ở subtab 2026-07-19 08:22:13 +07:00
3dtours a34b01a035 First commit 2026-07-18 15:09:05 +07:00