export_musicxml
Convert a ScoreSpec into a MusicXML file on disk without opening Dorico. Preserves key, time, clefs, dynamics, tempo, and returns the written path for later import.
Instructions
Write a ScoreSpec to a MusicXML file on disk, without Dorico.
Entirely offline: no connection is opened and Dorico need not be running. Key,
time signature, clefs, dynamics and tempo all survive the round trip, which is
what makes this the way to set the two signatures no popover will accept.
Returns:
Result dictionary with the outcome and the path that was written.
Note:
A specified path is overwritten without confirmation. Omit the path to
write to a temporary file.
To get the file into Dorico afterwards, import_musicxml opens it as a new
flow, and write_score(method='musicxml') does both steps in one call. For a
printable file rather than an interchange one, use export_pdf.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Where to write the .musicxml file. An existing file at this path is overwritten. Omit to write to a temporary file and take the path from the answer. | |
| score | Yes | The score to work on, as a ScoreSpec object: metadata, parts, and the events inside them. Call score_schema first for the exact shape, which refuses unknown keys rather than ignoring them. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||