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