summaryrefslogtreecommitdiff
path: root/src/mml_composemusic_mcp/synthesizer.py
diff options
context:
space:
mode:
authortanaka takashi <isazaka@gmail.com>2026-07-12 16:03:29 +0900
committertanaka takashi <isazaka@gmail.com>2026-07-12 16:03:29 +0900
commit22f96694a96ed9fba169e77bc27d19d00edca083 (patch)
tree8f59c1d3f211c296b005a3f6ede8206bc3675a68 /src/mml_composemusic_mcp/synthesizer.py
parent3bb311ad8e0f10617805c8737d92d13e6a627818 (diff)
MML構文解析処理を追加
Diffstat (limited to 'src/mml_composemusic_mcp/synthesizer.py')
-rw-r--r--src/mml_composemusic_mcp/synthesizer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mml_composemusic_mcp/synthesizer.py b/src/mml_composemusic_mcp/synthesizer.py
index 6d9ffe2..b314aa5 100644
--- a/src/mml_composemusic_mcp/synthesizer.py
+++ b/src/mml_composemusic_mcp/synthesizer.py
@@ -10,6 +10,7 @@ from .ir import (
DutyEvent,
ErrorCode,
ErrorDetail,
+ ErrorPhase,
NoteEvent,
NoteSequence,
RestEvent,
@@ -262,7 +263,8 @@ def write_wav(path: Path, wave_data: np.ndarray, sample_rate: int) -> list[Error
except Exception as exc:
errors.append(
ErrorDetail(
- code=ErrorCode.SYSTEM_WAV_WRITE_FAILED,
+ code=ErrorCode.RUNTIME_WAV_WRITE_FAILED,
+ phase=ErrorPhase.RUNTIME,
line=0,
column=0,
message=f"WAVファイルの出力に失敗しました: {exc}",