feat: VSTi autosample -> SF2/SF3 (tools/autosample_vsti.py) + bit_depth 16/24/32 render/export WAV (render_engine, plugins API, audio_editor, app.jsx encoders) + tests + task/walkthrough docs (53)

This commit is contained in:
2026-08-11 12:09:02 +07:00
parent f8cb2c6a5e
commit 7293d7ac7e
12 changed files with 2266 additions and 18 deletions
+14
View File
@@ -18,3 +18,17 @@ def test_render_session_container_empty():
buf = engine.render_session_container(session, {}, 120.0, 4, 1000)
assert buf.shape == (2, 1000)
assert (buf == 0.0).all()
def test_render_project_bit_depth(tmp_path):
"""bit_depth 24/32 → WAV PCM_24/PCM_32; mặc định vẫn PCM_16."""
import soundfile as sf
engine = PythonRenderEngine()
project = {
"metadata": {"bpm": 120, "time_signature_numerator": 4},
"main_session": {"length_bars": 1.0, "tracks": []},
"section_store": {},
}
for bd, subtype in [(16, "PCM_16"), (24, "PCM_24"), (32, "PCM_32")]:
out = str(tmp_path / f"render_{bd}.wav")
engine.render_project(project, out, bit_depth=bd)
assert sf.info(out).subtype == subtype