📜 ⬆️ ⬇️

GNU LilyPond - Free Music Kit

As early as the end of the 1980s, music publishers gradually left hand and switched to computer music. At the moment, the list of music editors is huge, but professionals use Finale and Sibelius.

Holivary about who is better is not decaying for already ten years, the authoritative publishing house Bärenreiter (the musicians love him very much, although they swear at expensive notes) meanwhile use SCORE written in Fortran, while free-loving musicians look at LilyPond and are horrified , because how can an ordinary person live without WYSIWYG?

If not for TeX-like syntax, I’m sure many would use this engraver. It engraver - translations "engraver" and "typesetter" are not suitable here, because these words denote the profession. LilyPond better than other commercial and free software has a note text evenly on the page.
')

Comparison with popular programs


This is a melody of a well-known theme, collected in three different programs (LilyPond, Finale, Sibelius)


In LilyPond, nothing was done except dialing; in Sibelius and Finale, extra beats were removed, and the last note was forcibly automatically placed horizontally.


Consider some details:
SibeliusLilypondFinale
1. FontModernUnder the XIX century, especially the treble clefModern
2. Vertical system layoutBreak up a bitSystems do not break up and do not merge.Strongly break up
3. The horizontal arrangement of the elements on the musical notationAcceptable (although I would spread the last two notes on the first line)Almost perfectThe sixteenth after the eighth with a dot everywhere are stuck to the next note
4. Stability of horizontal distributionThe first line is compressed, the second is normal, the third is stretchedUniform, the distances on the 2nd and 3rd lines are almost the sameUniform, although the lines look overly concise
5. Distances around the clock line.Good when there are no alterations (see, for example, the border of 7 and 8 cycles), otherwise the right field suffersAlmost everywhere the same right and leftSuffer left field if there is sixteenth


In this very small example, which uses only the simplest elements of the notography, the difference is already noticeable. The authors of the program also grind Finale bones (this is the old version of the document, the new one also has a comparison ), and a certain Andrew Hawryluk, switching from Finale to LilyPond on his website, does about the same . By the way, on that site you can look at LilyPond'ovskiy set.

Attention! The next section contains technical details and is not even needed for primary education.

How it works


We know nothing about the internal work of Sibelius or Finale, but judging by the result, it would not hurt them to learn something from the developers of LilyPond.

Scheme

Half of LilyPond is written in Scheme, and the executable file uses GUILE to run this half. What gives such a separation? TeX-like markup (after checking the syntax, of course) is sent to the processing, which ultimately produces a “program” on Scheme, which already sets the C ++ parts, all parameters (mostly those that are set by default) and the notes themselves, but as programming language commands, not markup. Such an approach makes it possible, on the one hand, to more effectively look for errors in one or another part, and on the other hand, it makes it possible to identify commands that perform almost any action.

Contexts

The context is a certain part of the score to which something can be attributed, and which has certain properties. They are located on four levels.



Graphic objects

Graphic objects (indicated in the documentation by the word grob :-)) and their engravers, performers and the only Timing_translator (the parts responsible for drawing, creating MIDI and the rhythm synchronizer on all camps) are strictly distributed across contexts. Among their properties are usually quite a few responsible for the location of the vertical and horizontal. A complete list of coffins can be found in the relevant part of the documentation.

The bad

This funny translation of the word badness means the degree of deviation from the ideal location for each element (such a mechanism came from TeX).

The documentation states: In general, the distribution procedure takes place in four stages. First, elastic spaces (“springs”) are selected based on duration. Secondly, all possible combinations of line breaks are checked, and for each of them “badness” is calculated. Third, the height of each system is estimated. Finally, page breaks and combinations are chosen so that horizontal and vertical gaps do not stretch or shrink too much. [ source ]

Syntax


Textbook in pictures taken from the official site.

Commands begin with a backslash, letters are notes, and numbers are durations.
text-input-1-annotatetext-input-1-output

Alterations and chords do not cause problems. Note: the Russian musician is more accustomed to German or English names of notes. You can use \language "deutsch" or \language "english"
text-input-2-annotatetext-input-2-output

The score and parts can be made from one file - variables are used for this.
text-input-parts-both-annotate

You can separately, but you can together:
text-input-score-annotatetext-input-score-output

For further clarification, please refer to window No. 27 to the official manual (it is written quite well).

Using


Of course, you can type the code in notepad and run LilyPond with the command line. Nevertheless, there are programs designed to make life easier for the coder.

jEdit

To this popular cross-platform editor, there is a LilyPondTool plugin that adds syntax highlighting, viewing, PointAndClick (clicked on the score element - hit the appropriate place on the source code) and several handy pieces (such as dialogs to set typical properties). Almost the only handy tool for Windows.

Kate

The KDE staff editor is friendly with LilyPond, although not as advanced as the next program.

Frescobaldi

This is a LilyPond-specific editor for KDE (although it runs wonderfully in GNOME) that has more substantial support. There are more lotions available, and working with him personally is much nicer to me.

It is also possible to tie the export from Sibelus ( sib2ly ), built-in MIDI and MusicXML import.

The good news for TeX fans - LilyPond contains the LilyBook utility, with which you can easily embed musical examples directly into the TeX document.

PS: All this is available also under Windows and Mac OS

Links


Source: https://habr.com/ru/post/127238/


All Articles