]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/introduction.itely
Links for `about the docs' stuff.
[lilypond.git] / Documentation / user / introduction.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond-learning.tely
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @c \version "2.11.38"
11
12 @node Introduction
13 @chapter Introduction
14
15 This chapter introduces readers to LilyPond and the
16 documentation.
17
18 @menu
19 * Background::                  
20 * About the documentation::     
21 @end menu
22
23
24 @node Background
25 @section Background
26
27 This section covers the overall goals and architecture of
28 LilyPond.
29
30 @menu
31 * Engraving::                   
32 * Automated engraving::         
33 * What symbols to engrave?::    
34 * Music representation::        
35 * Example applications::        
36 @end menu
37
38
39 @node Engraving
40 @subsection Engraving
41
42 The art of music typography is called @emph{(plate) engraving}.  The
43 term derives from the traditional process of music printing.  Just a
44 few decades ago, sheet music was made by cutting and stamping the
45 music into a zinc or pewter plate in mirror image.  The plate would be
46 inked, the depressions caused by the cutting and stamping would hold
47 ink.  An image was formed by pressing paper to the plate.  The
48 stamping and cutting was completely done by hand.  Making a correction
49 was cumbersome, if possible at all, so the engraving had to be perfect
50 in one go.  Engraving was a highly specialized skill; a craftsman had
51 to complete around five years of training before earning the title of
52 master engraver, and another five years of experience were
53 necessary to become truly skilled.
54
55 Nowadays, all newly printed music is produced with computers.  This
56 has obvious advantages; prints are cheaper to make, and editorial work
57 can be delivered by email.  Unfortunately, the pervasive use of
58 computers has also decreased the graphical quality of scores.
59 Computer printouts have a bland, mechanical look, which makes them
60 unpleasant to play from.
61
62
63 @c introduce illustrating aspects of engraving, font...
64 The images below illustrate the difference between traditional
65 engraving and typical computer output, and the third picture shows how
66 LilyPond mimics the traditional look.  The left picture shows a scan
67 of a flat symbol from an edition published in 2000.  The center
68 depicts a symbol from a hand-engraved Bärenreiter edition of the
69 same music.  The left scan illustrates typical flaws of computer
70 print: the staff lines are thin, the weight of the flat symbol matches
71 the light lines and it has a straight layout with sharp corners.  By
72 contrast, the Bärenreiter flat has a bold, almost voluptuous
73 rounded look.  Our flat symbol is designed after, among others, this
74 one.  It is rounded, and its weight harmonizes with the thickness of
75 our staff lines, which are also much thicker than lines in the
76 computer edition.
77
78 @multitable @columnfractions .125 .25 .25 .25 .125
79 @item @tab
80 @ifnotinfo
81 @iftex
82 @image{henle-flat-gray,,4cm}
83 @end iftex
84 @ifnottex
85 @image{henle-flat-gray,,,png}
86 @end ifnottex
87
88 @tab
89 @iftex
90 @image{baer-flat-gray,,4cm}
91 @end iftex
92 @ifnottex
93 @image{baer-flat-gray,,,png}
94 @end ifnottex
95
96 @tab
97 @iftex
98 @image{lily-flat-bw,,4cm}
99 @end iftex
100 @ifnottex
101 @image{lily-flat-bw,,,png}
102 @end ifnottex
103 @end ifnotinfo
104 @ifinfo
105 @image{lilypond/henle-flat-bw,,,png} @image{lilypond/baer-flat-bw,,,png}
106 @image{lilypond/lily-flat-bw,,,png}
107 @end ifinfo
108
109 @item @tab
110 Henle (2000)
111 @tab
112 Bärenreiter (1950)
113 @tab
114 LilyPond Feta font (2003)
115
116 @end multitable
117
118
119 @cindex musical symbols
120 @cindex font
121 @cindex blackness
122 @cindex balance
123
124 @c introduce illustrating aspects of engraving, spacing...
125 In spacing, the distribution of space should reflect the durations
126 between notes.  However, many modern scores adhere to the durations
127 with mathematical precision, which leads to poor results.  In the next
128 example a motive is printed twice: once using exact mathematical
129 spacing, and once with corrections.  Can you spot which fragment is
130 which?
131
132 @cindex optical spacing
133 @c file spacing-optical.
134 @c need to include it here,  because we want two images.
135 @lilypond
136 \paper {
137   ragged-right = ##t
138   indent = #0.0
139 }
140
141 music = {
142    c'4 e''4 e'4 b'4 |
143    \stemDown
144    b'8[ e'' a' e'']
145    \stemNeutral
146    e'8[ e'8 e'8 e'8]
147 }
148
149 \score
150 {
151   \music
152   \layout {
153     \context {
154       \Staff
155       \override NoteSpacing #'stem-spacing-correction = #0.6
156     }
157   }
158 }
159 @end lilypond
160
161 @lilypond
162 \paper {
163   ragged-right = ##t
164   indent = #0.0
165 }
166
167 music = {
168    c'4 e''4 e'4 b'4 |
169    \stemDown
170    b'8[ e'' a' e'']
171    \stemNeutral
172    e'8[ e'8 e'8 e'8]
173 }
174 \score
175 {
176   \music
177   \layout {
178     \context {
179       \Staff
180       \override NoteSpacing #'stem-spacing-correction = #0.0
181       \override NoteSpacing #'same-direction-correction = #0.0
182       \override StaffSpacing #'stem-spacing-correction = #0.0
183     }
184   }
185 }
186 @end lilypond
187
188 @cindex regular rhythms
189 @cindex regular spacing
190
191 Each bar in the fragment only uses notes that are played in a constant
192 rhythm.  The spacing should reflect that.  Unfortunately, the eye
193 deceives us a little; not only does it notice the distance between
194 note heads, it also takes into account the distance between
195 consecutive stems.  As a result, the notes of an up-stem/@/down-stem
196 combination should be put farther apart, and the notes of a
197 down-stem/@/up-stem combination should be put closer together, all
198 depending on the combined vertical positions of the notes.  The upper
199 two measures are printed with this correction, the lower two measures
200 without, forming down-stem/@/up-stem clumps of notes.
201
202 @cindex typography
203
204 Musicians are usually more absorbed with performing than with studying
205 the looks of a piece of music, so nitpicking about typographical
206 details may seem academical.  But it is not.  In larger pieces with
207 monotonous rhythms, spacing corrections lead to subtle variations in
208 the layout of every line, giving each one a distinct visual signature.
209 Without this signature all lines would look the same, and they become
210 like a labyrinth.  If a musician looks away once or has a lapse in
211 concentration, the lines might lose their place on the page.
212
213 Similarly, the strong visual look of bold symbols on heavy staff lines
214 stands out better when the music is far away from the reader, for
215 example, if it is on a music stand.  A careful distribution of white
216 space allows music to be set very tightly without cluttering symbols
217 together.  The result minimizes the number of page turns, which is a
218 great advantage.
219
220 This is a common characteristic of typography.  Layout should be
221 pretty, not only for its own sake, but especially because it helps the
222 reader in her task.  For performance material like sheet music, this
223 is of double importance: musicians have a limited amount of attention.
224 The less attention they need for reading, the more they can focus on
225 playing the music.  In other words, better typography translates to
226 better performances.
227
228 These examples demonstrate that music typography is an art that is
229 subtle and complex, and that producing it requires considerable
230 expertise, which musicians usually do not have.  LilyPond is our
231 effort to bring the graphical excellence of hand-engraved music to the
232 computer age, and make it available to normal musicians.  We have
233 tuned our algorithms, font-designs, and program settings to produce
234 prints that match the quality of the old editions we love to see and
235 love to play from.
236
237
238
239
240 @node Automated engraving
241 @subsection Automated engraving
242
243 How do we go about implementing typography?  If craftsmen need over
244 ten years to become true masters, how could we simple hackers ever
245 write a program to take over their jobs?
246
247 The answer is: we cannot.  Typography relies on human judgment of
248 appearance, so people cannot be replaced completely.  However, much of
249 the dull work can be automated.  If LilyPond solves most of the common
250 situations correctly, this will be a huge improvement over existing
251 software.  The remaining cases can be tuned by hand.  Over the course
252 of years, the software can be refined to do more and more things
253 automatically, so manual overrides are less and less necessary.
254
255 When we started, we wrote the LilyPond program entirely in the C++
256 programming language; the program's functionality was set in stone by
257 the developers.  That proved to be unsatisfactory for a number of
258 reasons:
259
260 @itemize
261 @item When LilyPond makes mistakes,
262 users need to override formatting decisions.  Therefore, the user must
263 have access to the formatting engine.  Hence, rules and settings cannot
264 be fixed by us at compile-time but must be accessible for users at
265 run-time.
266
267 @item Engraving is a matter of visual judgment, and therefore a matter of
268 taste.  As knowledgeable as we are, users can disagree with our
269 personal decisions.  Therefore, the definitions of typographical style
270 must also be accessible to the user.
271
272 @item Finally, we continually refine the formatting algorithms, so we
273 need a flexible approach to rules.  The C++ language forces a certain
274 method of grouping rules that do not match well with how music
275 notation works.
276 @end itemize
277
278 These problems have been addressed by integrating an interpreter for
279 the Scheme programming language and rewriting parts of LilyPond in
280 Scheme.  The current formatting architecture is built around the
281 notion of graphical objects, described by Scheme variables and
282 functions.  This architecture encompasses formatting rules,
283 typographical style and individual formatting decisions.  The user has
284 direct access to most of these controls.
285
286 Scheme variables control layout decisions.  For example, many
287 graphical objects have a direction variable that encodes the choice
288 between up and down (or left and right).  Here you see two chords,
289 with accents and arpeggios.  In the first chord, the graphical objects
290 have all directions down (or left).  The second chord has all
291 directions up (right).
292
293 @lilypond[quote,ragged-right]
294 \new Score \with {
295    \override SpacingSpanner #'spacing-increment = #3
296    \override TimeSignature #'transparent = ##t
297 } \relative {
298    \stemDown <e g b>4_>-\arpeggio
299    \override Arpeggio #'direction = #RIGHT
300    \stemUp <e g b>4^>-\arpeggio
301 }
302 @end lilypond
303
304 @noindent
305 The process of formatting a score consists of reading and writing the
306 variables of graphical objects.  Some variables have a preset value.  For
307 example, the thickness of many lines -- a characteristic of typographical
308 style -- is a variable with a preset value.  You are free to alter this
309 value, giving your score a different typographical impression.
310
311 @lilypond[quote,ragged-right]
312 fragment = {
313    \clef bass f8 as8
314    c'4-~ c'16 as g f e16 g bes c' des'4
315 }
316 <<
317    \new Staff \fragment
318    \new Staff \with {
319       \override Beam #'thickness = #0.3
320       \override Stem #'thickness = #0.5
321       \override Bar #'thickness = #3.6
322       \override Tie #'thickness = #2.2
323       \override StaffSymbol #'thickness = #3.0
324       \override Tie #'extra-offset = #'(0 .  0.3)
325       }
326       \fragment
327 >>
328 @end lilypond
329
330 Formatting rules are also preset variables: each object has variables
331 containing procedures.  These procedures perform the actual
332 formatting, and by substituting different ones, we can change the
333 appearance of objects.  In the following example, the rule which note
334 head objects are used to produce their symbol is changed during the
335 music fragment.
336
337 @lilypond[quote,ragged-right]
338 #(set-global-staff-size 30)
339
340 #(define (mc-squared grob orig current)
341   (let* ((interfaces (ly:grob-interfaces grob))
342          (pos (ly:grob-property grob 'staff-position)))
343     (if (memq 'note-head-interface interfaces)
344         (begin
345           (ly:grob-set-property! grob 'stencil ly:text-interface::print)
346           (ly:grob-set-property! grob 'font-family 'roman)
347           (ly:grob-set-property! grob 'text
348             (make-raise-markup -0.5
349               (case pos
350                 ((-5) (make-simple-markup "m"))
351                 ((-3) (make-simple-markup "c "))
352                 ((-2) (make-smaller-markup (make-bold-markup "2")))
353                 (else (make-simple-markup "bla")))))))))
354
355 \new Voice \relative c' {
356    \stemUp
357    \set autoBeaming = ##f
358    \time 2/4
359    <d f g>4
360    \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
361    \once \override NoteHead #'font-size = #-7
362    \once \override NoteHead #'font-family = #'sans
363    \once \override NoteHead #'font-series = #'bold
364    <d f g>
365    \once \override NoteHead #'style = #'cross
366    <d f g>
367    \applyOutput #'Voice #mc-squared
368    <d f g>
369    <<
370       { d8[ es-( fis^^ g] fis2-) }
371       \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
372    >>
373 }
374 @end lilypond
375
376
377
378 @node What symbols to engrave?
379 @subsection What symbols to engrave?
380
381 @cindex engraving
382 @cindex typography
383
384 The formatting process decides where to place symbols.  However, this
385 can only be done once it is decided @emph{what} symbols should be
386 printed, in other words what notation to use.
387
388 Common music notation is a system of recording music that has evolved
389 over the past 1000 years.  The form that is now in common use dates
390 from the early renaissance.  Although the basic form (i.e., note heads
391 on a 5-line staff) has not changed, the details still evolve to
392 express the innovations of contemporary notation.  Hence, it
393 encompasses some 500 years of music.  Its applications range from
394 monophonic melodies to monstrous counterpoints for large orchestras.
395
396 How can we get a grip on such a many-headed beast, and force it into
397 the confines of a computer program?  Our solution is to break up the
398 problem of notation (as opposed to engraving, i.e., typography) into
399 digestible and programmable chunks: every type of symbol is handled by
400 a separate module, a so-called plug-in.  Each plug-in is completely
401 modular and independent, so each can be developed and improved
402 separately.  Such plug-ins are called @code{engraver}s, by analogy
403 with craftsmen who translate musical ideas to graphic symbols.
404
405 In the following example, we see how we start out with a plug-in for
406 note heads, the @code{Note_heads_engraver}.
407
408 @lilypond[quote,ragged-right]
409 \include "engraver-example.ily"
410
411 \score {
412    \topVoice
413    \layout {
414    \context {
415       \Voice
416       \remove "Stem_engraver"
417       \remove "Phrasing_slur_engraver"
418       \remove "Slur_engraver"
419       \remove "Script_engraver"
420       \remove "Beam_engraver"
421       \remove "Auto_beam_engraver"
422    }
423    \context {
424       \Staff
425       \remove "Accidental_engraver"
426       \remove "Key_engraver"
427       \remove "Clef_engraver"
428       \remove "Bar_engraver"
429       \remove "Time_signature_engraver"
430       \remove "Staff_symbol_engraver"
431       \consists "Pitch_squash_engraver"
432    }
433 }
434 }
435 @end lilypond
436
437 @noindent
438 Then a @code{Staff_symbol_engraver} adds the staff
439
440 @lilypond[quote,ragged-right]
441 \include "engraver-example.ily"
442
443 \score {
444   \topVoice
445   \layout {
446     \context {
447       \Voice
448       \remove "Stem_engraver"
449       \remove "Phrasing_slur_engraver"
450       \remove "Slur_engraver"
451       \remove "Script_engraver"
452       \remove "Beam_engraver"
453       \remove "Auto_beam_engraver"
454     }
455     \context {
456       \Staff
457       \remove "Accidental_engraver"
458       \remove "Key_engraver"
459       \remove "Clef_engraver"
460       \remove "Bar_engraver"
461       \consists "Pitch_squash_engraver"
462       \remove "Time_signature_engraver"
463     }
464   }
465 }
466 @end lilypond
467
468 @noindent
469 the @code{Clef_engraver} defines a reference point for the staff
470
471 @lilypond[quote,ragged-right]
472 \include "engraver-example.ily"
473
474 \score {
475   \topVoice
476   \layout {
477     \context {
478       \Voice
479       \remove "Stem_engraver"
480       \remove "Phrasing_slur_engraver"
481       \remove "Slur_engraver"
482       \remove "Script_engraver"
483       \remove "Beam_engraver"
484       \remove "Auto_beam_engraver"
485     }
486     \context {
487       \Staff
488       \remove "Accidental_engraver"
489       \remove "Key_engraver"
490       \remove "Bar_engraver"
491       \remove "Time_signature_engraver"
492     }
493   }
494 }
495 @end lilypond
496
497 @noindent
498 and the @code{Stem_engraver} adds stems.
499
500 @lilypond[quote,ragged-right]
501 \include "engraver-example.ily"
502
503 \score {
504   \topVoice
505   \layout {
506     \context {
507       \Voice
508       \remove "Phrasing_slur_engraver"
509       \remove "Slur_engraver"
510       \remove "Script_engraver"
511       \remove "Beam_engraver"
512       \remove "Auto_beam_engraver"
513     }
514     \context {
515       \Staff
516       \remove "Accidental_engraver"
517       \remove "Key_engraver"
518       \remove "Bar_engraver"
519       \remove "Time_signature_engraver"
520     }
521   }
522 }
523 @end lilypond
524
525 @noindent
526 The @code{Stem_engraver} is notified of any note head coming along.
527 Every time one (or more, for a chord) note head is seen, a stem
528 object is created and connected to the note head.  By adding
529 engravers for beams, slurs, accents, accidentals, bar lines,
530 time signature, and key signature, we get a complete piece of
531 notation.
532
533 @lilypond[quote,ragged-right]
534 \include "engraver-example.ily"
535 \score { \topVoice }
536 @end lilypond
537
538 This system works well for monophonic music, but what about
539 polyphony?  In polyphonic notation, many voices can share a staff.
540
541 @lilypond[quote,ragged-right]
542 \include "engraver-example.ily"
543 \new Staff << \topVoice \\ \botVoice >>
544 @end lilypond
545
546 In this situation, the accidentals and staff are shared, but the stems,
547 slurs, beams, etc., are private to each voice.  Hence, engravers should
548 be grouped.  The engravers for note heads, stems, slurs, etc., go into a
549 group called @q{Voice context,} while the engravers for key, accidental,
550 bar, etc., go into a group called @q{Staff context.}  In the case of
551 polyphony, a single Staff context contains more than one Voice context.
552 Similarly, multiple Staff contexts can be put into a single Score
553 context.  The Score context is the top level notation context.
554
555 @seealso
556
557 Internals Reference: @rinternals{Contexts}.
558
559 @lilypond[quote,ragged-right]
560 \include "engraver-example.ily"
561 \score {
562    <<
563       \new Staff << \topVoice \\ \botVoice >>
564       \new Staff << \pah \\ \hoom >>
565    >>
566 }
567 @end lilypond
568
569 @node Music representation
570 @subsection Music representation
571
572 Ideally, the input format for any high-level formatting system is an
573 abstract description of the content.  In this case, that would be the
574 music itself.  This poses a formidable problem: how can we define what
575 music really is? Instead of trying to find an answer, we have reversed
576 the question.  We write a program capable of producing sheet music,
577 and adjust the format to be as lean as possible.  When the format can
578 no longer be trimmed down, by definition we are left with content
579 itself.  Our program serves as a formal definition of a music
580 document.
581
582 The syntax is also the user-interface for LilyPond, hence it is easy
583 to type
584
585 @example
586 @{
587   c'4 d'8
588 @}
589 @end example
590
591 @noindent
592 a quarter note C1 (middle C) and an eighth note D1 (D above middle C)
593
594 @lilypond[quote]
595 {
596   c'4 d'8
597 }
598 @end lilypond
599
600 On a microscopic scale, such syntax is easy to use.  On a larger
601 scale, syntax also needs structure.  How else can you enter complex
602 pieces like symphonies and operas?  The structure is formed by the
603 concept of music expressions: by combining small fragments of music
604 into larger ones, more complex music can be expressed.  For example
605
606 @lilypond[quote,verbatim,fragment,relative=1]
607 c4
608 @end lilypond
609
610 @noindent
611 Chords can be constructed with @code{<<} and @code{>>} enclosing the notes
612
613 @c < > is not a music expression,
614 @c so we use <<>> iso. <> to drive home the point of
615 @c expressions.  Don't change this back --hwn.
616 @example
617 <<c4 d4 e4>>
618 @end example
619
620 @lilypond[quote,fragment,relative=1]
621 \new Voice { <<c4 d4 e>> }
622 @end lilypond
623
624 @noindent
625 This expression is put in sequence by enclosing it in curly braces
626 @code{@{@tie{}@dots{}@tie{}@}}
627
628 @example
629 @{ f4 <<c4 d4 e4>> @}
630 @end example
631
632 @lilypond[quote,relative=1,fragment]
633 { f4 <<c d e4>> }
634 @end lilypond
635
636 @noindent
637 The above is also an expression, and so it may be combined
638 again with another simultaneous expression (a half note) using <<,
639 @code{\\}, and >>
640
641 @example
642 << g2 \\ @{ f4 <<c4 d4 e4>> @} >>
643 @end example
644
645 @lilypond[quote,fragment,relative=2]
646 \new Voice { << g2 \\ { f4 <<c d e>> } >> }
647 @end lilypond
648
649 Such recursive structures can be specified neatly and formally in a
650 context-free grammar.  The parsing code is also generated from this
651 grammar.  In other words, the syntax of LilyPond is clearly and
652 unambiguously defined.
653
654 User-interfaces and syntax are what people see and deal with
655 most.  They are partly a matter of taste, and also subject of much
656 discussion.  Although discussions on taste do have their merit, they
657 are not very productive.  In the larger picture of LilyPond, the
658 importance of input syntax is small: inventing neat syntax is easy, while
659 writing decent formatting code is much harder.  This is also
660 illustrated by the line-counts for the respective components: parsing
661 and representation take up less than 10% of the source code.
662
663
664 @node Example applications
665 @subsection Example applications
666
667 We have written LilyPond as an experiment of how to condense the art
668 of music engraving into a computer program.  Thanks to all that hard
669 work, the program can now be used to perform useful tasks.  The
670 simplest application is printing notes.
671
672 @lilypond[quote,relative=1]
673 {
674   \time 2/4
675   c4 c g'4 g a4 a g2
676 }
677 @end lilypond
678
679 @noindent
680 By adding chord names and lyrics we obtain a lead sheet.
681
682 @lilypond[quote,ragged-right]
683 <<
684    \chords { c2 c f2 c }
685    \new Staff \relative c' { \time 2/4 c4 c g'4 g a4 a g2 }
686    \new Lyrics \lyricmode { twin4 kle twin kle lit tle star2 }
687 >>
688 @end lilypond
689
690 Polyphonic notation and piano music can also be printed.  The following
691 example combines some more exotic constructs.
692
693 @lilypondfile[quote,ragged-right]{screech-boink.ly}
694
695 The fragments shown above have all been written by hand, but that is
696 not a requirement.  Since the formatting engine is mostly automatic, it
697 can serve as an output means for other programs that manipulate
698 music.  For example, it can also be used to convert databases of
699 musical fragments to images for use on websites and multimedia
700 presentations.
701
702 This manual also shows an application: the input format is text, and
703 can therefore be easily embedded in other text-based formats such as
704 @LaTeX{}, HTML, or in the case of this manual, Texinfo.  By means of a
705 special program, the input fragments can be replaced by music images
706 in the resulting PDF or HTML output files.  This makes it easy
707 to mix music and text in documents.
708
709
710 @node About the documentation
711 @section About the documentation
712
713 This section explains the different manuals:
714
715 @itemize
716 @item
717 Learning Manual (LM): this introduces LilyPond, giving in-depth
718 explanations of how to create notation.
719
720 @item
721 Music Glossary (MG): this explains musical terms and gives
722 translations of terms in other languages.
723
724 @item
725 Notation Reference (NR): this is the @q{main} portion of the
726 documentation.  It provides detailed information about creating
727 notation.
728
729 @item
730 Application Usage (AU): this discusses the actual programs and
731 operation system-specific issues.
732
733 @item
734 Snippet List (SL): this is a collection of short LilyPond examples
735 (@qq{snippets}).
736
737 @item
738 Other documentation: there are a few other portions of the
739 documentation, such as News items and the mailist archives.
740
741 @end itemize
742
743 @menu
744 * About the Learning Manual (LM)::  
745 * About the Music Glossary (MG)::  
746 * About the Notation Reference (NR)::  
747 * About the Application Usage (AU)::  
748 * About the Snippet List (SL)::  
749 * Other documentation::         
750 @end menu
751
752 @c zz
753 @node About the Learning Manual (LM)
754 @subsection About the Learning Manual (LM)
755
756
757 @node About the Music Glossary (MG)
758 @subsection About the Music Glossary (MG)
759
760 @node About the Notation Reference (NR)
761 @subsection About the Notation Reference (NR)
762
763 @node About the Application Usage (AU)
764 @subsection About the Application Usage (AU)
765
766
767 @node About the Snippet List (SL)
768 @subsection About the Snippet List (SL)
769
770 The Snippet List shows a selected set of LilyPond snippets from the
771 @uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
772 (LSR).  It is in the public domain.
773
774 Please note that this document is not an exact subset of LSR.  LSR
775 is running a stable LilyPond version, so any snippet which
776 demonstrates new features of a development version must be added
777 separately.  These are stored in @file{input/new/} in the LilyPond
778 source tree.
779
780 The list of snippets for each subsection of the Notation Reference
781 (NR) are also linked from the @strong{See also} portion.
782
783
784 @node Other documentation
785 @subsection Other documentation
786
787
788 FIXME: needs almost-complete rewrite.  -gp
789
790 There are four manuals about LilyPond: the @emph{Learning Manual},
791 the @emph{Notation Reference}, the @emph{Application Usage}, and the
792 @emph{Internals Reference}.
793
794
795 @subheading Learning Manual (LM)
796
797 This book explains how to begin learning LilyPond, as well as explaining
798 some key concepts in easy terms.  It is recommended to read these
799 chapters in a linear fashion.
800
801 @itemize
802
803 @item
804 @ifhtml
805 The
806 @end ifhtml
807 @emph{@ref{Tutorial}},
808 gives a gentle introduction to typesetting music.  First time
809 users should start here.
810
811 @item
812 @emph{@ref{Fundamental concepts}},
813 explains some general concepts about the LilyPond file format.  If
814 you are not certain where to place a command, read this chapter!
815
816 @item
817 @emph{@ref{Working on LilyPond projects}},
818 discusses practical uses of LilyPond and how to avoid some common
819 problems.
820
821 @item
822 @emph{@ref{Tweaking output}},
823 shows how to change the default engraving that LilyPond
824 produces.
825
826 @end itemize
827
828
829 @subheading Notation Reference (NR)
830
831 This book explains all the LilyPond commands which produce notation.  It
832 assumes that readers are familiar with the concepts in the Learning
833 manual.
834
835 All of this needs to be rewritten after GDP, anyway.
836
837 @ignore
838
839 @itemize
840
841 @item
842 @emph{@r ef{Basic notation}},
843 discusses topics grouped by notation construct.  This section gives
844 details about basic notation that will be useful in almost any
845 notation project.
846
847 @item
848 @emph{@r ef{Instrument-specific notation}},
849 discusses topics grouped by notation construct.  This section gives
850 details about special notation that will only be useful for particular
851 instrument (or vocal) groups.
852
853 @item
854 @emph{@r ef{Advanced notation}},
855 discusses topics grouped by notation construct.  This section gives
856 details about complicated or unusual notation.
857
858 @item
859 @emph{@r ef{Changing defaults}},
860 explains how to fine tune layout.
861
862 @item
863 @emph{@r ef{Non-musical notation}},
864 discusses non-musical output such as titles, multiple movements,
865 and how to select which MIDI instruments to use.
866
867 @item
868 @emph{@r ef{Spacing issues}},
869 discusses issues which affect the global output, such as selecting
870 paper size or specifying page breaks.
871
872 @item
873 @emph{@r ef{Interfaces for programmers}},
874 explains how to create music functions.
875
876 @end itemize
877
878
879 @subsubheading Appendices
880
881 This book contains useful reference charts.
882
883 @itemize
884 @item
885 @ifhtml
886 The
887 @end ifhtml
888 @emph{@r ef{Literature list}},
889 contains a set of useful reference books for those who wish to know
890 more on notation and engraving.
891
892 @item
893 The
894 @emph{@r ef{Scheme tutorial}},
895 presents a short introduction to Scheme, the programming
896 language that music functions use.
897
898 @item
899 @emph{@r ef{Notation manual tables}},
900 are a set of tables showing the chord names, MIDI instruments,
901 a list of color names, and the Feta font.
902
903 @item
904 @emph{@r ef{Templates}},
905 of LilyPond pieces.  Just cut and paste a
906 template into a file, add notes, and you're done!
907
908 @item
909 The
910 @emph{@r ef{Cheat sheet}},
911 is a handy reference of the most common LilyPond commands.
912
913 @item
914 The
915 @emph{@r ef{LilyPond command index}},
916 is an index of all LilyPond @code{\commands}.
917
918 @item
919 The
920 @emph{@r ef{LilyPond index}},
921 is a complete index.
922
923 @end itemize
924
925 @end ignore
926
927
928 @subheading Program usage
929
930 This book explains how to execute the program and how to integrate
931 LilyPond notation with other programs.
932
933 @itemize
934
935 @item
936 @emph{@rprogram{Install}},
937 explains how to install LilyPond (including compilation if desired).
938
939 @item
940 @emph{@rprogram{Setup}},
941 describes how to configure your computer for optimum LilyPond usage,
942 such as using special environments for certain text editors.
943
944 @item
945 @emph{@rprogram{Running LilyPond}},
946 shows how to run LilyPond and its helper programs.  In addition, this
947 section explains how to upgrade input files from previous versions of
948 LilyPond.
949
950 @item
951 @emph{@rprogram{LilyPond-book}},
952 explains the details behind creating
953 documents with in-line music examples, like this manual.
954
955 @item
956 @emph{@rprogram{Converting from other formats}},
957 explains how to run the conversion programs.  These programs are
958 supplied with the LilyPond package, and convert a variety of music
959 formats to the @code{.ly} format.
960
961 @end itemize
962
963
964
965 @subsubheading Other information
966
967 There are a number of other places which may be very valuable.
968
969 @itemize
970 @cindex idiom
971 @cindex jargon
972 @cindex terminology
973 @cindex foreign languages
974 @cindex language
975 @item
976 @ifnottex
977 The @ref{Top,Music glossary,,music-glossary}, explains musical terms and
978 includes translations to various languages.  It is also available in
979 PDF.
980 @end ifnottex
981 @iftex
982 The music glossary explains musical terms, and includes translations
983 to various languages.  It is a separate document, available in HTML
984 and PDF.
985 @end iftex
986 If you are not familiar with music notation or music terminology
987 (especially if you are a non-native English speaker), it is highly
988 advisable to consult the glossary.
989
990 @cindex snippets
991 @cindex LSR
992 @item
993 The
994 @ifhtml
995 @uref{source/input/lsr/lilypond-snippets/index.html,Snippets}
996 @end ifhtml
997 @ifnothtml
998 Snippets
999 @end ifnothtml
1000 are a great collection of short examples which demonstrate tricks, tips,
1001 and special features of LilyPond.  Most of these snippets can also be
1002 found in the @uref{http://lsr.dsi.unimi.it/,LilyPond Snippet
1003 Repository}.  This website also has a searchable LilyPond manual.
1004
1005
1006 @item
1007 The
1008 @iftex
1009 Internals Reference
1010 @end iftex
1011 @ifnottex
1012 @ref{Top,Internals Reference,,lilypond-internals}
1013 @end ifnottex
1014 is a set of heavily cross linked HTML pages, which document the
1015 nitty-gritty details of each and every LilyPond class, object, and
1016 function.  It is produced directly from the formatting definitions used.
1017
1018 Almost all formatting functionality that is used internally, is
1019 available directly to the user.  For example, all variables that control
1020 thickness values, distances, etc., can be changed in input files.  There
1021 are a huge number of formatting options, and all of them are described
1022 in this document.  Each section of the notation manual has a @b{See
1023 also} subsection, which refers to the generated documentation.  In the
1024 HTML document, these subsections have clickable links.
1025
1026 @end itemize
1027
1028
1029 Once you are an experienced user, you can use the manual as reference:
1030 there is an extensive index@footnote{If you are looking for something,
1031 and you cannot find it in the manual, that is considered a bug.  In
1032 that case, please file a bug report.}, but the document is also
1033 available in
1034 @iftex
1035 a big HTML page,
1036 @end iftex
1037 @ifhtml
1038 @uref{source/Documentation/user/lilypond-big-page.html, one big page},
1039 @end ifhtml
1040 which can be searched easily using the search facility of a web
1041 browser.
1042
1043
1044 In all HTML documents that have music fragments embedded, the LilyPond
1045 input that was used to produce that image can be viewed by clicking
1046 the image.
1047
1048 The location of the documentation files that are mentioned here can vary
1049 from system to system.  On occasion, this manual refers to
1050 initialization and example files.  Throughout this manual, we refer to
1051 input files relative to the top-directory of the source archive.  For
1052 example, @file{input/@/lsr/@/dirname/@/bla@/.ly} may refer to the file
1053 @file{lilypond@/2.x.y/@/input/@/lsr/@/dirname/@/bla@/.ly}.  On binary
1054 packages for the UNIX platform, the documentation and examples can
1055 typically be found somewhere below
1056 @file{/usr/@/share/@/doc/@/lilypond/}.  Initialization files, for
1057 example @file{scm/@/lily@/.scm}, or @file{ly/@/engraver@/-init@/.ly},
1058 are usually found in the directory @file{/usr/@/share/@/lilypond/}.
1059
1060 @cindex adjusting output
1061 @cindex variables
1062 @cindex properties
1063 @cindex lilypond-internals
1064 @cindex internal documentation
1065 @cindex Scheme
1066 @cindex extending LilyPond
1067 @cindex index
1068
1069 Finally, this and all other manuals, are available online both as PDF
1070 files and HTML from the web site, which can be found at
1071 @uref{http://@/www@/.lilypond@/.org/}.
1072
1073