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