export_song
Exports songs to WAV, MIDI, MML, or XM files for playback, editing, or sharing; for long WAV renders, check rendering status and inspect duration, peak, and RMS to catch silent or clipped audio.
Instructions
Exports the song as audio or music data: wav (rendered audio), mid (MIDI), mml (SiON MML) or xm (FastTracker). A WAV renders at about playback speed or slower, so a long one returns state "rendering"; follow it up with export_status. A finished WAV reports its duration, peak and RMS, to help catch silent or clipped results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Where to write it. The extension must match the format. | |
| format | Yes | ||
| to_bar | No | Bar after the last one to export. By default, the end of the song. | |
| from_bar | No | First bar to export, 0 by default. | |
| overwrite | No | Must be true to replace an existing file. | |
| wait_seconds | No | How long to wait for a WAV before returning, 40 by default. |