]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/tutorial.itely
* input/test/time-signature-double.ly: new file
[lilypond.git] / Documentation / user / tutorial.itely
index cf84115ce163781f5240d53f3949606a227615b7..047f71dc60f0f7e0ec55b823d44093f19ffba283 100644 (file)
@@ -752,7 +752,10 @@ demonstrated here:
 
 In this example, @code{staffA} and @code{staffB} are names that are
 given to the staves.  It doesn't matter what names you give, as long
-as each staff has a different name.
+as each staff has a different name. If you give them the same name,
+LilyPond will assume that you only want one staff, and will but both
+pieces of music on the same staff.
+
 
 @separate
 
@@ -818,13 +821,6 @@ r4 <<c e g>>4 <<c f a>>8
 @end quotation
 @separate
 
-@ignore
-@c te diepzinnig?
-@c hmm, te losjes, iig
-In general, @code{ < @var{stuff} > } is used when @var{stuff} all
-happens at the same time, like in chords, or (like in the two-staff
-example above) in a bunch of stacked staves.
-@end ignore
 
 You can combine beams and ties with chords.  Beam and tie markings
 must be placed outside the chord markers:
@@ -834,11 +830,12 @@ r4 <<c e g>>8-[ <<c f a>>-]-~ <<c f a>>
 @end lilypond
 @end quotation
 
+@ignore
 When you want to combine chords with slurs and dynamics, technical
 detail crops up: you have type these commands next to the notes, which
 means that they have to be inside the @code{< >}.  Don't get confused
 by the chord @code{< >} and the dynamic @code{\< \>}!
-
+@end ignore
 
 @quotation
 @example
@@ -970,8 +967,6 @@ polyphonic music, and integrating text and music.
 
 
 
-
-
 @node Printing lyrics
 @section Printing lyrics
 @cindex lyrics
@@ -1096,6 +1091,8 @@ The complete file is listed here:
 @node A melody with chords 
 @section A melody with chords
 
+[TODO: show how to do fixed 4 measures to the line]
+
 In this section we show how to typeset a melody with chord
 accompaniment. This file is included as @file{input/tutorial/flowing.ly}.
 
@@ -1463,8 +1460,6 @@ The convention for naming @code{LyricsVoice} and @code{Voice} must
 also be used to get melismata on rests correct.
 
 
-@c    I think we need to change the name of this section, but that
-@c    would probably involve a lot of changes in other places too.
 @node More movements 
 @section More movements
 
@@ -1474,16 +1469,6 @@ you need to use @code{ly2dvi}, which comes with LilyPond.  @code{ly2dvi}
 creates the title, then calls @code{lilypond} to format the sheet music.
 In this section, we show you how to create titles like this:
 
-@c    Old version of the above paragraph.
-@c LilyPond only produces sheet music; it doesn't concern itself with
-@c producing titles.  Titles are produced using a simply wrapper program
-@c This is the jobs of a simple wrapper
-@c program called ly2dvi. @code{ly2dvi} calls LilyPond to do the
-@c sheet music formatting. Then it produces titles, and ties together all
-@c inputs into a single @file{dvi} file.  In this section, we show some of
-@c the options  for titling.  We will show how you can produce a file
-@c that looks like this:
-
 @center @strong{Two miniatures}
 @flushright
 Opus 1.
@@ -1572,7 +1557,7 @@ versions using old print-outs.
 @cindex tag line
 
 Many people find the default tagline (``Lily was here'') too droll.  
-If that is the case, you can change @code{tagline} to somethign else,
+If that is the case, you can change @code{tagline} to something else,
 as shown above.
 
 @separate
@@ -1726,16 +1711,14 @@ precisely one @code{Voice} context, so we give it a unique name
 
 @separate
 @example 
-<c4-\arpeggio g' c>
+<<c g' c>>4-\arpeggio
 @end example 
-The delimiters @code{<} and @code{>} are shorthands for
-@code{\simultaneous @{} and @code{@}}. The expression enclosed in
-@code{<} and @code{>} is a chord.
+The delimiters @code{<<} and @code{>>} enclose the pitches of a chord.
+@code{\arpeggio} typesets an arpeggio sign (a wavy vertical line)
+before the chord.
 
 @cindex arpeggio
 
-@code{\arpeggio} typesets an arpeggio sign (a wavy vertical line) before
-the chord.
 
 @separate
 @example 
@@ -1777,7 +1760,7 @@ these notes are indeed processed by precisely one context with
 @code{\context}.
 @separate
 @example 
-\voiceOne s4  g8. b,16 c8 r <e'8. g> <f16 a> 
+\voiceOne s4  g8. b,16 c8 r <<e' g>>8. <<f a>>16
 @end example
 
 The oboes should have stems up to keep them from interfering with
@@ -1785,7 +1768,7 @@ the staff-jumping bass figure.  To do that, we use @code{\voiceOne}.
 
 @separate
 @example 
-\grace <e8( g> < d4 )f> <c2 e> 
+\grace <<e g>>-( <<d f>>4-) <<c e>>2 
 @end example
 @cindex @code{\grace}
 @cindex ornaments
@@ -1806,7 +1789,7 @@ of music is multiplied by the fraction.  Triplets make notes occupy 2/3
 of their notated duration, so in this case the fraction is 2/3.
 @separate
 @example 
-@{ <d8 f> <e g> <f a> @} 
+@{ <<d f>>8 <<e g>> <<f a>> @} 
 @end example 
 The piece of music to be `tripletted' is sequential music containing
 three chords.
@@ -1847,7 +1830,7 @@ This ends the two-part section.
 @separate
 @example 
 \stemBoth
-\grace <c,8( e> <)b8. d8.-\trill> <c16 e> |  
+\grace <<c, e>>8-( <<b d>>8.-\trill <<c e>>16 |  
 @end example
 @cindex trill
 @cindex stemBoth
@@ -2169,13 +2152,14 @@ a collision with the slur.  This could be achieved with
 works.  We insert an empty text between the 5 and the note. The empty
 text pushes the fingering instruction away:
 @example
-  a^" "^#'(finger "5")
+  a-)^" "^\markup @{ \finger "5" @} 
 @end example
 
-Lilypond tries to put fingering instructions as close to the notes as
-possible.  To make sure that Lilypond doesn't do that, we disguise the
-fingering as text: @code{(finger "5")}.
-
+A fingering instruction, which would be entered as @code{^5}, is put
+as close to the notes as possible, closer than the space entered to 
+push away the 5. Hence, the 5 is entered as a normal text, formatting
+of fingering instructions.  
 @separate
 
 Normally one would specify all dynamics in the same voice, so that
@@ -2234,6 +2218,9 @@ these ties: whenever we need such a tie, we insert a notehead in a
 different voice, and blank the stem.  This is done in the following
 snippet of code.
 
+@cindex transparent objects
+@cindex removing objects
+@cindex invisible objects
 @example
 \property Voice.Stem \set #'transparent = ##t
 d'
@@ -2354,72 +2341,75 @@ for transposing instruments.
 @subsection The full score
 
 
-The second file, @file{input/tutorial/os-score.ly}, reads the definitions of the first
-(@file{input/tutorial/os-music.ly}), and defines the @code{\score} block for the full
-conductor's score.
-
+The second file, @file{input/tutorial/os-score.ly}, reads the
+definitions of the first (@file{input/tutorial/os-music.ly}), and
+defines the @code{\score} block for the full conductor's score.
 
 @example
-% os-score.ly
+\version "1.7.6"
+
 \include "os-music.ly"
 \include "paper13.ly"
 
 #(ly:set-point-and-click 'line-column)
-#(define text-flat '((font-relative-size . -2)
-         (music "accidentals--1")))
-
+textFlat = \markup @{\smaller \musicglyph #"accidentals--1"@}
 \score @{
   <
     \global
     \property Score.BarNumber \override #'padding = #3
     \context StaffGroup = woodwind <
       \context Staff = flauti <
-        \property Staff.midiInstrument = #"flute"
-        \property Staff.instrument = "2 Flauti"
-        \property Staff.instr = "Fl."
+       \property Staff.midiInstrument = #"flute"
+       \property Staff.instrument = "2 Flauti"
+       \property Staff.instr = "Fl."
         \Key
-        \context Voice=one @{ \voiceOne \flautoI @}
-        \context Voice=two @{ \voiceTwo \flautoII @}
+       \context Voice=one @{ \voiceOne \flautoI @}
+       \context Voice=two @{ \voiceTwo \flautoII @}
       >
     >
     \context StaffGroup = timpani <
       \context Staff = timpani <
-        \property Staff.midiInstrument = #"timpani"
-        \property Staff.instrument = #'(lines "Timpani" "(C-G)")
-        \property Staff.instr = #"Timp."
-        \clef bass
+       \property Staff.midiInstrument = #"timpani"
+       \property Staff.instrument = \markup @{ \column <<  "Timpani" "(C-G)" >> @}
+       \property Staff.instr = #"Timp."
+       \clef bass
         \Key
-        \timpani
+       \timpani
       >
     >
     \context StaffGroup = brass <
       \context Staff = trombe <
-        \property Staff.midiInstrument = #"trumpet"
-        \property Staff.instrument = #`(lines "2 Trombe" "(C)")
-        \property Staff.instr = #`(lines "Tbe." "(C)")
+       \property Staff.midiInstrument = #"trumpet"
+       \property Staff.instrument = \markup @{ \column << "2 Trombe" "(C)" >> @}
+       \property Staff.instr = \markup@{ \column << "Tbe." "(C)">> @}
         \Key
-        \context Voice=one \partcombine Voice
-          \context Thread=one \tromboI
-          \context Thread=two \tromboII
+       \context Voice=one \partcombine Voice
+         \context Thread=one \tromboI
+         \context Thread=two \tromboII
       >
       \context Staff = corni <
         \property Staff.midiInstrument = #"french horn"
-        \property Staff.instrument = #`(lines "Corno"
-          (columns "(E" ,text-flat ")"))
-        \property Staff.instr = #`(lines "Cor."
-          (columns "(E" ,text-flat ")"))
-        \property Staff.transposing = #3
-        \notes \key bes \major
-        \context Voice=one \corno
+       \property Staff.instrument
+       = \markup @{ \column << "Corno" @{ "(E"  \textFlat ")" @} >> @}
+       \property Staff.instr =
+       \markup @{ \column << "Cor." @{ "(E"  \textFlat ")" @} >> @}
+       \property Staff.transposing = #3
+       \notes \key bes \major
+       \context Voice=one \corno
       >
     >
   >
   \paper @{
     indent = 15 * \staffspace
-    linewidth = 55 * \staffspace
+    linewidth = 60 * \staffspace
     textheight = 90 * \staffspace
+    \translator@{
+      \VoiceContext
+      \consists "Multi_measure_rest_engraver"
+    @}
     \translator@{
       \HaraKiriStaffContext
+      \remove "Multi_measure_rest_engraver"
     @}
   @}
   \midi @{