Score text
A score is a LilyPond .ly text file. Euterpes uses that text as the only copy of the score and reads it into a model for drawing, playing and editing on the staff. Saving writes exactly the text you see. See Writing music for how to edit it.
A minimal score:
\version "2.24.0"
\score {
\new Staff {
\time 4/4
\tempo 4 = 80
c'4 d' e' f'
}
\layout { }
}
The bundled euterpes/resources/library_seed/seikilos-epitaph/seikilos-epitaph.ly (The Epitaph of Seikilos, with a drawing over the composer's name, a page of words under the music, and its words in Greek and in Latin letters) is a larger example.
What is understood
Euterpes reads the common part of LilyPond, including the ten pieces of the library:
- relative and absolute pitches, in any of LilyPond's note-name languages (also chosen with
\include "english.ly"), - chords, ties, slurs, tuplets (also
\scaleDurations), grace notes, and several voices and staves (\new Staff,\new PianoStaff,\parallelMusic,\change Staff), - clefs, keys, metres, tempo marks and repeats,
- dynamics, articulations, fermatas, trills and the other common ornaments and marks,
- the sustain pedal (
\sustainOn,\sustainOff), words at notes (^"dolce",-\markup), - a picture over the composer's name:
composer = \markup \center-column { \image #Y #16 "picture.png" "Name" }in the\header, the PNG beside the score (16 is its height in staff spaces), the picture and the name centred on each other at the right margin; or over the title, as adedication; LilyPond 2.24 and later print it too, - words under the music: each top-level
\markupafter it is a paragraph, with room between paragraphs:\justify-stringfills the width (Euterpes also indents its first line; LilyPond does not),\wordwrap-stringsets it ragged,\fill-linecentres one line,\center-column { ... }centres several lines kept together, each in its own\italicor\bold;\with-urlmakes a link that opens with a click, - staves hidden while empty, also on the first line, with
\with { \override VerticalAxisGroup.remove-first = ##t }.
Slurs, ties, articulations, fermatas, trills and dynamics are drawn on the staff.
What Euterpes does not understand is kept in the text, never deleted, and listed as a problem: underlined in the text, explained when the mouse rests on it, and counted in the bottom bar. The rest of the score still shows and plays. Things the reader keeps but does not draw are not problems.
Euterpes' own additions
A file may carry data Euterpes alone reads (for example where a picture came from), in two LilyPond-safe ways:
- custom
\headerfields, whose names may be hyphenated (euterpes-source = "..."); LilyPond keeps unknown header fields without complaint, and - no-op functions with plain-string arguments, defined in a block at the top of the file
(
euterpes-note = #(define-void-function (text) (string?) #t)) and called at the top level, inside music or around music (\euterpes-note "from page 12 of the scan"). The file compiles on any LilyPond with no include, and Euterpes keeps each call and its arguments byte for byte.
Both read quietly: they are not problems, and no note is lost to them.
Two engravers
The staff you edit is Euterpes' own live engraver: quick, and good enough to read and edit. For the page you print, LilyPond engraves the same text better. See LilyPond engraving.
Safety
Euterpes' reader never runs Scheme code. LilyPond does, when it engraves, so do not engrave a score from an untrusted source unless you have read it. See Privacy.