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