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