The ast command exposes a compiler-facing structural view of .pta source or MusicXML input.

Syntax

partitura ast <input>

Arguments

Argument Required Description
<input> Yes Input file (.pta, .xml, .musicxml, or .mxl)

Supported Input Formats

Extension Format
.pta Partitura source
.xml Uncompressed MusicXML
.musicxml Uncompressed MusicXML
.mxl Compressed MusicXML

Examples

# View AST for .pta source
partitura ast score.pta

# View AST for MusicXML
partitura ast score.musicxml

Requirements

Behavior

The command parses the input and prints a structured AST (Abstract Syntax Tree) representation to stdout. This is useful for:

Exit Codes

Code Meaning
0 Success
1 Parse error
2 Usage error

See Also