The convert command converts MusicXML input to .pta source.
Syntax
partitura convert <input> -o <output.pta>
Arguments
| Argument | Required | Description |
|---|---|---|
<input> |
Yes | Input MusicXML file (.xml, .musicxml, or .mxl) |
-o <output.pta> |
Yes | Output .pta file path |
Input Formats
The command accepts recognized MusicXML file forms:
| Extension | Format |
|---|---|
.xml |
Uncompressed MusicXML document |
.musicxml |
Uncompressed MusicXML document |
.mxl |
Compressed MusicXML archive |
Examples
# Convert MusicXML to .pta
partitura convert score.musicxml -o score.pta
# Convert compressed MusicXML to .pta
partitura convert score.mxl -o score.pta
Requirements
- Accepts MusicXML input in recognized file forms
- Accepts compressed MusicXML archives (
.mxl) - Produces
.ptaoutput - Fails explicitly when conversion cannot preserve required semantics
Behavior
The conversion process:
- Parses MusicXML input into canonical IR
- Normalizes the IR (equivalent encodings into one canonical form)
- Emits canonical
.ptasource
Both score-partwise and score-timewise inputs normalize to the same canonical score structure.
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Conversion error or semantic loss detected |
2 |
Usage error (missing arguments, unknown flags) |