From d83a966199671a1cab6b8f56be448662e79f4a46 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sun, 12 Jul 2026 18:50:50 +0900 Subject: feat: 合成機能テンプレートの拡充とドキュメントの更新 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ppmck/pyxel向けに表現力のある作曲テンプレートを追加 - エンベロープ、ビブラート、音程変化の使用例を追加 - テンプレートの検証・IR・音声合成テストを追加 - README、設計書、MCP仕様書を現行実装に合わせて更新 --- tests/test_compose_mml_tool.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'tests/test_compose_mml_tool.py') diff --git a/tests/test_compose_mml_tool.py b/tests/test_compose_mml_tool.py index 3d56115..be4735e 100644 --- a/tests/test_compose_mml_tool.py +++ b/tests/test_compose_mml_tool.py @@ -65,7 +65,16 @@ def test_validate_pyxel(compose_mml): def test_template_all(compose_mml): for mode in ("ppmck", "pyxel"): - for template in ("basic", "melody", "chord", "drum", "empty"): + for template in ( + "basic", + "melody", + "chord", + "drum", + "empty", + "expressive_lead", + "vibrato_lead", + "pitch_motion", + ): result = compose_mml(action="template", mode=mode, template=template) assert "mml" in result assert "description" in result @@ -77,6 +86,18 @@ def test_template_all(compose_mml): ) +def test_synthesis_templates_compose(compose_mml, tmp_output_dir): + for mode in ("ppmck", "pyxel"): + for template in ("expressive_lead", "vibrato_lead", "pitch_motion"): + generated = compose_mml(action="template", mode=mode, template=template) + result = compose_mml(action="compose", mml=generated["mml"], mode=mode) + assert result["success"] is True, ( + f"{mode}/{template} synthesis failed: {result['validation']}" + ) + assert result["duration_sec"] > 0 + assert Path(result["wav_path"]).exists() + + def test_template_invalid_fallback(compose_mml): result = compose_mml(action="template", mode="pyxel", template="unknown") assert result["description"] == "基本的な4ch構成(メロディ+和音+ベース+リズム)" -- cgit v1.2.3