staves. Each part that should be on its own staff, is preceded with
@code{\new Staff}.
-@lilypond[quote,verbatim,relative=2,ragged-right,fragment]
+@lilypond[quote,verbatim,relative=2,ragged-right]
<<
\new Staff { c4 c }
\new Staff { d4 d }
example which removes @code{Time_signature_engraver} and
@code{Clef_engraver} from a @code{Staff} context,
-@lilypond[quote,relative=1,verbatim,fragment]
+@lilypond[quote,relative=1,verbatim]
<<
\new Staff {
f2 g
Suppose we want to move the fingering indication in the fragment
below:
-@lilypond[quote,fragment,relative=2,verbatim]
+@lilypond[quote,relative=2,verbatim]
c-2
\stemUp
f
Recall that we wanted to change the position of the @b{2} in
-@lilypond[quote,fragment,relative=2,verbatim]
+@lilypond[quote,relative=2,verbatim]
c-2
\stemUp
f
Inserting this command before the Fingering object is created,
i.e., before @code{c2}, yields the following result:
-@lilypond[quote,relative=2,fragment,verbatim]
+@lilypond[quote,relative=2,verbatim]
\once \override Voice.Fingering #'padding = #3
c-2
\stemUp
applies to the current staff. Other staves will keep their normal
appearance. Here we see the command in action:
-@lilypond[quote,verbatim,relative=2,fragment]
+@lilypond[quote,verbatim,relative=2]
c4
\override Staff.Stem #'thickness = #4.0
c4
causing the default context @code{Voice} to be used. Adding
@code{\once} applies the change during one timestep only.
-@lilypond[quote,fragment,verbatim,relative=2]
+@lilypond[quote,verbatim,relative=2]
c4
\once \override Stem #'thickness = #4.0
c4
or beams, the @code{\override} command must be executed at the moment
when the object is created. In this example,
-@lilypond[quote,fragment,verbatim,relative=2]
+@lilypond[quote,verbatim,relative=2]
\override Slur #'thickness = #3.0
c8[( c
\override Beam #'beam-thickness = #0.6
For example, multimeasure rests will be combined into a single bar
if the context property @code{skipBars} is set to @code{#t}:
-@lilypond[quote,verbatim,relative=2,fragment]
+@lilypond[quote,verbatim,relative=2]
R1*2
\set Score.skipBars = ##t
R1*2
set in the current bottom context (typically @code{ChordNames},
@code{Voice}, @code{TabVoice}, or @code{Lyrics}).
-@lilypond[quote,verbatim,relative=2,fragment]
+@lilypond[quote,verbatim,relative=2]
\set Score.autoBeaming = ##f
<<
{
@code{Voice}, will have no effect, because skipBars is a property of
the @code{Score} context.
-@lilypond[quote,verbatim,relative=2,fragment]
+@lilypond[quote,verbatim,relative=2]
R1*2
\set skipBars = ##t
R1*2
Properties that have been set in enclosing contexts will
not be altered by an unset in an enclosed context:
-@lilypond[quote,verbatim,relative=2,fragment]
+@lilypond[quote,verbatim,relative=2]
\set Score.autoBeaming = ##t
<<
{
Preceding a @code{\set} command by @code{\once} makes the
setting apply to only a single time-step:
-@lilypond[quote,verbatim,relative=2,fragment]
+@lilypond[quote,verbatim,relative=2]
c4
\once \set fontSize = #4.7
c4
overriding the @code{thickness} property of the @code{Stem}
object:
-@lilypond[quote, verbatim, relative=2, fragment]
+@lilypond[quote,verbatim,relative=2]
c4 c
\override Voice.Stem #'thickness = #3.0
c4 c
If no context is specified in an @code{\override}, the bottom
context is used:
-@lilypond[quote, verbatim, relative=2, fragment]
+@lilypond[quote,verbatim,relative=2]
{ \override Staff.Stem #'thickness = #3.0
<<
{
The effects of @code{\override} can be undone by @code{\revert}:
-@lilypond[quote, verbatim, relative=2, fragment]
+@lilypond[quote,verbatim,relative=2]
c4
\override Voice.Stem #'thickness = #3.0
c4 c
The effects of @code{\override} and @code{\revert} apply to all
grobs in the affected context from the current time forward:
-@lilypond[quote, verbatim, relative=2, fragment]
+@lilypond[quote,verbatim,relative=2]
{
<<
{
@code{\once} can be used with @code{\override}
to affect only the current time step:
-@lilypond[quote, verbatim, relative=2, fragment]
+@lilypond[quote,verbatim,relative=2]
{
<<
{
This is a markup that is evaluated to yield the stencil. It is used
to put @i{cresc.}, @i{tr} and other text on horizontal spanners.
-@lilypond[quote,ragged-right,fragment,relative=2,verbatim]
+@lilypond[quote,ragged-right,relative=2,verbatim]
\override TextSpanner #'(bound-details left text)
= \markup { \small \bold Slower }
c2\startTextSpan b c a\stopTextSpan
if @code{to-barline} is true and a bar line occurs before the next
note.
-@lilypond[verbatim,quote,ragged-right,relative=2,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=2]
\endSpanners
c2 \startTextSpan c2 c2
\endSpanners
@item @code{1 2 8 16}
@tab durations
@tab
-@lilypond[fragment,relative=2,notime]
+@lilypond[relative=2,notime]
\set Staff.autoBeaming = ##f
\override Staff.Clef #'break-visibility = #all-invisible
c1 c2 c8 c16
@item @code{c4. c4..}
@tab augmentation dots
@tab
-@lilypond[fragment,relative=2,notime]
+@lilypond[relative=2,notime]
\override Staff.Clef #'break-visibility = #all-invisible
c4. c4..
@end lilypond
@item @code{c d e f g a b }
@tab scale
@tab
-@lilypond[fragment,relative=1,notime]
+@lilypond[relative=1,notime]
c d e f g a b
@end lilypond
@item @code{fis bes}
@tab alteration
@tab
-@lilypond[fragment,relative=1,notime]
+@lilypond[relative=1,notime]
fis bes
@end lilypond
@item @code{\clef treble \clef bass }
@tab clefs
@tab
-@lilypond[fragment,notime]
+@lilypond[relative=1,notime]
\clef treble
s4_" "
\clef bass
@item @code{\time 3/4 \time 4/4 }
@tab time signature
@tab
-@lilypond[fragment]
+@lilypond[relative=1]
\override Staff.Clef #'stencil = #empty-stencil
\time 3/4
s4_" "
@item @code{r4 r8}
@tab rest
@tab
-@lilypond[relative=2,notime,fragment]
+@lilypond[relative=2,notime]
\override Staff.Clef #'break-visibility = #all-invisible
r4 r8
@end lilypond
@item @code{d ~ d}
@tab tie
@tab
-@lilypond[relative=2,notime,fragment]
+@lilypond[relative=2,notime]
\set Score.timing = ##f
\set Staff.autoBeaming = ##f
d ~ d
@item @code{\key es \major }
@tab key signature
@tab
-@lilypond[notime,fragment]
+@lilypond[notime,relative=1]
\clef treble
\key es \major
\hideNotes
@item @var{note}@code{'}
@tab raise octave
@tab
-@lilypond[relative=2,notime,fragment]
+@lilypond[relative=2,notime]
\set Score.timing = ##f
\set Staff.autoBeaming = ##f
a a'
@item @var{note}@code{,}
@tab lower octave
@tab
-@lilypond[relative=2,notime,fragment]
+@lilypond[relative=2,notime]
\set Score.timing = ##f
\set Staff.autoBeaming = ##f
c c,
@item @code{c( d e)}
@tab slur
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Score.timing = ##f
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\set Staff.autoBeaming = ##f
@item @code{c\( c( d) e\)}
@tab phrasing slur
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Score.timing = ##f
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\set Staff.autoBeaming = ##f
@item @code{a8[ b]}
@tab beam
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Score.timing = ##f
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\set Staff.autoBeaming = ##f
@item @code{<< \new Staff ... >>}
@tab more staves
@tab
-@lilypond[fragment]
+@lilypond[relative=1]
<< \new Staff {
\set Staff.implicitTimeSignatureVisibility = #all-invisible
c'1
@item @code{c-> c-.}
@tab articulations
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
c-> c-.
@end lilypond
@item @code{c2\mf c\sfz}
@tab dynamics
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
c2\mf c\sfz
@end lilypond
@item @code{a\< a a\!}
@tab crescendo
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Score.timing = ##f
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\set Staff.autoBeaming = ##f
@item @code{a\> a a\!}
@tab decrescendo
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Score.timing = ##f
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\set Staff.autoBeaming = ##f
@item @code{< >}
@tab chord
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
<c e>
@end lilypond
@item @code{\partial 8}
@tab pickup / upbeat
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\partial 8
f8 c2 d e
@end lilypond
@item @code{\times 2/3 @{f g a@}}
@tab triplets
@tab
-@lilypond[relative=1,fragment]
+@lilypond[relative=1]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\times 2/3 { f8 g a }
@end lilypond
@item @code{\grace}
@tab grace notes
@tab
-@lilypond[relative=2,fragment]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\context Voice { \grace b16 c4 }
@end lilypond
@item @code{\new Lyrics}
@tab printing lyrics
@tab
-@lilypond[fragment]
+@lilypond[relative=1]
\new Lyrics \lyricmode { twinkle }
@end lilypond
@item @code{twin -- kle}
@tab lyric hyphen
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
<<
{ g'1 g }
@item @code{\chordmode @{ c:dim f:maj7 @}}
@tab chords
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\chordmode { c:dim f:maj7 }
@end lilypond
@item @code{\context ChordNames}
@tab printing chord names
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\chords { c:dim f:maj7 }
@end lilypond
@item @code{<<@{e f@} \\ @{c d@}>>}
@tab polyphony
@tab
-@lilypond[fragment,relative=2]
+@lilypond[relative=2]
\set Staff.implicitTimeSignatureVisibility = #all-invisible
\context Staff <<{e f} \\ {c d}>>
@end lilypond
Seventh chords can be created:
-@lilypond[quote,ragged-right,fragment,verbatim,relative=1]
+@lilypond[quote,ragged-right,verbatim,relative=1]
\chordmode { c1:7 c:m7 c:maj7 c:dim7 c:aug7 }
@end lilypond
added. The largest possible value for the extent is 13. Any
larger value is interpreted as 13.
-@lilypond[quote,ragged-right,fragment,verbatim,relative=1]
+@lilypond[quote,ragged-right,verbatim,relative=1]
\chordmode {
c1:2 c:3 c:4 c:5
c1:6 c:7 c:8 c:9
unaltered 13, the 11 is removed from a @code{:13} chord (unless it
is added explicitly).
-@lilypond[quote,ragged-right,fragment,verbatim,relative=1]
+@lilypond[quote,ragged-right,verbatim,relative=1]
\chordmode {
c1:13 c:13.11 c:m13
}
step added to a chord is the minor or flatted seventh, rather than
the major seventh.
-@lilypond[quote,verbatim,fragment,relative=1]
+@lilypond[quote,verbatim,relative=1]
\chordmode {
c1:5.6 c:3.7.8 c:3.6.13
}
Added steps can be as high as desired.
-@lilypond[quote,verbatim,fragment,relative=1]
+@lilypond[quote,verbatim,relative=1]
\chordmode {
c4:5.15 c:5.20 c:5.25 c:5.30
}
sign to the number. To alter a step that is automatically included
as part of the basic chord structure, add it as an altered step.
-@lilypond[quote,verbatim,fragment,relative=1]
+@lilypond[quote,verbatim,relative=1]
\chordmode {
c1:7+ c:5+.3- c:3-.5-.7-
}
removed are separated by @code{.} following the
initial @code{^}.
-@lilypond[quote,verbatim,fragment,relative=1]
+@lilypond[quote,verbatim,relative=1]
\chordmode {
c1^3 c:7^5 c:9^3 c:9^3.5 c:13.11^3.7
}
chord. @code{sus} is equivalent to @code{^3}; @code{sus4} is
equivalent to @code{.4^3}.
-@lilypond[quote,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=1,verbatim]
\chordmode {
c1:sus c:sus2 c:sus4 c:5.4^3
}
chord) and added bass notes can be specified by appending
@code{/}@var{pitch} to the chord.
-@lilypond[quote,ragged-right,fragment,verbatim, relative=2]
+@lilypond[quote,ragged-right,verbatim,relative=2]
\chordmode {
c1 c/g c/f
}
A bass note that is part of the chord can be added, instead of
moved as part of an inversion, by using @code{/+}@var{pitch}.
-@lilypond[quote,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=1,verbatim]
\chordmode {
c1 c/g c/+g
}
simply produces the augmented chord, since @code{5+} is
interpreted last.
-@lilypond[quote,ragged-right,verbatim,fragment]
+@lilypond[quote,ragged-right,verbatim,relative=1]
\chordmode { c1:5.5-.5+ }
@end lilypond
note. The first inversion requires changing the root of
the chord.
-@lilypond[quote,ragged-right,verbatim,fragment]
+@lilypond[quote,ragged-right,verbatim,relative=1]
\chordmode {
c'1: c':/g e:6-3-^5 e:m6-^5
}
LilyPond has support for figured bass, also called thorough bass
or basso continuo:
-@lilypond[quote,ragged-right,verbatim,fragment]
+@lilypond[quote,ragged-right,verbatim,]
<<
\new Voice { \clef bass dis4 c d ais g fis}
\new FiguredBass {
In figure mode, a group of bass figures is delimited by
@code{<} and @code{>}. The duration is entered after the @code{>}.
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=1]
\new FiguredBass {
\figuremode {
<6 4>2
Accidentals (including naturals) can be added to figures:
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=1]
\figures {
<7! 6+ 4-> <5++> <3-->
}
Augmented and diminished steps can be indicated:
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=1]
\figures {
<6\+ 5/> <7/>
}
A backward slash through a figure (typically used for raised
sixth steps) can be created:
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=1]
\figures {
<6> <6\\>
}
Vertical spaces and brackets can be included in figures:
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=1]
\figures {
<[12 _!] 8 [6 4]>
}
Any text markup can be inserted as a figure:
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right,relative=1]
\figures {
<\markup { \tiny \number 6 \super (1) } 5>
}
Continuation lines can be used to indicate repeated figures:
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right]
<<
{
\clef bass
In this case, the extender lines replace existing figures,
unless the continuation lines have been explicitly terminated.
-@lilypond[verbatim,quote,ragged-right,fragment]
+@lilypond[verbatim,quote,ragged-right]
<<
\figures {
\bassFigureExtendersOn
When displayed in a @code{FiguredBass} context, the vertical location
of the figures is independent of the notes on the staff.
-@lilypond[verbatim,ragged-right,fragment,quote]
+@lilypond[verbatim,ragged-right,quote]
<<
\relative c'' {
c4 c'8 r8 c,4 c'
directly. In this case, the vertical position of the
figures is adjusted automatically.
-@lilypond[verbatim,ragged-right,fragment,quote]
+@lilypond[verbatim,ragged-right,quote]
<<
\new Staff = myStaff
\figuremode {
When added in a @code{Staff} context, figured bass can be displayed above
or below the staff.
-@lilypond[verbatim,ragged-right,fragment,quote]
+@lilypond[verbatim,ragged-right,quote]
<<
\new Staff = myStaff
\figuremode {
safest to use the same rhythm in the figure line as in
the bass line.
-@lilypond[verbatim,ragged-right,fragment,quote]
+@lilypond[verbatim,ragged-right,quote]
<<
{
\clef bass
When using extender lines, adjacent figures with the same number in
a different figure location can cause the figure positions to invert.
-@lilypond[verbatim,ragged-right,fragment,quote,relative=1]
+@lilypond[verbatim,ragged-right,quote]
<<
{ fis4 g g, e' }
\figures {
To avoid this problem, simply turn on extenders after the figure that
begins the extender line and turn them off at the end of the extender line.
-@lilypond[verbatim,ragged-right,fragment,quote,relative=1]
+@lilypond[verbatim,ragged-right,quote]
<<
{ fis4 g g, e' }
\figures {
@c due to crazy intervals of banjo music, absolute pitch is recommended
-@lilypond[quote,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=1,verbatim]
\new TabStaff <<
\set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
\set TabStaff.stringTunings = #banjo-open-g-tuning
it skips all events, including tempo and instrument changes. You have
been warned.
-@lilypond[quote,fragment,ragged-right,verbatim]
+@lilypond[quote,relative=1,ragged-right,verbatim]
\relative c'' {
c8 d
\set Score.skipTypesetting = ##t
However, the default @code{\drummode} does not include the
@code{Parenthesis_engraver} plugin which allows this.
-@lilypond[quote,ragged-right,verbatim,fragment]
+@lilypond[quote,ragged-right,verbatim,relative=1]
\new DrumStaff \with {
\consists "Parenthesis_engraver"
}
engraved in the octave below middle C.
@c don't use c' here.
-@lilypond[verbatim,quote,fragment]
-\clef bass
-c d e f
-g a b c
-d e f g
+@lilypond[verbatim,quote]
+{
+ \clef bass
+ c4 d e f
+ g4 a b c
+ d4 e f g
+}
@end lilypond
@cindex octave changing mark
pitch by one octave; each@tie{}@code{,} lowers the pitch by an
octave.
-@lilypond[verbatim,quote,fragment]
-\clef treble
-c' c'' e' g
-d'' d' d c
-\clef bass
-c, c,, e, g
-d,, d, d c
+@lilypond[verbatim,quote]
+{
+ \clef treble
+ c'4 c'' e' g
+ d''4 d' d c
+ \clef bass
+ c,4 c,, e, g
+ d,,4 d, d c
+}
@end lilypond
Line breaks can only occur if there is a @q{proper} bar line. A note
which is hanging over a bar line is not proper, such as
-@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=2,verbatim]
c4 c2 << c2 {s4 \break } >> % this does nothing
c2 c4 | % a break here would work
c4 c2 c4 ~ \break % as does this break
with the lower @code{outside-staff-priority} will be placed closer to
the staff.
-@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=2,verbatim]
c4_"Text"\pp
r2.
\once \override TextScript #'outside-staff-priority = #1
previously-positioned grobs can be controlled with
@code{outside-staff-padding}.
-@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=2,verbatim]
\once \override TextScript #'outside-staff-padding = #0
a'^"This text is placed very close to the note"
\once \override TextScript #'outside-staff-padding = #3
causes an object to be offset vertically so that such a situation
doesn't occur.
-@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=2,verbatim]
% the markup is too close to the following note
c4^"Text"
c4
8th notes; the eighth note is followed by 1 note head width (NHW).
The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
-@lilypond[quote,fragment,verbatim,relative=1]
+@lilypond[quote,verbatim,relative=1]
c2 c4. c8 c4. c8 c4. c8 c8
c8 c4 c4 c4
@end lilypond
the common shortest note. So if we were to add only a few 16th notes
to the example above, they would be followed by half a NHW:
-@lilypond[quote,fragment,verbatim,relative=2]
+@lilypond[quote,verbatim,relative=2]
c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
@end lilypond
In the following example, the time signature change introduces a new
section, and hence the 16ths notes are spaced wider.
-@lilypond[relative,fragment,verbatim,quote]
+@lilypond[relative=1,verbatim,quote]
\time 2/4
c4 c8 c
c8 c c4 c16[ c c8] c4
When @code{strict-note-spacing} is set, notes are spaced without
regard for clefs, bar lines, and grace notes,
-@lilypond[quote,ragged-right,relative=2,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=2,verbatim]
\override Score.SpacingSpanner #'strict-note-spacing = ##t
\new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c32] }
@end lilypond
@code{\addlyrics} sections:
-@lilypond[ragged-right,verbatim,fragment,quote]
+@lilypond[ragged-right,verbatim,relative=1,quote]
\time 3/4
\relative c' { c2 e4 g2. }
\addlyrics { play the game }
sure to have a font (like DejaVuLGC) installed that includes this
glyph.
-@lilypond[quote,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,relative=1,verbatim]
\time 3/4
\relative c' { c2 e4 g2 e4 }
\addlyrics { gran- de_a- mi- go }
To increase the spacing between lyrics, set the @code{minimum-distance}
property of @code{LyricSpace}.
-@lilypond[relative,verbatim,fragment,quote,ragged-right]
+@lilypond[relative=1,verbatim,quote,ragged-right]
{
c c c c
\override Lyrics.LyricSpace #'minimum-distance = #1.0
Stanza numbers can be added by setting @code{stanza}, e.g.,
-@lilypond[quote,ragged-right,verbatim,relative=2,fragment]
+@lilypond[quote,ragged-right,verbatim,relative=2]
\new Voice {
\time 3/4 g2 e4 a2 f4 g2.
} \addlyrics {
the line, just like instrument names. They are created by setting
@code{vocalName}. A short version may be entered as @code{shortVocalName}.
-@lilypond[fragment,ragged-right,quote,verbatim,relative=2]
+@lilypond[ragged-right,quote,verbatim,relative=2]
\new Voice {
\time 3/4 g2 e4 a2 f4 g2.
} \addlyrics {