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