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