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