LilyPond — Esszé

Ez az esszé a LilyPond 2.23.82 automatikus kottaszedési mechanizmusmába nyújt mélyebb betekintést.

A teljes dokumentáció a https://lilypond.org/ honlapon található.


1. A kottaszedés

Ez az esszé leírja, miért született a LilyPond, és hogyan képes ilyen gyönyörű kottákat előállítani.


1.1 A LilyPond története

Mielőtt a LilyPondot koncerteken használt csodaszép kották szedésére kezdtük volna használni, mielőtt zenetudományi dokumentumok zenei idézeteit vagy akár egyszerű dallamokat le lehetett volna vele kottázni, mielőtt szerte a világon a felhasználók széles körben kezdték volna használni, vagy ez az esszé megszületett volna, a LilyPond története egy kérdéssel kezdődött:

Miért nem adják vissza a számítógép által szedett kották a kézzel szedett kották szépségét és kiegyensúlyozottságát?

Erre többnyire választ kaphatunk, ha górcső alá vesszük a következő két kottát. Az első példa egy gondosan kézzel szedett kotta 1950-ből, a második egy modern, számítógéppel szedett kiadás.

Bärenreiter BA 320, ©1950:

baer-suite1-fullpage

Henle no. 666, ©2000:

henle-suite1-fullpage

J. S. Bach első, csellóra írt szólószvitjének két kiadása hangról hangra megegyezik, mégis megjelenésükben merőben különbözőek, különösen, ha kinyomtatjuk és megszokott távolságból szemléljük őket. Próbáljuk meg mindkét kottapéldát elolvasni, illetve játszani belőlük, és meg fogjuk állapítani, hogy a kézzel szedett kotta használata kellemesebb. Folyékonysága és dinamikája egy élő, lélegző zenemű érzetét kelti, miközben az újabb kiadás hidegnek és mechanikusnak hat.

Nehéz egyből észrevenni, miben rejlik a különbség a kották között. Az új kotta első ránézésre rendezett és pontos, talán még „jobb” is, mivel számítógéphez illőbb és egységes a megjelenése. Ez gondolkodóba ejtett minket egy időre. Javítani akartunk a számítógép által szedett kottaképen, de ehhez előbb rá kellett jönnünk, mi volt a gond vele.

A válasz az új kotta precíz, matematikai pontosságú egyformaságában rejlik. Keressük csak meg minden sor közepén az ütemvonalakat: a kézzel szedett változatban az ütemvonalak elhelyezkedése természetes módon változik, míg a számítógép szinte pontosan egymás alá, középre szedte őket. Ezt mutatja be a következő egyszerűsített ábra, melyen a kézzel (balra), ill. a komputerrel szedett változat (jobbra) elrendezése látható:

page-layout-comparison

A számítógép által előállított szedésben még az egyes kottafejek is függőlegesen egymáshoz lettek igazítva, ami azt az érzetet kelti, mintha a dallamvonal eltűnne egy szimbólumokból álló merev rács mögött.

További különbségek is vannak: a kézzel szedett változat függőleges vonalai erősebbek, a kötőívek szorosabban tapadnak a kottafejekhez, és a gerendák szögeiben is nagyobb változatosság figyelhető meg. Noha az ilyen részletes elemzés szőrszálhasogatásnak tűnhet, végeredménye egy olyan kotta, ami egyszerűbben olvasható. A számítógépes kottában minden sor szinte egyforma, és ha a zenész egy pillanatra máshová tekint, hamar elveszítheti a tájékozódást az oldalon.

A LilyPond megalkotásának célja az volt, hogy kiküszöböljük a többi kottaszedő szoftver szépséghibáit, és segítségével olyan kottákat lehessen előállítani, melyek szépsége a legigényesebb kézzel szedett kottákéval vetélkedik.


1.2 A kottaszedés fortélyai

A zeneművek nyomdai előkészítését kottaszedésnek nevezik. Ez a kifejezés a kották nyomtatásának hagyományos, kézi módszerére utal.1 Ez a folyamat még a 20. században első felében is úgy nézett ki, hogy a kotta elemeit kivágták, majd tükrözve belemélyesztették egy cink- vagy ónlemezbe. A lemezre ezután festéket hordtak fel, és a festék a bemélyedésekben maradt. A lemez a papírra rányomva a kotta képét adta. A metszést teljesen kézzel végezték, és bárminemű javítás nagyon körülményes volt, így a kottakép elsőre tökéletes kellett, hogy legyen. A kottaszedés tudománya nagyon különleges szakma, ahol a kézművesnek körülbelül öt éves képzést kellett elvégeznie, mielőtt a mester címet kérvényezhette. További öt év volt szükséges ahhoz, hogy a szakma minden csínját-bínját valóban magáénak tudhassa.

hader-slaan

A LilyPond megalkotását azok a kézzel szedett kották inspirálták, amelyeket a 20. század közepe felé az európai kottakiadók (többek között Bärenreiter, Duhem, Durand, Hofmeister, Peters és Schott) hoztak forgalomba. Munkásságukat bizonyos szempontból a hagyományos kottaszedés csúcsának lehet tekinteni. Kiadványaik tanulmányozásával rengeteget tanultunk arról, mik az ismertetőjelei egy szép tipográfiájú kottának, és milyen szempontokat szeretnénk a LilyPonddal utánozni.


A kottában használt betűtípusok

A lenti ábra jól mutatja a különbséget egy hagyományosan és egy számítógép által szedett kottaelem közt. A bal oldali képen egy beszkennelt b módosítójel látható egy kézi Bärenreiter kiadásból, míg a jobb oldali ugyanennek a zeneműnek 2000-ben kiadott változatából származik. Noha mindkét képet ugyanolyan árnyalatú tintával nyomtatták, a régebbi verzió sötétebb: a kottasorok vonalai vastagabbak, és a Bärenreiter b-je gömbölyded, majdhogynem érzékien kerek. A jobb oldali kép vonalai ezzel szemben vékonyabbak, elrendezése szögletes, sarkai élesek.

baer-flat-grayhenle-flat-gray
Bärenreiter (1950)Henle (2000)

Amikor úgy döntöttük, hogy írunk egy kottaszedő programot, nem volt olyan, szabad felhasználású zenei betűtípus, ami jól passzolt volna kedvenc kottáink elegáns kottaképéhez. Ezen felbuzdulva megalkottunk egy zenei szimbólumokból álló betűtípust, amely a kézzel szedett kották szemrevaló kinézetét veszi alapul. A betűtípus megtervezése során szerzett tapasztalatok nélkül soha nem ismertük volna fel, milyen csúnyák is azok a betűtípusok, amiket eleinte csodáltunk.

Lent két zenei betűkészletre láthatunk példát: a felső a Sibelius alapbeállítású készlete (Opus), az alsó a LilyPondé.

OpusAndFeta

A LilyPond kottaelemei vastagabbak, valamint vastagságuk konzisztensebb, ami miatt jóval egyszerűbb az olvasásuk. A vonalaknak, mint például a negyed szünet szárnyai, nem hegyes végük van, hanem finoman legömbölyített. Ennek oka, hogy a hegyes végek a hagyományos nyomóformán nagyon törékenyek, és a használat közben gyorsan elkopnak. Összefoglalva, a jelkészlet teltségét gondosan össze kell hangolni a vonalak (gerendák, ívek) vastagságával, hogy erős, mégis kiegyensúlyozott összképet kapjunk.

Vegyük észre továbbá, hogy a félkotta feje nem ellipszis, hanem enyhén rombusz alakú. A b módosítójel függőleges szára felfelé némileg kiszélesedik. A keresztet és a feloldójelet egyszerűbb távolról megkülönböztetni, mert ferde vonalaiknak eltérő a dőlésszöge, illetve függőleges vonalaik különböző vastagságúak.


Optikai kiegyenlítettség

A kották vízszintes elrendezésénél a mindenkori hangjegy hosszúságának kell visszatükröződnie. Amint a fenti Bach-szvit példáján már megfigyelhettük, sok modern kottánál a hangjegyek hosszának ábrázolása a matematikai precizitás felé törekszik, ami nem túl szép eredményhez vezet. A következő példában bemutatjuk Önöknek ugyanazt a motívumot kétszer: először matematikai pontossággal, másodszor ugyanezt kijavítva. Melyik példa tetszik Önnek jobban?

[image of music]

[image of music]

Ezen kottarészlet egyforma hosszúságú hangjegyeket használ. A hangjegyek közti távolságnak tükröznie kellene ezt. Sajnos a szemünk becsap: nem csak az egymást követő kottafejek távolságát kell figyelembe kell venni, hanem a szárukat is. Tehát egymás után következő fölfelé-lefelé szárú hangjegyeket kicsit távolabb kell helyezni egymástól, míg a lefelé-fölfelé kombináció szűkebb távolságot kíván, és az egész még függ a hangjegyek függőleges pozíciójától. Az alsó példa ezeket a korrektúraelveket tükrözi. Ellenben a felső példán a hangjegyek alsó-felső irányba váltakozása olyan érzetet kelt, mintha összegubancolódtak volna. Az alsó példa ezeket a szabályokat tükrözi. Ellenben a felső példa az olvasó szemében olyan érzetett kelt, mintha alul-fölül a kottafejek egy csomóban lennének. Egy kottaszedő mester ezt a beosztást úgy igazítaná el, hogy annak az olvasása kellemes legyen.

A Lilypond beosztásért felelős algoritmusa úgy kalkulál, hogy az ütemvonalat is figyelembe veszi, ami miatt az utolsó hangjegy a fenti példában több helyet kap, ezért nem kelti a zsúfoltság hatását. Egy szár lent nem szorulna erre a beosztásra.


Pótvonalak

A pót- (esetleg: segéd-) vonalak mindig kihívás elé állítják a tipográfiát: miattuk nehezebb a hangjegyeket sűrűn elrendezni és a hangmagasságot egy gyors pillantással meg kell tudni állapítani. A lentebb található példában láthatjuk, hogy a pótvonalnak vastagabbnak kell lennie mint egy normál kottavonalnak és egy tanult kottaszedő a pótvonalat lerövidíti azért, hogy a módosító jeleknek maradjon hely. Ezt a tulajdonságot mi beleépítettük a Lilypondba.

baer-ledgerlily-ledger

Optikai nagyság

A kottákat különböző méretben nyomják. Eredetileg ehhez különböző méretű kliséket gyártottak, ami egyben azt jelenti, hogy minden klisé olyan minőségű volt, hogy a saját méretében a legideálisabb képet adja. A digitális fonttal tudjuk a hangjegyek kontúrját matematikusan felnagyítani illetve kicsinyíteni azért, hogy a tetszés szerinti méretben elő tudjuk állítani, aminek sok előnye van. Azonban kis méretben a szimbólumok túl vékonynak hatnak.

A Lilypond számára különböző vastagságú szedéstípusokat készítettünk, melyek egy bizonyos kottaméretnek felelnek meg. Az itt látható Lilypond kottaszedés 26-os méretű:

size26

Itt ugyanazok a kották 11-es méretben, utána 236%-al nagyítva. hogy a kép pontosan abban a méretben jelenjen meg, mint az előbbi.

size11

Kisebb méretnél a Lilypond arányosan vastagított kottavonalakat használ a kitűnő olvashatóság érdekében.

Ez teszi lehetővé különböző méretű kottasorok békés egymás mellett élését egy oldalon:

[image of music]


Miért szükséges ez a nagy felhajtás?

Musicians are usually more absorbed with performing than with studying the looks of a piece of music, so nitpicking typographical details may seem academic. But it is not. Sheet music is performance material: everything is done to aid the musician in letting her perform better, and anything that is unclear or unpleasant to read is a hindrance.

Traditionally engraved music uses bold symbols on heavy staff to create a strong, well-balanced look that stands out well when the music is far away from the reader: for example, if it is on a music stand. A careful distribution of white space allows music to be set very tightly without crowding symbols together. The result minimizes the number of page turns, which is a great advantage.

This is a common characteristic of typography. Layout should be pretty, not only for its own sake, but especially because it helps the reader in his task. For sheet music this is of double importance because musicians have a limited amount of attention. The less attention they need for reading, the more they can focus on playing the music. In other words, better typography translates to better performances.

These examples demonstrate that music typography is an art that is subtle and complex, and that producing it requires considerable expertise, which musicians usually do not have. LilyPond is our effort to bring the graphical excellence of hand-engraved music to the computer age, and make it available to normal musicians. We have tuned our algorithms, font-designs, and program settings to produce prints that match the quality of the old editions we love to see and love to play from.


1.3 Az automatizált kottaszedés

Ebben a szakaszban arról lesz szó, mi szükséges egy program megírásánál, ami az elkészült kotta szedéstükrét meghatározza. Egy módszer ami elmagyarázza a számítógépnek a szép szedéstükör ismérveit és részletesen összehasonlítja a hagyományos módon előállított kottával.


Szépségverseny

Hogyan kell hát a tipográfiát felhasználnunk? Másképpen mondva: A három egymást követő kötőívből melyiket válasszuk ki?

[image of music]

Sajnos kevés könyv állt rendelkezésünkre a kottaszedés művészetéről. Így csak ökölszabályokat állíthattunk fel és egyes példákat tudunk bemutatni. Ezek a szabályok ugyan informatívak lehetnek de túl messze távolodnak attól az algoritmustól, amit a programba beépítünk. Ahol a felhasznált irodalom által kívánt szabályokat felhasználtuk, az algoritmust nagyon sok manuális beállítás befolyásolja. Minden lehetséges esetet kielemezni nagy munka lenne és legtöbbször nem meríti ki az összes lehetőséget:

ross-beam-scan

(Kép forrása: Ted Ross, The Art of Music Engraving)

Ahelyett, hogy megpróbálkoznánk azzal, hogy minden lehetséges esethez egy hozzá pontosan felvázolni, hogy a legtetszetősebbet ki tudja választani a szoftver. Utána felállítunk a lehetséges változatokból egy „csúnyasági ranglistát” és kiválasztjuk a legkevésbé csúnyát.

Például itt a legátó ívet 3 lehetséges pályán rajzolta fel és mindegyik változat rondaságát pontozta a program. Az első példa 15,39 pontot kapott mert az ív félbevágott egy kottafejet.

[image of music]

A második példa már szebb, de az ív végei nem érintik sem a kezdő sem a befejező hang bogyóját. Ebben az esetben 1,71 pontot kap a bal 9,37 pontot a jobb oldal és további két pontot mivel az ív felfelé tart miközben a dallam ereszkedik. Összesen 13,08 pont:

[image of music]

Az utolsó ív 10,04 pontot kap mivel jobb oldalon hagyott egy rést és 2 pontot a fent található lejtésért/emelkedésért tehát a három közül ez a legszebb.

[image of music]

Ez a technika teljesen általános és felhasználja a program az optikai kinézet javításáért különböző ívek összekombinálásánál kötőíveknél, pontok elhelyezésénél, akkordoknál illetve sor és oldaltöréseknél. Ezeknek a döntéseknek az eredményeit össze tudjuk vetni a kézzel szedett kották kinézetével.


A minőség javítása a kottaképek összehasonlításával

A Lilypond újabb verziói lépésről-lépésre jobbak lettek miközben folyamatosan a kézzel szedett kottákkal lettek összehasonlítva.

Itt látható egy kézzel szedett referenciapélda:

baer-sarabande

és ugyanez a sor így néz ki a Lilypond egyik régi verziójával (1.4-es verzió 2001 május):

lily14-sarabande

A Lilypond 1.4-es kiadása minden esetre olvashatóbb de egy részletes összevetés az eredetivel a formázás sok apró hibájára mutat rá:

lily14-sarabande-annotated

(Ezenkivül van még két hiányzó kottafej, több hiányzó közreadói megjegyzés és egy fals hangmagasság!)

Igazítva az oldalkinézeti szabályokon és a betűtípusdizájnon az újabb kiadások rendkívül sokat javultak. Hasonlítsa össze ugyanazt a referenciapéldát az aktuális Lilypond verzióval (2.23.82):

baer-sarabande

[image of music]

Az aktuális kiadás ugyan még nem a referencia klónja, de jobban megközelíti már a nyomdai minőséget.


Mindent szépen elrendezünk

A Lilypond képességeit mérhetjük avval is, hogy összehasonlítjuk a kereskedelemben kapható programokkal. Ebben az esetben a Finale 2008-at vettük, egyike a legismertebb kottaszedő programoknak különösen Észak-Amerikában. A Sibelius a Finale fő vetélytársa, legfőképp Európában ismert.

Összehasonlításunkhoz a Wohltemperiertes Clavier I. kötetének g-moll fúgáját (BWV 861) választottuk, melynek nyitótémája:

[image of music]

Összehasonlításunkban a darab utolsó 7 ütemét írtuk meg Finale és a Lilypond segítségével. Ez az a pont, ahol a téma háromszólamú szűkmenetben tér vissza és megy át a zárószakaszba. A Finale verziónál ellenálltunk a kísértésnek, hogy a normáltól eltérő dolgokat korrigáljuk, mivel meg akarjuk mutatni azokat a dolgokat, amit ezek a programok külön beavatkozás nélkül rendesen csinálnak meg. Az egyetlen változtatás csak a méretnél volt, hiszen hozzáigazítottuk ennek az esszének az oldalméretéhez, valamint két sorra korlátoztuk a kottát annak érdekében, hogy az összehasonlítás egyszerűbb legyen. Alapértelmezett beállításoknál a Finale két háromütemes sort és egy záró teljes szélességű, csak egy ütemet tartalmazó sort állítana elő.

Rengeteg különbség van a két kotta között: először a Finale, majd a Lilypondé látható:

bwv861mm28-29

[image of music]

Pár hiba a teljesség igénye nélkül, amit a külön nem szerkesztett Finale szedés tartalmaz:

This example is not intended to suggest that Finale cannot be used to produce publication-quality output. On the contrary, in the hands of a skilled user it can and does, but it requires skill and time. One of the fundamental differences between LilyPond and commercial scorewriters is that LilyPond hopes to reduce the amount of human intervention to an absolute minimum, while other packages try to provide an attractive interface in which to make these types of edits.

One particularly glaring omission we found from Finale is a missing flat in measure 33:

bwv861mm33-34-annotate

The flat symbol is required to cancel out the natural in the same measure, but Finale misses it because it occurred in a different voice. So in addition to running a beaming plug-in and checking the spacing on the noteheads and rests, the user must also check each measure for cross-voice accidentals to avoid interrupting a rehearsal over an engraving error.

If you are interested in examining these examples in more detail, the full seven-measure excerpt can be found at the end of this essay along with four different published engravings. Close examination reveals that there is some acceptable variation among the hand-engravings, but that LilyPond compares reasonably well to that acceptable range. There are still some shortcomings in the LilyPond output, for example, it appears a bit too aggressive in shortening some of the stems, so there is room for further development and fine-tuning.

Of course, typography relies on human judgment of appearance, so people cannot be replaced completely. However, much of the dull work can be automated. If LilyPond solves most of the common situations correctly, this will be a huge improvement over existing software. Over the course of years, the software can be refined to do more and more things automatically, so manual overrides are less and less necessary. Where manual adjustments are needed, LilyPond’s structure has been designed with that flexibility in mind.


1.4 Building software

This section describes some of the programming decisions that we made when designing LilyPond.


Music representation

Ideally, the input format for any high-level formatting system is an abstract description of the content. In this case, that would be the music itself. This poses a formidable problem: how can we define what music really is? Instead of trying to find an answer, we have reversed the question. We write a program capable of producing sheet music, and adjust the format to be as lean as possible. When the format can no longer be trimmed down, by definition we are left with content itself. Our program serves as a formal definition of a music document.

The syntax is also the user-interface for LilyPond, hence it is easy to type:

{
  c'4 d'8
}

to create a quarter note on middle C (C1) and an eighth note on the D above middle C (D1).

[image of music]

On a microscopic scale, such syntax is easy to use. On a larger scale, syntax also needs structure. How else can you enter complex pieces like symphonies and operas? The structure is formed by the concept of music expressions: by combining small fragments of music into larger ones, more complex music can be expressed. For example

f4

[image of music]

Simultaneous notes can be constructed by enclosing them with << and >>:

<<c4 d4 e4>>

[image of music]

This expression is put in sequence by enclosing it in curly braces { … }:

{ f4 <<c4 d4 e4>> }

[image of music]

The above is also an expression, and so it may be combined again with another simultaneous expression (a half note) using <<, \\, and >>:

<< g2 \\ { f4 <<c4 d4 e4>> } >>

[image of music]

Such recursive structures can be specified neatly and formally in a context-free grammar. The parsing code is also generated from this grammar. In other words, the syntax of LilyPond is clearly and unambiguously defined.

User-interfaces and syntax are what people see and deal with most. They are partly a matter of taste, and also the subject of much discussion. Although discussions on taste do have their merit, they are not very productive. In the larger picture of LilyPond, the importance of input syntax is small: inventing neat syntax is easy, while writing decent formatting code is much harder. This is also illustrated by the line-counts for the respective components: parsing and representation take up less than 10% of the source code.

When designing the structures used in LilyPond, we made some different decisions than are apparent in other software. Consider the hierarchical nature of music notation:

[image of music]

In this case, there are pitches grouped into chords that belong to measures, which belong to staves. This resembles a tidy structure of nested boxes:

nestedboxes

Unfortunately, the structure is tidy because it is based on some excessively restrictive assumptions. This becomes apparent if we consider a more complicated musical example:

[image of music]

In this example, staves start and stop at will, voices jump around between staves, and the staves have different time signatures. Many software packages would struggle with reproducing this example because they are built on the nested box structure. With LilyPond, on the other hand, we have tried to keep the input format and the structure as flexible as possible.


What symbols to engrave?

The formatting process decides where to place symbols. However, this can only be done once it is decided what symbols should be printed – in other words, what notation to use.

Common music notation is a system of recording music that has evolved over the past 1000 years. The form that is now in common use dates from the early Renaissance. Although the basic form (i.e., note heads on a 5-line staff) has not changed, the details still evolve to express the innovations of contemporary notation. Hence, common music notation encompasses some 500 years of music. Its applications range from monophonic melodies to monstrous counterpoints for a large orchestra.

How can we get a grip on such a seven-headed beast, and force it into the confines of a computer program? Our solution is to break up the problem of notation (as opposed to engraving, i.e., typography) into digestible and programmable chunks: every type of symbol is handled by a separate module, a so-called plug-in. Each plug-in is completely modular and independent, so each can be developed and improved separately. Such plug-ins are called engravers, by analogy with craftsmen who translate musical ideas to graphic symbols.

In the following example, we start out with a plug-in for note heads, the Note_heads_engraver.

[image of music]

Then a Staff_symbol_engraver adds the staff,

[image of music]

the Clef_engraver defines a reference point for the staff,

[image of music]

and the Stem_engraver adds stems.

[image of music]

The Stem_engraver is notified of any note head coming along. Every time one (or more, for a chord) note head is seen, a stem object is created and connected to the note head. By adding engravers for beams, slurs, accents, accidentals, bar lines, time signature, and key signature, we get a complete piece of notation.

[image of music]

This system works well for monophonic music, but what about polyphony? In polyphonic notation, many voices can share a staff.

[image of music]

In this situation, the accidentals and staff are shared, but the stems, slurs, beams, etc., are private to each voice. Hence, engravers should be grouped. The engravers for note heads, stems, slurs, etc., go into a group called ‘Voice context’, while the engravers for key, accidental, bar, etc., go into a group called ‘Staff context’. In the case of polyphony, a single Staff context contains more than one Voice context. Similarly, multiple Staff contexts can be put into a single Score context. The Score context is the top level notation context.

[image of music]

Lásd még

Internals Reference: Contexts.


Flexible architecture

When we started, we wrote the LilyPond program entirely in the C++ programming language; the program’s functionality was set in stone by the developers. That proved to be unsatisfactory for a number of reasons:

These problems have been addressed by integrating an interpreter for the Scheme programming language and rewriting parts of LilyPond in Scheme. The current formatting architecture is built around the notion of graphical objects, described by Scheme variables and functions. This architecture encompasses formatting rules, typographical style and individual formatting decisions. The user has direct access to most of these controls.

Scheme variables control layout decisions. For example, many graphical objects have a direction variable that encodes the choice between up and down (or left and right). Here you see two chords, with accents and arpeggios. In the first chord, the graphical objects have all directions down (or left). The second chord has all directions up (right).

[image of music]

The process of formatting a score consists of reading and writing the variables of graphical objects. Some variables have a preset value. For example, the thickness of many lines – a characteristic of typographical style – is a variable with a preset value. You are free to alter this value, giving your score a different typographical impression.

[image of music]

Formatting rules are also preset variables: each object has variables containing procedures. These procedures perform the actual formatting, and by substituting different ones, we can change the appearance of objects. In the following example, the rule governing which note head objects are used to produce the note head symbol is changed during the music fragment.

[image of music]


1.5 Putting LilyPond to work

We have written LilyPond as an experiment of how to condense the art of music engraving into a computer program. Thanks to all that hard work, the program can now be used to perform useful tasks. The simplest application is printing notes.

[image of music]

By adding chord names and lyrics we obtain a lead sheet.

[image of music]

Polyphonic notation and piano music can also be printed. The following example combines some more exotic constructs.

[image of music]

The fragments shown above have all been written by hand, but that is not a requirement. Since the formatting engine is mostly automatic, it can serve as an output means for other programs that manipulate music. For example, it can also be used to convert databases of musical fragments to images for use on websites and multimedia presentations.

This manual also shows an application: the input format is text, and can therefore be easily embedded in other text-based formats such as LaTeX, HTML, or in the case of this manual, Texinfo. Using the lilypond-book program, included with LilyPond, the input fragments can be replaced by music images in the resulting PDF or HTML output files. Another example is the third-party OOoLilyPond extension for OpenOffice.org or LibreOffice, which makes it extremely easy to embed musical examples in documents.

For more examples of LilyPond in action, full documentation, and the software itself, see our main website: www.lilypond.org.


1.6 Engraved examples (BWV 861)

This section contains four reference engravings and two software-engraved versions of Bach’s Fugue in G minor from the Well-Tempered Clavier, Book I, BWV 861 (the last seven measures).

Bärenreiter BA5070 (Neue Ausgabe Sämtlicher Werke, Serie V, Band 6.1, 1989):

bwv861-baer-small

Bärenreiter BA5070 (Neue Ausgabe Sämtlicher Werke, Serie V, Band 6.1, 1989), an alternate musical source. Aside from the textual differences, this demonstrates slight variations in the engraving decisions, even from the same publisher and edition:

bwv861-baer-alt-small

Breitkopf & Härtel, edited by Ferruccio Busoni (Wiesbaden, 1894), also available from the Petrucci Music Library (IMSLP #22081). The editorial markings (fingerings, articulations, etc.) have been removed for clearer comparison with the other editions here:

bwv861-breitkopf-small

Bach-Gesellschaft edition (Leipzig, 1866), available from the Petrucci Music Library (IMSPL #02221):

bwv861-gesellschaft-small

Finale 2008:

bwv861-finale2008a



LilyPond, version 2.23.82:

[image of music]


2. Irodalomjegyzék

Here are lists of references used in LilyPond.


2.1 Short literature list

If you need to know more about music notation, here are some interesting titles to read.

Ignatzek 1995

Klaus Ignatzek, Die Jazzmethode für Klavier. Schott’s Söhne 1995. Mainz, Germany ISBN 3-7957-5140-3.

A tutorial introduction to playing Jazz on the piano. One of the first chapters contains an overview of chords in common use for Jazz music.

Gerou 1996

Tom Gerou and Linda Lusk, Essential Dictionary of Music Notation. Alfred Publishing, Van Nuys CA ISBN 0-88284-768-6.

A concise, alphabetically ordered list of typesetting and music (notation) issues, covering most of the normal cases.

Gould 2011

Elaine Gould, Behind Bars: the Definitive Guide to Music Notation. Faber Music Ltd. ISBN 0-571-51456-1.

Hals über Kopf: Das Handbuch des Notensatzes. Edition Peters. ISBN 1843670488.

A comprehensive guide to the rules and conventions of music notation. Covering everything from basic themes to complex techniques and providing a comprehensive grounding in notational principles.

Read 1968

Gardner Read, Music Notation: A Manual of Modern Practice. Taplinger Publishing, New York (2nd edition).

A standard work on music notation.

Ross 1987

Ted Ross, Teach yourself the art of music engraving and processing. Hansen House, Miami, Florida 1987.

This book is about music engraving, i.e., professional typesetting. It contains directions on stamping, use of pens and notational conventions. The sections on reproduction technicalities and history are also interesting.

Schirmer 2001

The G.Schirmer/AMP Manual of Style and Usage. G.Schirmer/AMP, NY, 2001. (This book can be ordered from the rental department.)

This manual specifically focuses on preparing print for publication by Schirmer. It discusses many details that are not in other, normal notation books. It also gives a good idea of what is necessary to bring printouts to publication quality.

Stone 1980

Kurt Stone, Music Notation in the Twentieth Century. Norton, New York 1980.

This book describes music notation for modern serious music, but starts out with a thorough overview of existing traditional notation practices.


2.2 Long literature list

University of Colorado Engraving music bibliography

Computer notation bibliography

Engraving bibliography


A. GNU Free Documentation License

Version 1.3, 3 November 2008

 
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
https://fsf.org/

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
  1. PREAMBLE

    The purpose of this License is to make a manual, textbook, or other functional and useful document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

    This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

    We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

  2. APPLICABILITY AND DEFINITIONS

    This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

    A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

    A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

    The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

    The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

    A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.

    Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

    The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.

    The “publisher” means any person or entity that distributes copies of the Document to the public.

    A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.

    The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

  3. VERBATIM COPYING

    You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

    You may also lend copies, under the same conditions stated above, and you may publicly display copies.

  4. COPYING IN QUANTITY

    If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

    If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

    If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

    It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

  5. MODIFICATIONS

    You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

    1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
    2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
    3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
    4. Preserve all the copyright notices of the Document.
    5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
    6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
    7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice.
    8. Include an unaltered copy of this License.
    9. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
    10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
    11. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
    12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
    13. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.
    14. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.
    15. Preserve any Warranty Disclaimers.

    If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.

    You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

    You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

    The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

  6. COMBINING DOCUMENTS

    You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

    The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

    In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements.”

  7. COLLECTIONS OF DOCUMENTS

    You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

    You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

  8. AGGREGATION WITH INDEPENDENT WORKS

    A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

    If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

  9. TRANSLATION

    Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

    If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

  10. TERMINATION

    You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

    However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

    Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

    Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.

  11. FUTURE REVISIONS OF THIS LICENSE

    The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See https://www.gnu.org/licenses/.

    Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

  12. RELICENSING

    “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.

    “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

    “Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.

    An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

    The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

 
  Copyright (C)  year  your name.
  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.3
  or any later version published by the Free Software Foundation;
  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  Texts.  A copy of the license is included in the section entitled ``GNU
  Free Documentation License''.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with…Texts.” line with this:

 
    with the Invariant Sections being list their titles, with
    the Front-Cover Texts being list, and with the Back-Cover Texts
    being list.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.


B. LilyPond tárgymutató

Ugorj ide:   A   B   C   E   F   L   M   O   P   R   S   T  
Tárgymutató-bejegyzés Szakasz

A
automated engraving1.3 Az automatizált kottaszedés

B
balanceA kottában használt betűtípusok
blacknessA kottában használt betűtípusok

C
collisionsPótvonalak
contextsWhat symbols to engrave?
ContextsLásd még

E
engraverWhat symbols to engrave?
engraving1.2 A kottaszedés fortélyai
engravingWhat symbols to engrave?
engraving multiple voicesWhat symbols to engrave?
engraving, automated1.3 Az automatizált kottaszedés
examples, simple1.5 Putting LilyPond to work

F
fontA kottában használt betűtípusok
formatting a scoreFlexible architecture
formatting rulesFlexible architecture

L
ledger linesPótvonalak

M
music engraving1.2 A kottaszedés fortélyai
music typography1.2 A kottaszedés fortélyai
musical symbolsA kottában használt betűtípusok

O
optical spacingOptikai kiegyenlítettség

P
plate engraving1.2 A kottaszedés fortélyai
plug-inWhat symbols to engrave?
polyphonyWhat symbols to engrave?

R
recursive structuresMusic representation
regular rhythmsOptikai kiegyenlítettség
regular spacingOptikai kiegyenlítettség

S
Scheme programming languageFlexible architecture
score formattingFlexible architecture
simple examples1.5 Putting LilyPond to work
spacing, regularOptikai kiegyenlítettség
syntaxMusic representation

T
typographyWhat symbols to engrave?
typography, music1.2 A kottaszedés fortélyai

Ugorj ide:   A   B   C   E   F   L   M   O   P   R   S   T  

Lábjegyzet

[1] A régi idők nyomdászai különböző technikákat próbáltak ki, mint például a kézzel metszett fa nyomóformák (nyomódúc), a mozgatható betű- és nyomóelemek, illetve a gravírozott vékony fémlemezek. A mozgatható betű- és nyomóelemekkel való szedésnek megvolt az az előnye, hogy gyorsan bele lehetett javítani és egyszerűen lehetett szöveget is beleilleszteni. De csak a fémlemezre végzett hangjegymetszés tette lehetővé a hibátlan elrendezést és az új kottaelemek gyors bevezetését. Végül ez utóbbi technika lett a szabvány, és még a 20. század elején is ez volt a helyzet, pár korálkönyv és daloskönyv kivételével, ahol a sablonelemek használatát annak gazdaságossága és gyorsasága indokolta.


Tartalomjegyzék


LilyPond — Esszé v2.23.82 (development-branch).