]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/refman.itely
* Documentation/GNUmakefile: Remove regression-test stuff.
[lilypond.git] / Documentation / user / refman.itely
index dce5be137f9acb346eb8daa20d9e0427958e8da6..6d229f2cf56c0dcf923cd8a8683eff9ec515d3c0 100644 (file)
@@ -46,7 +46,6 @@ encouraged to study the tutorial first.
 * Ancient notation ::           
 * Tuning output::               
 * Global layout::               
-* Output formats::              
 * Sound::                       
 @end menu
 
@@ -436,8 +435,7 @@ A entirely different type of note head is the "easyplay" note head: a
 note head that includes a note name.  It is used in some publications by
 Hal-Leonard Inc.  music publishers.
 
-@lilypond[singleline,verbatim]
-\include "paper23.ly"
+@lilypond[singleline,verbatim,26pt]
 \score {
   \notes { c'2 e'4 f' | g'1 }
   \paper { \translator { \EasyNotation } } 
@@ -445,7 +443,7 @@ Hal-Leonard Inc.  music publishers.
 @end lilypond
 
 Note that @code{EasyNotation} overrides a @internalsref{Score} context.  You
-probably will want to print it with magnification to make it more
+probably will want to print it with magnification or a large font size to make it more
 readable.
 
 
@@ -461,6 +459,7 @@ produce the correct result.
 @section Easier music entry
 @cindex Music entry
 @menu
+* Graphical interfaces::        
 * Relative octaves::            
 * Bar check::                   
 * Point and click::             
@@ -471,6 +470,39 @@ When entering music with LilyPond, it is easy to introduce errors. This
 section deals with tricks and features that help you enter music, and
 find and correct mistakes.
 
+@node Graphical interfaces
+@subsection Graphical interfaces
+
+@cindex GUI
+@cindex graphical interface
+@cindex sequencer
+@cindex RoseGarden
+@cindex Denemo
+@cindex NoteEdit
+@cindex MIDI
+
+One way to avoid entering notes using the keyboard, is to use  a
+graphical user interface.  The following programs are known to have
+a lilypond export option:
+
+@itemize @bullet
+@item
+@uref{http://denemo.sourceforge.net/, Denemo}, was once intended as
+LilyPond graphical user interface.  It run on Gnome/GTK.
+@item
+@uref{http://rnvs.informatik.tu-chemnitz.de/~jan/noteedit/noteedit.html,noteedit}
+NoteEdit is a graphical score editor that runs under KDE/Qt.
+@item
+@uref{http://rosegarden.sf.net/,RoseGarden}
+once was an inspiration for naming LilyPond. Nowadays, it has been
+rewritten from scratch, and supports LilyPond export as of version
+0.1.6.
+@end itemize
+
+Another option is to enter the music using your favorite MIDI
+sequencer, and then import it using midi2ly. midi2ly is described in
+@ref{Importing MIDI}.
+
 @c .  {Relative}
 @node Relative octaves
 @subsection Relative octaves
@@ -572,25 +604,38 @@ corrected music})).
 @c .  {Point and click}
 @node Point and click
 @subsection Point and click
+@cindex poind and click
 
 Point and click lets you find notes in the input by clicking on them in
 the Xdvi window. This makes it very easy to find input that causes some
 error in the sheet music.
 
 To use it, you need the following software
-
 @itemize @bullet
-@item 
-@uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,plain
-Xdvi} version 22.36 or newer.
+@item A dvi viewer that supports src specials.
+@itemize @bullet
+@item Plain Xdvi, version 22.36 or newer.  Available from
+@uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,ftp.math.berkeley.edu}.
 
   Note that most @TeX{} distributions ship with xdvik, which is a
   different and less well maintained program. To find out which xdvi you
   are running, try @code{xdvi --version} or @code{xdvi.bin --version}.
-@item Emacs. Emacs is an extensible text-editor It is available from
-@uref{http://www.gnu.org/software/emacs/}. You need version 21 to use
+@item KDVI.  A dvi viewer for KDE.  You need KDVI from KDE 3.0 or
+newer.  Enablle the menu Settings -> Inverse search. 
+@end itemize
+@item An editor with a client/server interface (or a lightweight GUI editor).
+@itemize @bullet
+@item Emacs. Emacs is an extensible text-editor.  It is available from
+@uref{http://www.gnu.org/software/emacs/}.  You need version 21 to use
 column location.
+@item XEmacs. Xemacs is very similar to emacs.
+@item NEdit.  NEdit runs under Windows, and Unix.
+  It is available from @uref{http://www.nedit.org}.
+@item GVim.  GVim is a lightweight GUI variant of VIM, the popular VI
+clone.  It is available from @uref{http://www.vim.org}.
 @end itemize
+@end itemize
+
 
 Xdvi must be configured to find the @TeX{} fonts and music
 fonts. Refer to the Xdvi documentation for more information.
@@ -600,34 +645,48 @@ file.
 @example
 #(set! point-and-click line-location)
 @end example
+@cindex line-location
 
-In the emacs startup file (usually @file{~/.emacs}), add the following
+When viewing, Control-Mousebutton 1 will take you to the originating
+spot in the @file{.ly} file.  Control-Mousebutton 2 will show all
+clickable boxes.
+
+If you correct large files with point-and-click, be sure to start
+correcting at the end of the file. When you start at the top, and
+insert one line, all following locations will be off by a line.
+
+@cindex Emacs
+For using point-and-click with emacs,  add the following
+In your emacs startup file (usually @file{~/.emacs}), 
 @example
 (server-start)
 @end example
 
-Make sure that the environment variable @code{XEDITOR} is set to
+Make sure that the environment variable @var{XEDITOR} is set to
 @example
 emacsclient --no-wait +%l %f
 @end example
-
-When viewing, Control-Mousebutton 1 will take you to the originating
-spot in the @file{.ly} file. Control-Mousebutton 2 will show all
-clickable boxes.
-
-If you use Emacs version 21, then you can make emacs jump to the exact
-spot (and not just the line) on a click, you must enable column
-positioning.  At the top of the @code{ly} file, replace the
-@code{set!} line with the following line
+@cindex @var{XEDITOR}
+If you use xemacs instead of emacs, you use @code{(gnuserve-start)} in
+your @file{.emacs}, and set @code{XEDITOR} to @code{gnuclient -q +%l %f}
+
+For using Vim, set @code{XEDITOR} to @code{gvim +%l %f}, or use this
+argument with xdvi's @code{-editor} option.
+@cindex NEdit
+For using NEdit, set @code{XEDITOR} to @code{nc -noask +%l %f}, or
+use this argument with xdvi's @code{-editor} option.
+
+If can also make your editor jump to the exact location of the note
+you clicked. This is only supported on Emacs. Users of version 20 must
+apply the patch @file{emacsclient.patch}. Users of version 21 must
+apply @file{server.el.patch} (version 21.2 and earlier).  At the top
+of the @code{ly} file, replace the @code{set!} line with the following
+line,
 @example
 #(set! point-and-click line-column-location)
 @end example
-Set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}.
-
-If you correct large files with point-and-click, be sure to start
-correcting at the end of the file. When you start at the top, and
-insert one line, all following locations will be off by a line.
-
+@cindex line-colomn-location
+and set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}.
 
 @refbugs
 
@@ -1655,6 +1714,34 @@ put them up:
 Other symbols can be added using the syntax
 @var{note}@code{-\}@var{name}. Again, they can be forced up or down
 using @code{^} and @code{_}.
+
+@cindex accent      
+@cindex marcato      
+@cindex staccatissimo
+@cindex fermata 
+@cindex stopped     
+@cindex staccato     
+@cindex tenuto        
+@cindex upbow
+@cindex downbow
+@cindex foot marks
+@cindex organ pedal marks
+@cindex turn         
+@cindex open          
+@cindex flageolet
+@cindex reverseturn 
+@cindex trill        
+@cindex prall         
+@cindex mordent
+@cindex prallprall  
+@cindex prallmordent 
+@cindex prall, up
+@cindex prall, down
+@cindex mordent
+@cindex thumb marking
+@cindex segno         
+@cindex coda
+
 @lilypond[]
   \score {
     <
@@ -1737,8 +1824,8 @@ c4^"longtext" \fatText c4_"longlongtext" c4 }
 It is possible to use @TeX{} commands in the strings, but this should be
 avoided because it makes it impossible for LilyPond to compute the
 exact length of the string, which may lead to collisions.  Also, @TeX{}
-commands won't work with direct PostScript output (see @ref{PostScript
-output}).
+commands won't work with direct PostScript output.
+@c (see @ref{PostScript output}).
 
 Text scripts are created in form of @internalsref{TextScript} grobs, in
 @internalsref{Voice} context. 
@@ -1774,8 +1861,8 @@ example is shown here with timing tuples.
 
 @lilypond[]
 \score { \notes \relative c''{ 
-  c4^"(0,0)"  \grace c16_"(1/4,-1/16)"  c4^"(1/4,0)"  \grace {
-  [c16_"(2/4,-1/8)"  d16^"(2/4,-1/16)" ] } c4_"(2/4,0)"
+  c4^"(0,0)"  \grace c16_" "_"(1/4,-1/16)"  c4^"(1/4,0)"  \grace {
+  [c16_"(2/4,-1/8)"  d16^"(2/4,-1/16)" ] } c4_" "_"(2/4,0)"
   }
 \paper {  linewidth = 8.\cm }
 }
@@ -1793,18 +1880,19 @@ The placement of these grace notes is synchronized between different
 staffs, using this grace timing.
 
 @lilypond[relative=2,verbatim,fragment] 
-\context Staff = SA { e4 \grace { c16 d e f } e4 }
-\context Staff = SB { c4 \grace { g8 b } c4 }
+\context Staff = SA { e4 \grace { c16 d e f } e4 }
+  \context Staff = SB { c4 \grace { g8 b } c4 } >
 @end lilypond
 
 
-The syntax is as follows.
-@example
-  \grace @var{musicexpr}
-@end example
-
 Unbeamed eighth notes and shorter by default have a slash through the
-stem.
+stem. This can be controlled with grob property @code{flag-style} of
+@internalsref{Stem}. The change in formatting is accomplished by
+inserting @code{\startGraceMusic} before handling the grace notes, and
+@code{\stopGraceMusic} after finishing the grace notes. You can add to
+these definitions to globally change grace note formatting. The
+standard definitions are in @file{ly/grace-init.ly}.
+
 
 @lilypond[fragment,verbatim]
 \relative c'' \context Voice {
@@ -1823,7 +1911,7 @@ Grace note synchronization can also lead to surprises. Staff notation,
 such as key signatures, barlines, etc. are also synchronized. Take
 care when you mix staffs with grace notes and staffs without.
 
-@lilypond[relative=2,fragment]
+@lilypond[relative=2,verbatim,fragment]
 < \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
   \context Staff = SB { c4 \bar "|:"  d4 } >
 @end lilypond
@@ -2125,11 +2213,12 @@ style.
 @end lilypond
 
 Tremolo beams are @internalsref{Beam} grobs. Single stem tremolos are
-@internalsref{StemTremolo}.
+@internalsref{StemTremolo}. The single stem tremolo @emph{must} be
+entered without @code{@{} and @code{@}}.  
 
 @refbugs
 
-Tremolo beams confuse the spacing engine.
+Only powers of two and undotted notes are supported repeat counts.
 
 @node Tremolo subdivisions
 @subsection Tremolo subdivisions
@@ -2790,7 +2879,7 @@ the standard staff.
   \score{
     \context StaffGroup <
       \context Staff <
-        % Hide fingering number (used for string number) for the "normal" staff
+        % Hide fingering number
         \property Staff.Fingering \override #'transparent = ##t
 
         \part
@@ -3182,12 +3271,12 @@ a tone.  The first version will print sharps and the second version
 will print flats.
 
 @lilypond[singleline, verbatim]
-mus =\notes { \key e \major c d e f }
+mus =\notes { \key d \major cis d fis g }
 \score { \notes \context Staff {
   \clef "F" \mus
   \clef "G"
-  \transpose des'' \mus
-  \transpose cis'' \mus
+  \transpose g'' \mus
+  \transpose f'' \mus
 }}
 @end lilypond
 
@@ -3796,16 +3885,36 @@ the syntax and semantics are up for rewrite.
 @node Font selection
 @subsection Font selection
 
-Most graphics in LilyPond are composed of characters of fonts.  You can
-alter the characteristics of the font by setting certain grob
-properties. The mechanism that is used for this resembles La@TeX{}'s New
-Font Selection Scheme. Within this scheme, a font is entirely
-characterized by its font name.
-
-For each grob that uses fonts (in other words, each grob that supports
-@code{font-interface}) a font-name must be selected before it can be
-printed.  The font name is selected by looking at a number of grob
-properties:
+The most common thing to change about the appearance of fonts is
+their size. The font size of a @internalsref{Voice},
+@internalsref{Staff} or @internalsref{Thread} context, can be easily
+changed by setting the @code{fontSize} property for that context:
+@lilypond[fragment,relative=1]
+  c4 c4 \property Voice.fontSize = #-1
+  f4 g4
+@end lilypond
+ This command will not change the size of variable symbols, such as
+beams or slurs.  You can use this command to get smaller symbol for
+cue notes, but that involves some more subtleties. An elaborate
+example of those is in @file{input/test/cue-notes.ly}.
+
+@cindex cue notes
+@cindex font size
+@cindex size
+
+The font used for printing a grob can be selected by setting
+@code{font-name}, e.g.
+@example
+  \property Staff.TimeSignature
+    \set #'font-name = #"cmr17"
+@end example
+You may use any font which is available to @TeX{}, such as foreign
+fonts or fonts that do not belong to the Computer Modern font family.
+Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
+can also be adjusted with a more fine-grained mechanism.  By setting
+the grob properties described below, you can select a different font.
+All three mechanisms work for every grob that supports
+@code{font-interface}.
 
 @table @code
 @item font-family
@@ -3813,8 +3922,8 @@ properties:
 @code{roman} (Computer Modern), @code{braces} (for piano staff
 braces), @code{music} (the standard music font), @code{ancient} (the
 ancient notation font) @code{dynamic} (font for dynamic signs) and
-@code{typewriter}
-
+@code{typewriter}
+  
 @item font-shape
   A symbol indicating the shape of the font, there are typically several
   font shapes available for each font family. Choices are @code{italic},
@@ -3836,38 +3945,29 @@ A number indicating  the design size of the font.
 This is a feature of the Computer Modern Font: each point size has a
 slightly different design. Smaller design sizes are relatively wider,
 which enhances readability.
-
-@item font-name
-  The name of the font, as a string, e.g. @code{"cmr12"}. This overrides
-all other font-qualifiers. 
-You may use this to use special fonts, which are not a part of the
-style sheet, or which have special encodings.
-
 @end table
 
-
-The font is selected by taking the first font that satisfies all
-qualifiers specified. You can override any of these fields through
-@code{\override} and @code{\revert}. The special value @code{*} matches
-any value for that qualifier.  The value @code{*} is needed to
-override default settings which are always present. 
-
+For any of these properties, the value @code{*} (i.e. the @emph{symbol},
+@code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
+to override default setting, which are always present. For example:
 @example
-  \property Lyrics.LyricText \override #'font-series = #'bold
-  \property Lyrics.LyricText \override #'font-shape = #'*
+  \property Lyrics . LyricText \override #'font-series = #'bold
+  \property Lyrics . LyricText \override #'font-family = #'typewriter
+  \property Lyrics . LyricText \override #'font-shape = #'*
 @end example
 
 @cindex @code{font-style}
 
-There are also pre-cooked font selection qualifiers. These are selected
-through the grob property @code{font-style}.  For example, the style
-@code{finger} selects family @code{number} and relative size @code{-3}.
-Styles available include @code{volta}, @code{finger}, @code{tuplet},
-@code{timesig}, @code{mmrest}, @code{script}, @code{large}, @code{Large}
-and @code{dynamic}.
+There are also pre-cooked font selection qualifiers. These are
+selected through the grob property @code{font-style}.  For example,
+the style @code{finger} selects family @code{number} and relative size
+@code{-3}.  Styles available include @code{volta}, @code{finger},
+@code{tuplet}, @code{timesig}, @code{mmrest}, @code{script},
+@code{large}, @code{Large} and @code{dynamic}. The style sheets and
+tables for selecting fonts are located in @file{scm/font.scm}. Refer
+to this file for more information.
 
-The style sheets and tables for selecting fonts are located in
-@file{scm/font.scm}. Refer to this file for more information.
+@cindex magnification
 
 The size of the font may be scaled with the grob property
 @code{font-magnification}.  For example, @code{2.0} blows up all
@@ -4008,7 +4108,7 @@ syntax and semantics are slated for a rewrite.
 @section Global layout
 
 The global layout determined by three factors: the page layout, the
-line breaks and the spacing. These all influence each other: The
+iline breaks and the spacing. These all influence each other: The
 choice of spacing determines how densely each system of music is set,
 whree line breaks breaks are chosen, and thus ultimately how many
 pages a piece of music takes. In this section we will explain how the
@@ -4023,14 +4123,65 @@ is processed by @TeX{}, page are filled with systems, and page breaks
 are chosen whenever the page gets full.
 
 @menu
-* Spacing::                     
+* Vertical spacing::            
+* Horizontal spacing::          
 * Font Size::                   
 * Line breaking::               
 * Page layout::                 
 @end menu
 
-@node Spacing
-@subsection Spacing
+
+@node Vertical spacing
+@subsection Vertical spacing
+
+@cindex vertical spacing
+@cindex distance between staffs
+@cindex staff distance
+@cindex between staves, distance
+
+The height of each system is determined automatically by lilypond, to
+keep systems from bumping into each other, some minimum distances are
+set.  By changing these, you can put staffs closer together, and thus
+put more  systems onto one page.
+
+Normally staves are stacked vertically. To make
+staves maintain a distance, their vertical size is padded. This is
+done with the property @code{minimumVerticalExtent}. It takes a pair
+of numbers, so if you want to make it smaller from its, then you could
+set
+@example
+  \property Staff.minimumVerticalExtent = #'(-4 . 4)
+@end example
+This sets the vertical size of the current staff to 4 staff-space on
+either side of the center staff line.  The argument of
+@code{minimumVerticalExtent} is interpreted as an interval, where the
+center line is the 0, so the first number is generally negative.  you
+could also make the staff larger at the bottom by setting it to
+@code{(-6 . 4)}. The default value is @code{(-6 . 6)}.
+
+Vertical aligment of staves is handled by the
+@internalsref{VerticalAlignment} grob, which lives at
+@internalsref{Score} level.
+
+The piano staffs are handled a little differently: to make cross-staff
+beaming work correctly, it necessary that the distance between staves
+is fixed.  This is also done with a @internalsref{VerticalAlignment}
+grob, created in @internalsref{PianoStaff}, but a forced distance is
+set. This is done with the grob property #'forced-distance. If you
+want to override this, use a @code{\translator} block as follows:
+@example
+  \translator @{
+    \PianoStaffContext
+    VerticalAlignment \override #'forced-distance = #9
+  @}
+@end example
+This would bring the staffs together at a distance of 9 staff spaces,
+and again this is measured from the center line of each staff.
+
+
+
+@node Horizontal spacing
+@subsection Horizontal Spacing
 
 The spacing engine translates differences in durations into
 stretchable distances (``springs'') of differing lengths. Longer
@@ -4140,17 +4291,18 @@ kneed stems.
 @cindex staff size, setting
 @cindex @code{paper} file
 
-The Feta font provides musical symbols at six different sizes.  These
-fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and 26
-point.  The point size of a font is the height of the five lines in a
-staff when displayed in the font.
+The Feta font provides musical symbols at seven different sizes.
+These fonts are 11 point, 13 point, 16 point, 19 pt, 20 point, 23
+point, and 26 point.  The point size of a font is the height of the
+five lines in a staff when displayed in the font.
 
 Definitions for these sizes are the files @file{paperSZ.ly}, where
-@code{SZ} is one of 11, 13, 16, 20, 23 and 26.  If you include any of
-these files, the identifiers @code{paperEleven}, @code{paperThirteen},
-@code{paperSixteen}, @code{paperTwenty}, @code{paperTwentythree}, and
-@code{paperTwentysix} are defined respectively.  The default
-@code{\paper} block is also set. These files should be imported at toplevel, i.e.
+@code{SZ} is one of 11, 13, 16, 19, 20, 23 and 26.  If you include any
+of these files, the identifiers @code{paperEleven},
+@code{paperThirteen}, @code{paperSixteen}, @code{paperNineteen},
+@code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
+are defined respectively.  The default @code{\paper} block is also
+set. These files should be imported at toplevel, i.e.
 @example
        \include "paper26.ly"
        \score @{  ... @}