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