The export command exports valid .pta source to derived output formats.

Syntax

partitura export <input.pta> <output>
partitura export <input.pta> -o <output>

Arguments

Argument Required Description
<input.pta> Yes Input .pta source file
<output> Yes Output file path (or use -o)

Flags

Flag Description
-o <path> Output file path. Takes precedence over positional output argument
--resolution <DPI> Image resolution for PNG export (default: 300)
--bitrate <kbps> MP3 bitrate in kbps (default: 192)
--parts Export individual parts as separate pages (PDF only)

Output Formats

The output format is inferred from the file extension:

Extension Format
.pdf PDF document
.png PNG image
.mp3 MP3 audio
.wav WAV audio
.mid MIDI file
.midi MIDI file

Examples

# Export to PDF
partitura export score.pta -o score.pdf

# Export to PNG with custom resolution
partitura export score.pta -o score.png --resolution 150

# Export to MP3 with custom bitrate
partitura export score.pta -o score.mp3 --bitrate 320

# Export to MIDI
partitura export score.pta -o score.mid

# Export PDF with individual parts
partitura export score.pta -o score.pdf --parts

Requirements

External Dependencies

The export command requires MuseScore (mscore) to be available in PATH. Use partitura doctor to check your environment.

Exit Codes

Code Meaning
0 Success
1 Export error (invalid input, MuseScore failure)
2 Usage error
3 External tool not available (mscore not in PATH)

See Also