Noctave

LilyPond → MusicXML · PDF · MIDI

The LilyPond converter

Drop the LilyPond source of a piano piece. Noctave first checks that it is compatible, updates it with convert-ly, has it engraved by LilyPond 2.25, then converts it to MusicXML with the converter of its free library. You get the MusicXML to import into Noctave, the PDF and the MIDI file.

Convert a file

The converter opens soon.

It is ready, but not running on the server yet. Come back in a few days: this page will open by itself.

The limits, simply

What is accepted: a whitelist

LilyPond runs the Scheme it is given: a file could read or write on the server. Before anything runs, an analysis reads every element of the file and refuses at the slightest doubt, saying where and why (“Not compatible”, line and column).

Accepted

  • LilyPond’s music, articulation, dynamics, layout and text (\markup) commands the converter knows, and the variables defined in the file (upper = \relative c'' { … }).
  • In Scheme, literal values: #'symbol, #'(1 . 2), #"text", numbers, ##t, ##f, #UP, #DOWN, colours…
  • A few harmless functions, with values: set-global-staff-size, set-paper-size, ly:make-moment, cons, list, make-dynamic-script, ly:set-option 'point-and-click.
  • Files older than LilyPond 2.24: convert-ly updates them, then the updated copy is analysed again, strictly.

Refused

  • Any unknown Scheme function, and define, lambda, let, set!, define-music-function…
  • $, #{ … #}, Scheme vectors, characters, keywords and quasiquotes.
  • \include of a file (languages aside), \book, \bookpart, \bookOutputName, output-filename.
  • \postscript, \epsfile, \image, \verbatim-file, \applyMusic, \applyOutput, \on-the-fly.
  • \repeat segno (D.S., coda), not read by Noctave yet; more than 100 repeats; control or invisible characters.

Of the 357 piano pieces of the Mutopia Project the free library converted without a difference, 308 pass this analysis as they are; the others define Scheme functions or have lyrics.

Then, a sandbox

convert-ly, LilyPond and the converter run under a system user of their own, in a bubblewrap sandbox: no network, a read-only system, no access to the site’s code or data, a work folder in memory, 60 seconds, limited memory, processes and file sizes. If LilyPond crashes, the rest of the server does not notice.

LilyPond (GPL) is used unmodified, as a separate program. The MusicXML is written by Noctave’s converter, the one that made the 377 pieces of the free library; it does not carry everything LilyPond can engrave (the page says so for each file).