read_audio
Render a Pyxel sound or music slot to WAV and return measurable audio data, with optional inline audio content or a saved output file.
Instructions
Render one Pyxel sound or music slot to WAV and return measurable audio data. Set inline=true to return audio content (up to 4 MiB) and omit output_path if desired. Notes describe tracker fields.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"script": "<script>",
"target": "<target>"
},
"name": "read_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inline | No | ||
| script | Yes | Local .pyxres file or trusted Pyxel script path. | |
| target | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| path | No | ||
| notes | No | ||
| errors | Yes | ||
| channels | No | ||
| warnings | No | ||
| sample_rate | No | ||
| peak_amplitude | No | ||
| duration_seconds | No |