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

Behavior

The conversion process:

  1. Parses MusicXML input into canonical IR
  2. Normalizes the IR (equivalent encodings into one canonical form)
  3. Emits canonical .pta source

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)

See Also