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