]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/putting.itely
A whole bunch of minor fixes from mailist.
[lilypond.git] / Documentation / user / putting.itely
index de8a1a3cbcc39673669ae92e3153162fb647297b..d4af541acf33d37655a60c2594370f419ff07118 100644 (file)
@@ -34,7 +34,7 @@ problems:
 
 @itemize @bullet
 @item Include @code{\version} numbers in every file.  Note that all
-templates contain a @code{\version "2.6.0"} string.  We
+templates contain a @code{\version "2.7.32"} string.  We
 highly recommend that you always include the @code{\version}, no matter
 how small your file is.  Speaking from personal experience, it's
 quite frustrating to try to remember which version of LilyPond you were
@@ -47,7 +47,7 @@ it quicker.  How often is ``every so often''?  It depends on the complexity
 of the music.  For very simple music, perhaps just once or twice.  For
 very complex music, every bar.
 
-@item One bar per line.  If there is anything complicated, either in the music
+@item One bar per line of text.  If there is anything complicated, either in the music
 itself or in the output you desire, it's often good to write only one bar
 per line.  Saving screen space by cramming eight bars per line just isn't
 worth it if you have to `debug' your files.
@@ -64,6 +64,27 @@ in the number of @code{@{} and @code{@}}.
 
 @end itemize
 
+If you are entering music from an existing score (ie typesetting a
+piece of existing sheet music),
+
+@itemize @bullet
+
+@item Enter one manuscript (the physical copy) system at a time (but still
+only one bar per line of text), and
+check each system when you finish it.  You may use the
+@code{showLastLength} command to speed up processing -- see
+@ref{Skipping corrected music}.
+
+@item Define @code{mBreak = @{ \break @}} and insert @code{\mBreak}
+in the input file whenever the manuscript has a line break.  This
+makes it much easier to compare the LilyPond music to the original
+music.  When you are finished proofreading your score, you may
+define @code{mBreak = @{ @}} to remove all those line breaks.  This
+will allow LilyPond to place line breaks wherever it feels are
+best.
+
+@end itemize
+
 
 @node Extending the templates
 @section Extending the templates
@@ -78,7 +99,7 @@ cello.  In this case, we would start with ``Notes and lyrics'' (for the
 soprano part).
 
 @example
-\version "2.6.0"
+\version "2.7.39"
 melody = \relative c' @{
   \clef treble
   \key c \major
@@ -93,11 +114,11 @@ text = \lyricmode @{
 
 \score@{
   <<
-    \context Voice = one @{
+    \new Voice = "one" @{
       \autoBeamOff
       \melody
     @}
-    \lyricsto "one" \new Lyrics \text
+    \new Lyrics \lyricsto "one" \text
   >>
   \layout @{ @}
   \midi @{ \tempo 4=60 @}
@@ -107,7 +128,7 @@ text = \lyricmode @{
 Now we want to add a cello part.  Let's look at the ``Notes only'' example:
 
 @example
-\version "2.6.0"
+\version "2.7.39"
 melody = \relative c' @{
   \clef treble
   \key c \major
@@ -143,7 +164,7 @@ normally use bass clef.  We'll also give the cello some different
 notes.
 
 @example
-\version "2.6.0"
+\version "2.7.39"
 sopranoMusic = \relative c' @{
   \clef treble
   \key c \major
@@ -166,11 +187,11 @@ celloMusic = \relative c @{
 
 \score@{
   <<
-    \context Voice = one @{
+    \new Voice = "one" @{
       \autoBeamOff
       \sopranoMusic
     @}
-    \lyricsto "one" \new Lyrics \sopranoLyrics
+    \new Lyrics \lyricsto "one" \sopranoLyrics
   >>
   \layout @{ @}
   \midi @{ \tempo 4=60 @}
@@ -193,16 +214,16 @@ more than one thing (in this case staff) happening at once.  The
 
 @example
 \score@{
-<<
   <<
-    \context Voice = one @{
-      \autoBeamOff
-      \sopranoMusic
-    @}
-    \lyricsto "one" \new Lyrics \sopranoLyrics
+    <<
+      \new Voice = "one" @{
+        \autoBeamOff
+        \sopranoMusic
+      @}
+      \new Lyrics \lyricsto "one" \sopranoLyrics
+    >>
+    \new Staff \celloMusic
   >>
-  \new Staff \celloMusic
->>
   \layout @{ @}
   \midi @{ \tempo 4=60 @}
 @}
@@ -212,8 +233,8 @@ more than one thing (in this case staff) happening at once.  The
 This looks a bit messy; the indentation is messed up now.  That is
 easily fixed.  Here's the complete soprano and cello template.
 
-@lilypond[quote,verbatim,raggedright]
-\version "2.6.0"
+@lilypond[quote,verbatim,ragged-right]
+\version "2.7.39"
 sopranoMusic = \relative c' {
   \clef treble
   \key c \major
@@ -236,14 +257,14 @@ celloMusic = \relative c {
 
 \score{
   <<
-  <<
-    \context Voice = one {
-      \autoBeamOff
-      \sopranoMusic
-    }
-    \lyricsto "one" \new Lyrics \sopranoLyrics
-  >>
-  \new Staff \celloMusic
+    <<
+      \new Voice = "one" {
+        \autoBeamOff
+        \sopranoMusic
+      }
+      \new Lyrics \lyricsto "one" \sopranoLyrics
+    >>
+    \new Staff \celloMusic
   >>
   \layout { }
   \midi { \tempo 4=60 }
@@ -259,7 +280,7 @@ This may come as a surprise, but LilyPond isn't perfect.  Some notation
 elements can overlap.  This is unfortunate, but (in most cases) is easily
 solved.
 
-@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 e4^\markup{ \italic ritenuto } g b e
 @end lilypond
 
@@ -268,11 +289,11 @@ e4^\markup{ \italic ritenuto } g b e
 The easiest solution is to increase the distance between the object
 (in this case text, but it could easily be fingerings or dynamics
 instead) and the note.  In LilyPond, this is called the
-@code{padding} property.  For most objects, it is around 1.0 or
-less (it varies with each object).  We want to increase it, so let's
-try 1.5
+@code{padding} property; it is measured in staff spaces.  For most
+objects, this value is around 1.0 or less (it varies with each
+object). We want to increase it, so let's try 1.5
 
-@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \once \override TextScript #'padding = #1.5
 e4^\markup{ \italic ritenuto } g b e
 @end lilypond
@@ -292,7 +313,7 @@ cause other problems.  When we move objects with @code{extra-offset},
 the movement is done after LilyPond has placed all other objects.  This means
 that the result can overlap with other objects.
 
-@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \once \override TextScript #'extra-offset = #'( 1.0 . -1.0 )
 e4^\markup{ \italic ritenuto } g b e
 @end lilypond
@@ -302,7 +323,7 @@ movement (left is negative); the second number controls the vertial
 movement (up is positive).  After a bit of experimenting, we decided
 that these values look good
 
-@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
 \once \override TextScript #'extra-offset = #'( -1.6 . 1.0 )
 e4^\markup{ \italic ritenuto } g b e
 @end lilypond
@@ -349,7 +370,7 @@ Most examples also make use of the @code{\relative c'}
 compile the examples, but in most cases the output will
 look very odd if you omit the @code{\relative c'}.
 
-@lilypond[quote,fragment,raggedright,verbatim]
+@lilypond[quote,fragment,ragged-right,verbatim]
 \relative c'' {
   c4 a b c
 }
@@ -416,7 +437,8 @@ melody = \relative c' @{
 @end example
 
 When LilyPond looks at this file, it takes the value of
-@code{melody} and inserts it whenever it sees
+@code{melody} (everything after the equals sign) and
+inserts it whenever it sees
 @code{\melody}.  There's nothing special about the
 names -- it could be @code{melody}, @code{global},
 @code{pianorighthand}, or @code{foofoobarbaz}.  You
@@ -472,10 +494,10 @@ though.
 \score @{
   @{
     <<
-      \context Staff = singer @{
-      @}
-      \context PianoStaff = piano @{
-      @}
+      \new Staff = "singer" <<
+      >>
+      \new PianoStaff = piano <<
+      >>
     >>
   @}
   \layout @{ @}
@@ -490,14 +512,14 @@ the vocal part and piano part at the same time!
 \score @{
   @{
     <<
-      \context Staff = singer @{
-        \context Voice = vocal @{ @}
-        \lyricsto vocal \new Lyrics @{ @}
-      @}
-      \context PianoStaff = piano @{
-        \context Staff = upper @{ @}
-        \context Staff = lower @{ @}
-      @}
+      \new Staff = "singer" <<
+        \new Voice = "vocal" @{ @}
+      >>
+      \new Lyrics \lyricsto vocal \new Lyrics @{ @}
+      \new PianoStaff = "piano" <<
+        \new Staff = "upper" @{ @}
+        \new Staff = "lower" @{ @}
+      >>
     >>
   @}
   \layout @{ @}
@@ -513,7 +535,7 @@ it contains an upper staff (right hand) and a lower
 staff (left hand).
 
 At this stage, we could start filling in notes.  Inside
-the curly braces next to @code{\context Voice = vocal},
+the curly braces next to @code{\new Voice = vocal},
 we could start writing
 
 @example
@@ -535,14 +557,14 @@ lower = @{ @}
 \score @{
   @{
     <<
-      \context Staff = singer @{
-        \context Voice = vocal @{ \melody @}
-        \lyricsto vocal \new Lyrics @{ \text @}
-      @}
-      \context PianoStaff = piano @{
-        \context Staff = upper @{ \upper @}
-        \context Staff = lower @{ \lower @}
-      @}
+      \new Staff = "singer" <<
+        \new Voice = "vocal" @{ \melody @}
+      >>
+      \new Lyrics \lyricsto vocal \new Lyrics @{ \text @}
+      \new PianoStaff = "piano" <<
+        \new Staff = "upper" @{ \upper @}
+        \new Staff = "lower" @{ \lower @}
+      >>
     >>
   @}
   \layout @{ @}
@@ -550,7 +572,9 @@ lower = @{ @}
 @end example
 
 @noindent
-Remember that you can use any names you like.
+Remember that you can use almost any name you like.  The
+limitations on identifier names are detailed in
+@ref{File structure}.
 
 When writing a @code{\score} section, or when reading
 one, just take it slowly and carefully.  Start with
@@ -569,12 +593,13 @@ compile.  The messages that LilyPond gives may help
 you find the error, but in many cases you need to do some
 investigation to determine the source of the problem.
 
-The most powerful tool for this purpose is the
-comment (@code{%} and @code{%@{ ... %@}}).  If you don't
+The most powerful tools for this purpose are the
+single line comment (indicated by @code{%}) and the block
+comment (indicated by @code{%@{ ... %@}}).  If you don't
 know where a problem is, start commenting out huge portions
 of your input file.  After you comment out a section, try
 compiling the file again.  If it works, then the problem
-must exist in the portion you just commented.  If it doens't
+must exist in the portion you just commented.  If it doesn't
 work, then keep on commenting out material until you have
 something that works.