Command line

euterpes-cli does without a window what the program does with one. It is installed next to Euterpes.exe (and as euterpes-cli with pip install), and is meant for scripts and batch work: checking a folder of scores, converting a pile of MusicXML files, or rendering a library's audio.

euterpes-cli check piece.ly                      # problems; exit code 1 if there are any
euterpes-cli convert song.musicxml -o song.ly    # MusicXML, MIDI, LaTeX, a scan or a recording
euterpes-cli convert take.mp3 -o take.musicxml   # any format to any other, through LilyPond
euterpes-cli export piece.ly -o piece.pdf        # .pdf .png .jpg .svg .mid .wav .mp3 .musicxml .ly
euterpes-cli render piece.ly -o piece.mp3        # the sound (.wav or .mp3); add --soundfont your.sf2 for your own
euterpes-cli --json check *.ly                   # answers in JSON, for scripts
euterpes-cli info piece.ly                       # titles, metre, key, tempo, length, each staff
euterpes-cli transpose piece.ly --to Bb -o b.ly  # to a key, or --interval "up M3"
euterpes-cli part piece.ly --staff cello -o c.ly # one staff as its own score; no --staff lists them
euterpes-cli library list                        # the library, under its folders
euterpes-cli library add song.musicxml --folder romantic/chopin

Commands

  • check reads each score and lists what it could not understand, with line and column. With --left-out it also lists, as notes that do not make the check fail, the settings and commands the text keeps but the score neither shows nor plays. Things the reader keeps but does not draw are not problems. A command it does not know is a warning, unless the file \includes another that could define it.

  • convert imports a file of another kind and writes LilyPond text, to -o or to standard output; when -o names another format (.musicxml, .mid, .pdf, .mp3, anything export writes), the music goes on to it. --piece N chooses one fragment of a LaTeX file that holds several. Scans (PDF, PNG, JPG, TIFF, SVG) need Audiveris installed; recordings (WAV, MP3, FLAC, Ogg) are written down as one voice. A file Euterpes exported gives back its score exactly (the copy inside it).

  • export writes a picture (.pdf, .png, .jpg, .svg), MIDI, audio, MusicXML (.musicxml or .xml) or a copy of the text, by the suffix of -o. The file carries a copy of the score unless --no-copy is given, and what the format cannot hold of this score is noted on standard error (under "loses" with --json). Pictures are painted by the program's own engraver; with --engraver lilypond a .pdf, .png or .svg is set by LilyPond instead (give --lilypond PATH when it is not on the PATH). A picture of several pages is written as name-1, name-2, and so on.

  • render writes the performance as a 16-bit WAV file, or as a mono 192 kbit/s MP3 at 44.1 kHz when -o ends in .mp3. MP3 needs the lameenc encoder, which ships with the program; if it is missing the command says so and exits with 1. --soundfont FILE.sf2 plays it with your own soundfont (--preset BANK:PROGRAM, default the first); an unusable file is reported and exits with 1.

  • info tells what a score holds: its title and composer, the number of bars, the time signatures, the key, the tempo marks, its length in seconds, the problems check would list, and for each staff its name, its lowest and highest notes and, when it is named after an instrument, how many notes fall outside that instrument's range.

  • transpose writes the score transposed --to a key (D, Bb, F#m, c minor) or by an --interval: quality and number, up or down, as "up M3", "down P5", +m2 or --interval=-A4 (P perfect, M major, m minor, A augmented, d diminished). The key signatures move too; everything else in the text is kept as written.

  • part lists the staves of a score, or, with --staff and a staff's number or name, writes that staff as a score of its own: the text with the other staves taken out, so its slurs, lyrics and header are kept, as the Instruments tab's Extract part does.

  • library works on the library, the program's own unless --root FOLDER names another. list shows every piece under its folders; add FILE adds a .ly file, or anything convert reads, with its PDF, MIDI and audio, --folder placing it (romantic/chopin, written in kebab-case) and --title and --composer overriding what the file says; move PIECE-OR-FOLDER INTO moves a piece (by its slug) or a folder, / being the top; render-audio renders every piece's audio again.

--version prints the version and exits. --json goes before the command. Every command answers with an object such as {"ok": true, "written": "piece.pdf"}, or {"ok": false, "error": "..."}; check answers with the problems of each file.

Exit codes

Code Meaning
0 All went well.
1 A score has problems, a file is missing, or a file could not be made.
2 The arguments were wrong.

Nothing is sent anywhere: the command line reads and writes only the files you name.