The validate command checks .pta source or MusicXML input for syntactic and semantic validity.
Syntax
partitura validate <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
# Validate .pta source
partitura validate score.pta
# Validate MusicXML
partitura validate score.musicxml
Requirements
- Validates source without exporting output
- Reports diagnostics clearly
- Fails with a non-zero exit code when the source is invalid
Behavior
The validation process:
- Parses the input into IR
- Checks syntactic validity
- Checks semantic validity against the full MusicXML model
- Reports any errors or warnings
Exit Codes
| Code |
Meaning |
0 |
Valid input |
1 |
Validation errors found |
2 |
Usage error (missing arguments, unknown flags) |
See Also
- check — Stricter verification for development and CI
- compile — Compile
.pta to MusicXML