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