LilyPond engraving

Euterpes draws your score itself, live, as you type. For the page you print, it can also hand the score to LilyPond, the engraver that scores in this format were made for. LilyPond is optional: Euterpes never downloads or installs it, and everything else works without it.

What you get

When Euterpes finds LilyPond, the Export menu gains four entries:

  • Export as PDF with LilyPond, and the same as PNG and SVG.
  • Print preview with LilyPond: the pages in a scrolling window. Zoom in and out, or fit the width. Click near a note and the editor jumps to where it is written. (LilyPond ties notes to the text; Euterpes finds the link nearest to your click, so click close to the note head.)

Engraving takes seconds to a minute and runs in the background. A file is written only where you chose. A picture of several pages is written as name-1.png, name-2.png, and so on.

If LilyPond rejects the score, a window shows what it said, with the lines it points at. Go to line selects that place in the text.

Without LilyPond the entries are hidden. The built-in PDF, PNG and SVG export is always there.

A file LilyPond engraves keeps a copy of the score inside it, as Euterpes' own exports do, so it opens here again with nothing lost; see A copy of the score in every file.

Telling Euterpes where it is

Euterpes looks, in order, at the place chosen in Options, your PATH, the usual Windows install folders (Program Files\LilyPond*, and Programs\LilyPond* under your local app data folder) and lilypond.exe in a folder you chose. Options ▸ LilyPond shows whether it was found and where, lets you pick the file or folder, and has Find again for after you install it. If you chose a place and nothing is there, Euterpes does not quietly use another program.

On the command line: euterpes-cli export piece.ly -o piece.pdf --engraver lilypond.

Safety

LilyPond runs a score as a program: files can \include other files and hold Scheme code (#( ... )). Euterpes therefore:

  • asks you to confirm before engraving a score that contains \include or Scheme, so a score you downloaded cannot run code unannounced. Only say yes to scores you wrote or trust: that code runs with the same access to your computer as you have;
  • runs LilyPond without a shell, with a time limit (the program is stopped if it takes too long), in a temporary folder that is always removed afterwards, with the score passed as a file in that folder.

LilyPond no longer has a safe mode: its developers removed it in version 2.23.12 as impossible to make safe, and later versions stop with an error when asked for it. Euterpes asks for safe mode (-dsafe) only from an older LilyPond that still has it.

Nothing is sent anywhere.

Limits

  • Point and click uses the links LilyPond writes into its SVG pages. Scores with \pointAndClickOff give no links, and the preview then only shows the pages.
  • The preview is a snapshot: change the text and open it again.