The @code{EasyNotation} variable overrides a @internalsref{Score} context.
You probably will want to print it with magnification or a
large font size to make it more readable. To print with
-magnification, you must create a DVI file (with @file{ly2dvi}) and
+magnification, you must create a DVI file (with @file{lilypond}) and
then enlarge it with something like @file{dvips -x 2000 file.dvi}.
See the @code{dvips} documentation for more details. To print with a
larger font, see @ref{Font Size}.
@cindex ghostscript
If you view the result with Xdvi, then staff lines will show through
-the letters. Printing the PostScript file obtained with ly2dvi does
-produce the correct result.
+the letters. Printing the PostScript file obtained does produce the
+correct result.
@node Easier music entry
@menu
* Relative octaves::
+* Octave check::
* Bar check::
* Skipping corrected music::
* Automatic note splitting ::
want to use relative within transposed music, you must place an
additional @code{\relative} inside the @code{\transpose}.
+@node Octave check
+@subsection Octave check
+
+
+Octave checks make octave errors easier to correct.
+The syntax is
+@example
+ \octave @var{pitch}
+@end example
+
+This checks that @var{pitch} (without octave) yields @var{pitch} (with
+octave) in \relative mode. If not, a warning is printed, and the
+octave is corrected, for example, the first check is passed
+successfully. The second check fails with an error message. The
+octave is adjusted so the following notes are in the correct octave
+once again.
+@example
+ \relative c' @{
+ e
+ \octave a'
+ \octave b'
+ @}
+@end example
+
+
+The octave of a note following an octave check is determined with
+respect to the note preceding it. In the next fragment, the last note
+is a @code{a'}, above central C. Hence, the @code{\octave} check may
+be deleted without changing the meaning of the piece.
+
+@lilypond[verbatim,fragment]
+ \relative c' {
+ e
+ \octave b
+ a
+ }
+@end lilypond
+
+
@node Bar check
@subsection Bar check
@cindex adjusting staff symbol
@cindex StaffSymbol, using \property
-@cindex staff lines, setting number of
Notes, dynamic signs, etc. are grouped
with a set of horizontal lines, into a staff (plural `staves'). In our
system, these lines are drawn using a separate layout object called
staff symbol.
+
+@cindex staff lines, setting number of
+@cindex staff lines, setting thickness of
+@cindex thickness of staff lines, setting
+@cindex number of staff lines, setting
+
This object is created whenever a @internalsref{Staff} context is
created. The appearance of the staff symbol cannot be changed by
using @code{\override} or @code{\set}. At the moment that
Supported clef-names include:
@c Moved standard clefs to the top /MB
@table @code
+@cindex treble clef
+@cindex violin clef
@item treble, violin, G, G2
G clef on 2nd line
@item alto, C
+@cindex alto clef
C clef on 3rd line
@item tenor
- C clef on 4th line
+@cindex tenor clef
+ C clef on 4th line.
@item bass, F
+@cindex bass clef
F clef on 4th line
@item french
+@cindex french clef
G clef on 1st line, so-called French violin clef
@item soprano
+@cindex soprano clef
C clef on 1st line
@item mezzosoprano
+@cindex mezzosoprano clef
C clef on 2nd line
@item baritone
+@cindex baritone clef
C clef on 5th line
@item varbaritone
+@cindex varbaritone clef
F clef on 3rd line
@item subbass
+@cindex subbass clef
F clef on 5th line
@item percussion
percussion clef
transposed one octave down or up, respectively. Argument @var{clefname}
must be enclosed in quotes when it contains underscores or digits. For
example,
-@example
- \clef "G_8"
-@end example
+
+
+@cindex choral tenor clef
+@lilypond[verbatim,fragment,relative]
+ \clef "G_8" c4
+@end lilypond
This command is equivalent to setting @code{clefGlyph},
@code{clefPosition} (which controls the Y position of the clef),
@seealso
-@internalsref{OttavaBracket}.
+@internalsref{OttavaSpanner}.
@refbugs
@lilypond[verbatim]
\score { \notes \relative c'' {
#(set-time-signature 9 8 '(2 2 2 3))
- g8-[ g-] d-[ d-] g-[ g-] a8-[-( bes g-]-) |
+ g8[ g] d[ d] g[ g] a8[( bes g]) |
#(set-time-signature 5 8 '(3 2))
a4. g4
}
@c
@lilypond[fragment, verbatim]
< \context StaffGroup <
- \context Staff = up { e'4 d'
+ \new Staff { e'4 d'
\bar "||"
f' e' }
- \context Staff = down { \clef bass c4 g e g } >
-\context Staff = pedal { \clef bass c2 c2 } >
+ \new Staff { \clef bass c4 g e g } >
+\new Staff { \clef bass c2 c2 } >
@end lilypond
small, short-lived voices or for single chords:
@lilypond[verbatim,fragment]
-\context Voice = VA \relative c'' {
+\context Staff \relative c'' {
c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f' \\ d >
}
@end lilypond
@lilypond[singleline, verbatim]
\relative c''
-\context Staff < \context Voice = VA { \voiceOne cis2 b }
- \context Voice = VB { \voiceThree b4 ais ~ ais4 gis4 }
- \context Voice = VC { \voiceTwo fis4~ fis4 f ~ f } >
+\context Staff < \new Voice { \voiceOne cis2 b }
+ \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
+ \new Voice { \voiceTwo fis4~ fis4 f ~ f } >
@end lilypond
Normally, note heads with a different number of dots are not merged, but
\property Staff.NoteCollision \override
#'merge-differently-dotted = ##t
g8 g8
- } \\ { g8.-[ f16-] g8.-[ f16-] }
+ } \\ { g8.[ f16] g8.[ f16] }
>
@end lilypond
@lilypond[fragment,relative,verbatim]
\context Staff {
- r4 r8-[ g' a r8-] r8 g-[ | a-] r8
+ r4 r8[ g' a r8] r8 g[ | a] r8
}
@end lilypond
@lilypond[fragment,relative,verbatim]
\context Staff {
- f8-[ r16 f g a-]
- f8-[ r16 \property Voice.stemLeftBeamCount = #1 f g a-]
+ f8[ r16 f g a]
+ f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
}
@end lilypond
@cindex @code{stemRightBeamCount}
@lilypond[relative=1,verbatim,noindent]
- c16-[ c c c c c c c-]
+ c16[ c c c c c c c]
\property Voice.subdivideBeams = ##t
- c16-[ c c c c c c c-]
+ c16[ c c c c c c c]
\property Score.beatLength = #(ly:make-moment 1 8)
- c16-[ c c c c c c c-]
+ c16[ c c c c c c c]
@end lilypond
@cindex subdivideBeams
\property Voice.autoBeamSettings
\override #'(end * * * *) = #(ly:make-moment 3 8)
% rather show case where it goes wrong
- %\time 12/8 c'8 c c c16 c c c c c c-[ c c c-] c8-[ c-] c4
+ %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
\time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
@end lilypond
It is not possible to specify beaming parameters that act differently in
@example
\score @{
\notes \relative c'' <
- \context Staff = sa @{ cis4 d e2 @}
+ \new Staff @{ cis4 d e2 @}
\context GrandStaff <
\pianoAccidentals
- \context Staff = sb @{ cis4 d e2 @}
- \context Staff = sc @{ es2 c @}
+ \new Staff @{ cis4 d e2 @}
+ \new Staff @{ es2 c @}
>
- \context Staff = sd @{ es2 c @}
+ \new Staff @{ es2 c @}
>
@}
@end example
@lilypond[singleline]
\score {
\notes \relative c'' <
- \context Staff = sa { cis4 d e2 }
+ \new Staff { cis4 d e2 }
\context GrandStaff <
\pianoAccidentals
- \context Staff = sb { cis4 d e2 }
- \context Staff = sc { es2 c }
+ \new Staff { cis4 d e2 }
+ \new Staff { es2 c }
>
- \context Staff = sd { es2 c }
+ \new Staff { es2 c }
>
\paper {
\translator {
They are entered using parentheses:
@lilypond[fragment,verbatim,center]
- f'-( g'-)-( a'-) a'8-[ b'-(-] a'4 g'2 f'4-)
- <<c' e'>>2-( <<b d'>>2-)
+ f'( g')( a') a'8[ b'(] a'4 g'2 f'4)
+ <<c' e'>>2( <<b d'>>2)
@end lilypond
@lilypond[fragment,relative,verbatim]
\slurUp
\property Voice.Stem \set #'length = #5.5
- g'8-(g g4-)
+ g'8(g g4)
\property Voice.Slur \set #'attachment = #'(stem . stem)
- g8-( g g4-)
+ g8( g g4)
@end lilypond
If a slur would strike through a stem or beam, the slur will be moved
@lilypond[fragment,relative,verbatim]
\stemUp \slurUp
- d32-( d'4 d8..-)
+ d32( d'4 d8..)
\property Voice.Slur \set #'attachment = #'(stem . stem)
- d,32-( d'4 d8..-)
+ d,32( d'4 d8..)
@end lilypond
@refcommands
respectively:
@lilypond[fragment,verbatim,center,relative]
- \time 6/4 c'-\( d-( e-) f-( e-) d-\)
+ \time 6/4 c'\( d( e) f( e) d\)
@end lilypond
Typographically, the phrasing slur behaves almost exactly like a
@seealso
-@internalsref{TempoEvent}.
+@internalsref{MetronomeChangeEvent}.
\relative c' { c1
\property Voice.TextSpanner \set #'direction = #-1
\property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
- c2-\startTextSpan b c-\stopTextSpan a }
+ c2\startTextSpan b c\stopTextSpan a }
@end lilypond
@lilypond[singleline,verbatim]
\score { \notes \relative c'' {
- c4-\startGroup-\startGroup
- c4-\stopGroup
- c4-\startGroup
- c4-\stopGroup-\stopGroup
+ c4\startGroup\startGroup
+ c4\stopGroup
+ c4\startGroup
+ c4\stopGroup\stopGroup
}
\paper { \translator {
\StaffContext \consists "Horizontal_bracket_engraver"
@lilypondfile[notexidoc]{script-abbreviations.ly}
+The meanings of these shorthands can be changed: see
+@file{ly/script-init.ly} for examples.
+
+
The script is automatically placed, but if you need to force
directions, you can use @code{_} to force them down, or @code{^} to
put them up:
c''4^^ c''4_^
@end lilypond
+Other symbols can be added using the syntax
+@var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
+can be forced up or down using @code{^} and @code{_},
+eg.
+@lilypond[verbatim,fragment,relative 2]
+ c\fermata c^\fermata c_\fermata
+@end lilypond
-Other symbols can be added using the syntax
-@var{note}@code{-\}@var{name}, e.g. @code{c4-\fermata}. Again, they
-can be forced up or down using @code{^} and @code{_}:
@cindex accent
@cindex marcato
played with your thumb (used in cello music):
@lilypond[verbatim, singleline, fragment]
- <<a' a''-3>>8-(_\thumb-[ <<b' b''-3>>-)_\thumb
- <<c'' c'''-3>>-(_\thumb <<d'' d'''-3>>-)_\thumb-]
+ <<a' a''-3>>8(_\thumb[ <<b' b''-3>>)_\thumb
+ <<c'' c'''-3>>(_\thumb <<d'' d'''-3>>)_\thumb]
@end lilypond
Fingerings for chords can also be added to individual notes
<< c-1 e-2 g-3 b-5 >> 4
@end lilypond
-Setting @code{fingerHorizontalDirection} will put the fingerings next
-to the note head:
+Setting @code{fingeringOrientations} will put fingerings next
+to note heads:
@lilypond[verbatim,singleline,fragment,relative=1]
- \property Voice.fingerHorizontalDirection = #LEFT
- << c-1 es-2 g-4 bes-5 >> 4
- \property Voice.fingerHorizontalDirection = #RIGHT
- << c-1 es-2 g-4 bes-5 >> 4
+ \property Voice.fingeringOrientations = #'(left down)
+ <<c-1 es-2 g-4 bes-5 >> 4
+ \property Voice.fingeringOrientations = #'(up right down)
+ <<c-1 es-2 g-4 bes-5 >> 4
@end lilypond
@seealso
@cindex ornaments
@cindex grace notes
-Grace notes are ornaments that are written out, like accaciatura and
-appogiatura notes.
-@lilypond[relative=2,verbatim,fragment] c4 \grace c16 c4 \grace {
-[c16 d16] } c4
+Grace notes are ornaments that are written out. The most common ones
+are acciaccatura, which should be played as very short. It is denoted
+by a slurred small note with a slashed stem. The appoggiatura is a
+grace note that takes a fixed fraction of the main note, is and
+denoted as a slurred note in small print without a slash.
+They are entered with the commands @code{\acciaccatura} and
+@code{\appoggiatura}, as demonstrated in the following example:
+
+
+@cindex appoggiatura
+@cindex acciaccatura
+
+@lilypond[relative=2,verbatim,fragment]
+b4 \acciaccatura d8 c4 \appoggiatura e8 d4
+\acciaccatura { g16 f } e4
@end lilypond
-From the point of view of typesetting, their characteristic is that
-grace notes take up take up no logical time in a measure. Internally,
-timing for grace notes is done using a second time. Every point in
-musical time consists of two rational numbers: one denotes the logical
-time, one denotes the grace timing. The above example is shown here
-with timing tuples:
+Both are special forms of the @code{\grace} command. By prefixing this
+keyword to a music expression, a new one is formed, which will be
+printed in a smaller font and takes up no logical time in a measure.
+@lilypond[relative=2,verbatim,fragment]
+ c4 \grace c16 c4 \grace {
+ c16[ d16] } c2 c4
+@end lilypond
+Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
+@code{\grace} command does not start a slur.
-@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)"
+Internally, timing for grace notes is done using a second, `grace'
+time. Every point in time consists of two rational numbers: one
+denotes the logical time, one denotes the grace timing. The above
+example is shown here with timing tuples:
+
+@lilypond[singleline]
+<
+ \relative c''{
+ c4 \grace c16 c4 \grace {
+ c16[ d16] } c4
}
-\paper { linewidth = 12.\cm }
-}
+ \new Lyrics \lyrics {
+ \markup { (0,0) } 4
+ \grace { \markup {
+ ( \fraction 1 4 , \fraction -1 16 ) } 16 }
+ \markup { (\fraction 1 4 , 0 ) } 4
+ \grace {
+ \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
+ \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
+ }
+ \markup { ( \fraction 2 4 , 0 ) }
+ } >
@end lilypond
every eighth grace note:
@lilypond[relative=2,verbatim,fragment]
-< \context Staff = SA { e4 \grace { c16-[ d e f-] } e4 }
- \context Staff = SB { c'4 \grace { g8-[ b-] } c4 } >
+< \new Staff { e4 \grace { c16[ d e f] } e4 }
+ \new Staff { c'4 \grace { g8[ b] } c4 } >
@end lilypond
-Unbeamed eighth notes and shorter by default have a slash through the
-stem. These notes are called accaciaturas, and should generally be
-played as short as possible. An appogiatura takes a fixed fraction of
-the main note, is and denoted without a slash.
-
-Such slashless notes are obtained by setting the object property
-@code{stroke-style} of the @internalsref{Stem} object. For proper
-matching of override and reverts of such properties, it is necessary
-to use a Scheme function.
-
-The following fragment overrides the default formatting Grace style stems:
-@example
- #(add-to-grace-init "Voice" 'Stem 'stroke-style '())
-@end example
-
-The @code{\override} is carefully matched with a @code{\revert}:
-
-@cindex slash
-@cindex grace slash
-
-@lilypond[fragment,verbatim]
-\relative c'' \context Voice {
- \grace c8 c4 \grace { c16-[ c16-] } c4
- \grace {
- \property Voice.Stem \override #'stroke-style = #'()
- c16
- \property Voice.Stem \revert #'stroke-style
- } c4
-}
-@end lilypond
If you want to end a note with a grace note, then the standard trick
is to put the grace notes before a phantom ``space note'', e.g.
@lilypond[fragment,verbatim, relative=2]
\context Voice {
< { d1^\trill ( }
- { s2 \grace { c16-[ d-] } } >
- )c4
+ { s2 \grace { c16[ d] } } >
+ c4)
}
@end lilypond
By adjusting the duration of the skip note (here it is a half-note),
the space between the main-note and the grace is adjusted.
-A @code{\grace} section has some default values, and LilyPond will
-use those default values unless you specify otherwise inside the
-@code{\grace} section. For example, if you specify \slurUp
-@emph{before} your @code{\grace} section, a slur which starts inside
-the @code{\grace} will not be forced up, even if the slur ends outside
-of the @code{\grace}. Note the difference between the first and
-second bars in this example:
-@lilypond[fragment,verbatim]
-\relative c'' \context Voice {
- \slurUp
- \grace {
- a4-( }
- ) a4 a4-( a2-)
- \slurBoth
-
- \grace {
- \slurUp
- a4-( }
- ) a4 a4-( a2-)
- \slurBoth
+A @code{\grace} section will introduce special typesetting settings,
+for example, to produce smaller type, and set directions. Hence, when
+introducing layout tweaks, they should be inside the grace section,
+for example,
+@lilypond[fragment,verbatim,relative 2]
+\new Voice {
+ \acciaccatura {
+ \property Voice.Stem \override #'direction = #-1
+ f16->
+ \property Voice.Stem \revert #'direction
+ }
+ g4
}
@end lilypond
+The overrides should also be reverted inside the grace section.
+
+If the layout of grace sections must be changed throughout the music,
+then this can be accomplished through the function
+@code{add-grace-property}. The following example
+undefines the Stem direction grace section, so stems do not always
+point up.
+
+@example
+ \new Staff @{
+ #(add-grace-property "Voice" Stem direction '())
+ @dots{}
+ @}
+@end example
+
+@noindent
+Another option is to change the variables @code{startGraceMusic},
+@code{stopGraceMusic}, @code{startAccacciaturaMusic},
+@code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
+@code{stopAppoggiaturaMstuic}. More information is in the file
+@file{ly/grace-init.ly}
@seealso
care when you mix staves with grace notes and staves without, for example,
@lilypond[relative=2,verbatim,fragment]
-< \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
- \context Staff = SB { c4 \bar "|:" d4 } >
+< \new Staff { e4 \bar "|:" \grace c16 d4 }
+ \new Staff { c4 \bar "|:" d4 } >
@end lilypond
Grace sections should only be used within sequential music
expressions. Nesting or juxtaposing grace sections is not supported,
and might produce crashes or other errors.
-Overriding settings for grace music globally cannot be done in a
-modular way. A kludge (@code{add-to-grace-init}) is defined in
-@file{ly/grace-init.ly}.
+Overriding settings cannot be done in separate styles for appoggiatura
+and acciaccatura.
@node Glissando
a note:
@lilypond[fragment,relative,verbatim]
- c'-\glissando c'
+ c'\glissando c'
@end lilypond
@seealso
Absolute dynamic marks are specified using an variable after a
-note: @code{c4-\ff}. The available dynamic marks are @code{\ppp},
+note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
@code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
@code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
@code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
@lilypond[verbatim,singleline,fragment,relative]
- c'-\ppp c-\pp c -\p c-\mp c-\mf c-\f c-\ff c-\fff
- c2-\sf c-\rfz
+ c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
+ c2\sf c\rfz
@end lilypond
@cindex @code{\cr}
use spacer notes if multiple marks during one note are needed:
@lilypond[fragment,verbatim,center,quote]
- c''-\< c''-\! d''-\decr e''-\rced
- < f''1 { s4 s4-\< s4-\! \> s4-\! } >
+ c''\< c''\! d''\decr e''\rced
+ < f''1 { s4 s4\< s4\! \> s4\! } >
@end lilypond
This may give rise to very short hairpins. Use @code{minimum-length}
-in @internalsref{Voice}.@internalsref{HairPin} to lengthen them, for
+in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
example:
@example
\context Voice {
\property Voice.crescendoText = \markup { \italic "cresc. poco" }
\property Voice.crescendoSpanner = #'dashed-line
- a'2-\mf-\< a a a-\!
+ a'2\mf\< a a a\!
}
@end lilypond
\score {
\apply #(drums->paper 'drums) \context Staff <
\clef percussion
- \context Voice = up { \voiceOne \up }
- \context Voice = down { \voiceTwo \down }
+ \new Voice { \voiceOne \up }
+ \new Voice { \voiceTwo \down }
>
}
\score {
\apply #(drums->paper 'mydrums) \context Staff <
\clef percussion
- \context Voice = up { \voiceOne \up }
- \context Voice = down { \voiceTwo \down }
+ \new Voice { \voiceOne \up }
+ \new Voice { \voiceTwo \down }
>
}
@end lilypond
bass = \notes \transpose c c,, { a4. e8 r e g e }
\score {
<
- \apply #(drums->paper 'drums) \context Staff = drums <
+ \apply #(drums->paper 'drums) \new Staff <
\clef percussion
- \context Voice = up { \voiceOne \up }
- \context Voice = down { \voiceTwo \down }
+ \new Voice { \voiceOne \up }
+ \new Voice { \voiceTwo \down }
>
- \context Staff = bass { \clef "F_8" \bass }
+ \new Staff { \clef "F_8" \bass }
>
}
@end lilypond
included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
Dynamics are not centered, but kludges do exist. See
-@inputfileref{input/templates,piano-dynamics.ly}.
+@inputfileref{input/template,piano-dynamics.ly}.
@cindex cross staff stem
@cindex stem, cross staff
staff. The syntax for this is
@example
\autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
-@end example
+@end example
+The two staffs of the piano staff must be named @code{up} and
+@code{down}.
+
The autochanger switches on basis of pitch (central C is the turning
point), and it looks ahead skipping over rests to switch in
advance. Here is a practical example:
note or chord:
@lilypond[fragment,verbatim]
- c'4-\sustainDown c'4-\sustainUp
+ c'4\sustainDown c'4\sustainUp
@end lilypond
What is printed can be modified by setting @code{pedal@var{X}Strings},
@lilypond[fragment,verbatim]
\property Staff.pedalSustainStyle = #'bracket
- c''4-\sustainDown d''4 e''4
- a'4-\sustainUp-\sustainDown
- f'4 g'4 a'4-\sustainUp
+ c''4\sustainDown d''4 e''4
+ a'4\sustainUp\sustainDown
+ f'4 g'4 a'4\sustainUp
@end lilypond
A third style of pedal notation is a mixture of text and brackets,
@lilypond[fragment,verbatim]
\property Staff.pedalSustainStyle = #'mixed
-c''4-\sustainDown d''4 e''4
-c'4-\sustainUp-\sustainDown
- f'4 g'4 a'4-\sustainUp
+c''4\sustainDown d''4 e''4
+c'4\sustainUp\sustainDown
+ f'4 g'4 a'4\sustainUp
@end lilypond
The default `*Ped' style for sustain and damper pedals corresponds to
for a sostenuto pedal:
@lilypond[fragment,verbatim]
-c''4-\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4-\sostenutoUp
+c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
@end lilypond
For fine-tuning of the appearance of a pedal bracket, the properties
@lilypond[fragment,verbatim]
\property Staff.PianoPedalBracket \override
#'shorten-pair = #'(0 . -1.0)
-c''4-\sostenutoDown d''4 e''4 c'4
-f'4 g'4 a'4-\sostenutoUp
+c''4\sostenutoDown d''4 e''4 c'4
+f'4 g'4 a'4\sostenutoUp
@end lilypond
@node Arpeggio
@lilypond[fragment,relative,verbatim]
- <<c e g c>>-\arpeggio
+ <<c e g c>>\arpeggio
@end lilypond
When an arpeggio crosses staves, you attach an arpeggio to the chords
@lilypond[fragment,relative,verbatim]
\context PianoStaff <
\property PianoStaff.connectArpeggios = ##t
- \context Voice = one { <<c' e g c>>-\arpeggio }
- \context Voice = other { \clef bass <<c,, e g>>-\arpeggio }
+ \new Staff { <<c' e g c>>\arpeggio }
+ \new Staff { \clef bass <<c,, e g>>\arpeggio }
>
@end lilypond
@lilypond[fragment,relative,verbatim]
\context Voice {
\property Voice.Arpeggio \set #'arpeggio-direction = #1
- <<c e g c>>-\arpeggio
+ <<c e g c>>\arpeggio
\property Voice.Arpeggio \set #'arpeggio-direction = #-1
- <<c e g c>>-\arpeggio
+ <<c e g c>>\arpeggio
}
@end lilypond
@lilypond[fragment,relative,verbatim]
\property PianoStaff.Arpeggio \override
#'molecule-callback = \arpeggioBracket
- <<c' e g c>>-\arpeggio
+ <<c' e g c>>\arpeggio
@end lilypond
@refcommands
staves and lyrics first, e.g.
@example
\context ChoirStaff \notes <
- \context Lyrics = LA @{ s1 @}
- \context Staff = SA @{ s1 @}
- \context Lyrics = LB @{ s1 @}
- \context Staff = SB @{ s1 @}
+ \new Lyrics @{ s1 @}
+ \new Staff @{ s1 @}
+ \new Lyrics @{ s1 @}
+ \new Staff @{ s1 @}
>
@end example
and then combine the appropriate melodies and lyric lines:
@example
\addlyrics
- \context Staff = SA @emph{the music}
- \context Lyrics = LA @emph{the lyrics}
+ \new Staff @emph{the music}
+ \new Lyrics @emph{the lyrics}
@end example
putting both together, you would get
@example
\context ChoirStaff \notes <
- \context Lyrics = LA @dots{}
- \context Staff = SB @dots{}
+ \new Lyrics @dots{}
+ \new Staff @dots{}
\addlyrics @dots{}
>
@end example
@cindex choral score
A complete example of a SATB score setup is in the file
-@inputfileref{input/template,satb}.
+@inputfileref{input/template,satb.ly}.
@seealso
@internalsref{LyricCombineMusic}, @internalsref{Lyrics}, and
-@inputfileref{input/template,satb}.
+@inputfileref{input/template,satb.ly}.
@refbugs
Then set the @internalsref{LyricsVoice} contexts to names starting with
that identity followed by a dash. In the preceding example, the
@internalsref{Voice} identity is @code{duet}, so the identities of the
-@internalsref{LyricsVoices} are marked @code{duet-1} and @code{duet-2}:
+@internalsref{LyricsVoice}s are marked @code{duet-1} and @code{duet-2}:
@example
\context LyricsVoice = "duet-1" @{
Hi, my name is bert. @}
\score {
\context ChoirStaff {
<
- \context Staff = one { \upper }
- \context Staff = three { \lower }
+ \new Staff { \upper }
+ \new Staff { \lower }
>
}
\paper {
* Multi measure rests::
* Automatic part combining::
* Hiding staves::
+* Different editions from one source::
* Sound output for transposing instruments::
@end menu
Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
there is one at the top. To solve this, the
-@internalsref{padding} property of @internalsref{BarNumber} can be
+@code{padding} property of @internalsref{BarNumber} can be
used to position the number correctly.
@node Instrument names
names:
@lilypond[fragment,verbatim,singleline]
- \notes \context Staff = treble {
+ \notes {
\property Staff.instrument = \markup {
\column << "Clarinetti"
{ "in B"
\context Staff <
\context Voice=one \partcombine Voice
\context Thread=one \relative c'' {
- g a-( b-) r
+ g a( b) r
}
\context Thread=two \relative c'' {
g r4 r f
>
@end lilypond
-The part combiner is slated to be rewritten [TODO: explain why].
+The part combiner is rather buggy, and it will be replaced by a better
+mechanism in the near future.
@cindex @code{Thread_devnull_engraver}
@cindex @code{Voice_engraver}
@lilypond[verbatim]
\score {
\notes \relative c' <
- \context Staff = SA { e4 f g a \break c1 }
- \context Staff = SB { c4 d e f \break R1 }
+ \new Staff { e4 f g a \break c1 }
+ \new Staff { c4 d e f \break R1 }
>
\paper {
linewidth = 6.\cm
@end lilypond
+@node Different editions from one source
+@subsection Different editions from one source
+
+The @code{\\tag} command marks music expressions with a name. These
+tagged expressions can be filtered out later. With this mechanism it
+is possible to make different versions of the same music source.
+
+In the following example, we see two versions of a piece of music, one
+for the full score, and one with cue notes for the instrumental part:
+
+@example
+ c1
+ \relative c' <
+ \tag #'part <
+ R1 \\
+ @{
+ \property Voice.fontSize = #-1
+ c4_"cue" f2 g4 @}
+ >
+ \tag #'score R1
+ >
+ c1
+@end example
+
+The same can be applied to articulations, texts, etc.: they are
+made by prepending
+@example
+ -\tag #@var{your-tag}
+@end example
+to an articulation, for example,
+@example
+ c1-\tag #'part ^4
+@end example
+
+This defines a note with a conditional fingering indication.
+
+By applying the @code{remove-tag} function, tagged expressions can be
+filtered. For example,
+@example
+\simultaneous @{
+ @var{the music}
+ \apply #(remove-tag 'score) @var{the music}
+ \apply #(remove-tag 'part) @var{the music}
+@}
+@end example
+would yield
+
+@lilypondfile[notexidoc]{tag-filter.ly}
+
+The argument of the @code{\tag} command should be a symbol, or a list
+of symbols, for example,
+@example
+ \tag #'(original-part transposed-part) @dots{}
+@end example
+
+@seealso
+
+@inputfileref{input/regression,tag-filter.ly}
+
+
@node Sound output for transposing instruments
@subsection Sound output for transposing instruments
specific notation flavour without need for introducing any new
notational concept.
-@menu
-* Ancient note heads::
-* Ancient accidentals::
-* Ancient rests::
-* Ancient clefs::
-* Ancient flags::
-* Ancient time signatures::
-@end menu
Other aspects of ancient notation can not that easily be expressed as
in terms of just changing a style property of a graphical object.
ancient notation, see @ref{Custodes}, @ref{Divisiones},
@ref{Ligatures}, and @ref{Figured bass}.
+
@menu
+* Ancient note heads::
+* Ancient accidentals::
+* Ancient rests::
+* Ancient clefs::
+* Ancient flags::
+* Ancient time signatures::
* Custodes::
* Divisiones::
* Ligatures::
* Figured bass::
+* Vaticana style contexts::
@end menu
If this all is way too much of documentation for you, and you just
set up predefined style-specific voice and staff contexts, and
directly go ahead with the note entry.
-@menu
-* Vaticana style contexts::
-@end menu
-
@refbugs
Ligatures need special spacing that has not yet been implemented. As
\context VaticanaVoice {
\property Score.BarNumber \set #'transparent = ##t
\notes {
- \[ c'( c' \flexa a \] \[ a \flexa \deminutum g-) \] f \divisioMinima
- \[ f( \pes a c' c' \pes d'-) \] c' \divisioMinima \break
- \[ c'( c' \flexa a \] \[ a \flexa \deminutum g-) \] f \divisioMinima
+ \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
+ \[ f( \pes a c' c' \pes d') \] c' \divisioMinima \break
+ \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
}
}
\context Lyrics \lyrics {
@lilypondfile[notexidoc]{cluster.ly}
-By default, @internalsref{Cluster_engraver} is in the
+By default, @internalsref{Cluster_spanner_engraver} is in the
@internalsref{Voice} context. This allows putting ordinary notes and
clusters together in the same staff, even simultaneously. In such a
case no attempt is made to automatically avoid collisions between
@internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
@inputfileref{input/regression,cluster.ly},
-@internalsref{Cluster_engraver}, and @internalsref{ClusterNoteEvent}.
+@internalsref{Cluster_spanner_engraver}, and @internalsref{ClusterNoteEvent}.
@refbugs
Syntax errors for markup mode are confusing.
+Markup texts cannot be used in the titling of the @code{\header}
+field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
+for formatting.
+
half a NHW:
@lilypond[fragment, verbatim, relative=2]
- c2 c4. c8 c4. c16-[ c-] c4. c8 c8 c8 c4 c4 c4
+ c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
@end lilypond
The most common shortest duration is determined as follows: in every
The page layout process happens outside the LilyPond formatting
engine: variables controlling page layout are passed to the output,
-and are further interpreted by @code{ly2dvi}. @code{ly2dvi} responds
-to the following variables in the @code{\paper} block. The variable
-@code{textheight} sets the total height of the music on each page.
-The spacing between systems is controlled with @code{interscoreline},
-its default is 16pt. The distance between the score lines will
-stretch in order to fill the full page @code{interscorelinefill} is
-set to a positive number. In that case @code{interscoreline}
-specifies the minimum spacing.
+and are further interpreted by @code{lilypond} wrapper program. It
+responds to the following variables in the @code{\paper} block. The
+variable @code{textheight} sets the total height of the music on each
+page. The spacing between systems is controlled with
+@code{interscoreline}, its default is 16pt. The distance between the
+score lines will stretch in order to fill the full page
+@code{interscorelinefill} is set to a positive number. In that case
+@code{interscoreline} specifies the minimum spacing.
@cindex @code{textheight}
@cindex @code{interscoreline}
The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
will set the paper variables @code{hsize} and @code{vsize} (used by
-@code{lilypond} and @code{ly2dvi}).
+@code{lilypond-book} and @code{lilypond}).
@refcommands
@seealso
-@ref{Invoking ly2dvi},
+@ref{Invoking lilypond},
@inputfileref{input/regression,between-systems.ly}, and
@internalsref{NonMusicalPaperColumn}.
Assignments in the @code{\midi} block are not allowed.
+A number followed by a period is interpreted as a real number, so
+for setting the tempo for dotted notes, an extra space should be
+inserted, for example:
+
+@example
+ \midi @{ \tempo 4 . = 120 @}
+@end example
@cindex context definition