From 96aa76f1945293690a24c9340e1fd4123fd5bb7d Mon Sep 17 00:00:00 2001 From: 3dtours Date: Sun, 26 Jul 2026 17:08:49 +0700 Subject: [PATCH] chore: add fluidsynth fix log to wiki --- wiki.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wiki.md b/wiki.md index 3f24fb9..c9d70f2 100644 --- a/wiki.md +++ b/wiki.md @@ -1,3 +1,9 @@ +### [2026-07-26 17:05] Task: Fix FluidSynth API mismatch (silent fallback) +- **Tóm tắt thay đổi:** Pyfluidsynth thực tế là low-level CFFI wrapper, không có class `FluidSynth()`. Dùng sai API → tất cả SoundFont render fallback về oscillator (silence). Fix: dùng `new_fluid_synth`, `fluid_synth_sfload`, `fluid_synth_program_select`, `fluid_synth_write_s16_stereo`. Đồng bộ internal clock bằng cách render silence qua `write_s16_stereo` thay vì chỉ advance cursor. +- **Các file ảnh hưởng:** `app/core/render_engine.py` +- **Ghi chú/Test (nếu có):** DSK BAN-DI (prog=5) và SGM Brass (prog=56) đều có audio riêng biệt. Render peak ~0.04-0.056, spectral profile khác nhau rõ rệt. +--- + ### [2026-07-26 16:55] Task: Fix SoundFont program selection flow - **Tóm tắt thay đổi:** Sửa `_find_sf2_path` case-insensitive (catalog IDs lowercase vs filename mixed-case), thêm `synth_engine`, `soundfont_id`, `instrument_source` vào serialize/deserialize để project save/load không mất instrument selection. - **Các file ảnh hưởng:** `app/core/render_engine.py`, `app/static/js/app.jsx`