summaryrefslogtreecommitdiff
path: root/tests/test_compose_mml_tool.py
diff options
context:
space:
mode:
authortanaka takashi <isazaka@gmail.com>2026-07-12 18:50:50 +0900
committertanaka takashi <isazaka@gmail.com>2026-07-12 18:50:50 +0900
commitd83a966199671a1cab6b8f56be448662e79f4a46 (patch)
tree88f1ee34230e5f60411bf988a251b00c3c9fe8ad /tests/test_compose_mml_tool.py
parent3d06bee12a26bc55cd73b1494e4d008a8098f6f5 (diff)
feat: 合成機能テンプレートの拡充とドキュメントの更新
- ppmck/pyxel向けに表現力のある作曲テンプレートを追加 - エンベロープ、ビブラート、音程変化の使用例を追加 - テンプレートの検証・IR・音声合成テストを追加 - README、設計書、MCP仕様書を現行実装に合わせて更新
Diffstat (limited to 'tests/test_compose_mml_tool.py')
-rw-r--r--tests/test_compose_mml_tool.py23
1 files changed, 22 insertions, 1 deletions
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構成(メロディ+和音+ベース+リズム)"