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