notags_files = []
# mark the section that will be printed verbatim by lilypond-book
-end_header_re = re.compile ('(\\header {.+?(?:"\\s*|\\s+)}\n)\n', re.M | re.S)
+end_header_re = re.compile ('(\\header {.+?doctitle = ".+?})\n', re.M | re.S)
def mark_verbatim_section (ly_code):
- return end_header_re.sub ('\\1% begin verbatim\n', ly_code, 1)
+ return end_header_re.sub ('\\1 % begin verbatim\n', ly_code, 1)
begin_header_re = re.compile ('\\header\\s*{', re.M)
\header {
lsrtags = "chords, ancient-notation, contexts-and-engravers"
- texidoc = "
+
+ texidoc = "
When writing a figured bass, here's a way to specify if you want your
figures to be placed above or below the bass notes, by defining the
@code{BassFigureAlignmentPositioning #'direction} property (exclusively
As you can see here, this property can be changed as many times as you
wish. Use @code{\\once \\override} if you don't want the tweak to apply
to the whole score.
-" }
-% begin verbatim
+
+"
+ doctitle = "Adding a figured bass above or below the notes"
+} % begin verbatim
bass = { \clef bass g4 b, c d e d8 c d2}
continuo = \figuremode {
< _ >4 < 6 >8
\header {
lsrtags = "pitches, staff-notation, vocal-music"
- texidoc = "
+
+ texidoc = "
Ambitus can be added per voice. In this case, the ambitus must be moved
manually to prevent collisions.
-" }
-% begin verbatim
+
+"
+ doctitle = "Adding ambitus per voice"
+} % begin verbatim
\new Staff <<
\new Voice \with {
\consists "Ambitus_engraver"
\header {
lsrtags = "staff-notation, contexts-and-engravers, breaks"
- texidoc = "
-When adding a new staff at a line break, LilyPond will unfortunately
-add some extra space at the end of the line before the break (to fit in
+
+ texidoc = "
+When adding a new staff at a line break, some extra space is
+unfortunately added at the end of the line before the break (to fit in
a key signature change, which will never be printed anyway). The
workaround is to add a setting of
@code{Staff.explicitKeySignatureVisibility} as is shown in the example.
-In version 2.10 and earlier, you have to do a similar setting for the
-time signatures, see the example.
+In versions 2.10 and earlier, a similar setting for the time signatures
+is also required (see the example).
+
-" }
-% begin verbatim
+"
+ doctitle = "Adding an extra staff at a line break"
+} % begin verbatim
\score {
- \new StaffGroup \relative c''{
+ \new StaffGroup \relative c'' {
\new Staff
\key f \major
c1 c^"Unwanted extra space" \break
\header {
lsrtags = "staff-notation, contexts-and-engravers"
- texidoc = "
-You can add (possibly temporarily) an extra staff after the beginning
-of a piece.
-" }
-% begin verbatim
+
+ texidoc = "
+An extra staff can be added (possibly temporarily) after the start of a
+piece.
+
+"
+ doctitle = "Adding an extra staff"
+} % begin verbatim
\score {
<<
\new Staff \relative c'' { c1 c c c c }
\header {
lsrtags = "rhythms, expressive-marks"
- texidoc = "
+
+ texidoc = "
LilyPond syntax can involve many unusual placements for parentheses,
brackets etc., which might sometimes have to be interleaved. For
example, when entering a manual beam, the left square bracket has to be
inside a tuplet section. This snippet demonstrates how to combine
manual beaming, manual slurs, ties and phrasing slurs with tuplet
sections (enclosed within curly braces).
-" }
-% begin verbatim
+
+"
+ doctitle = "Adding beams, slurs, ties etc. when using tuplet and non-tuplet rythms."
+} % begin verbatim
{
r16[ g16 \times 2/3 { r16 e'8] }
g16( a \times 2/3 { b d e') }
\header {
lsrtags = "rhythms, percussion"
- texidoc = "
-LilyPond makes drums input quite easy, with powerful pre-configured
-tools such as the @code{\\drummode} function and the @code{DrumStaff}
-context: drums are placed at their own staff positions (with a special
-clef symbol) and have note heads according to the drum. You can easily
-attach an extra symbol to the drum, and restrict the number of lines.
-" }
-% begin verbatim
+
+ texidoc = "
+Using the powerful pre-configured tools such as the @code{\\drummode}
+function and the @code{DrumStaff} context, inputting drum parts is
+quite easy: drums are placed at their own staff positions (with a
+special clef symbol) and have note heads according to the drum.
+Attaching an extra symbol to the drum or restricting the number of
+lines is possible.
+
+"
+ doctitle = "Adding drum parts"
+} % begin verbatim
drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh hhc8 hho hhc8 hh16 hh hhc4 r4 r2 }
drl = \drummode { bd4 sn8 bd bd4 << bd ss >> bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
timb = \drummode { timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb }
\header {
lsrtags = "guitar"
- texidoc = "
+
+ texidoc = "
To add fingerings to tablatures, you can use a combination of
@code{\\markup} and @code{\\finger}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Adding fingerings to tablatures"
+} % begin verbatim
one = \markup { \finger "1" }
two = \markup { \finger "2" }
threeTwo = \markup { \column { \finger "3" \finger "2" } }
\header {
lsrtags = "expressive-marks"
- texidoc = "
+
+ texidoc = "
The @code{\\parenthesize} function is a special tweak that encloses
objects in parentheses. The associated grob is
@code{Score.ParenthesesItem}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Adding parentheses around an expressive mark or chordal note"
+} % begin verbatim
\relative {
c2-\parenthesize ->
\override ParenthesesItem #'padding = #0.1
\header {
lsrtags = "titles"
- texidoc = "
+
+ texidoc = "
I often find it useful to include a date on printed music, so that I
can see if I'm using the latest version, or tell someone else that he
should only use the version after a certain date. A simple solution is
solution, you can format the date just as you like it by adapting the
@code{\"%d-%m-%Y\"} string. See the Guile documentation for more
details on this format string: Formatting Calendar Time.
-" }
-% begin verbatim
+
+"
+ doctitle = "Adding the current date to a score"
+} % begin verbatim
\version "2.11.38"
% first, define a variable to hold the formatted date:
date = #(strftime "%d-%m-%Y" (localtime (current-time)))
\header {
lsrtags = "repeats"
- texidoc = "
+
+ texidoc = "
The @code{Volta_engraver} by default resides in the @code{Score}
context, and brackets for the repeat are thus normally only printed
over the topmost staff. This can be adjusted by adding the
-@code{Volta_engraver} to the @code{Staff} context where you want the
-brackets to appear; see also the \"Volta multi staff\" snippet.
-" }
-% begin verbatim
+@code{Volta_engraver} to the @code{Staff} context where the brackets
+should appear; see also the \"Volta multi staff\" snippet.
+
+"
+ doctitle = "Adding volta brackets to additional staves"
+} % begin verbatim
<<
\new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
\new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
\header {
lsrtags = "text, vocal-music, spacing"
- texidoc = "
+
+ texidoc = "
This snippet shows you how to bring the lyrics line closer to the
staff.
-" }
-% begin verbatim
+
+"
+ doctitle = "Adjusting lyrics vertical spacing"
+} % begin verbatim
% Default layout:
<<
\new Staff \new Voice = melody \relative c '{ c4 d e f g f e d c1 }
\header {
lsrtags = "text, paper-and-layout, titles"
- texidoc = "
+
+ texidoc = "
Instrument names are generally printed at the left side of the staves.
To align the names of several different intruments, you can put them in
a @code{\\markup} block and use one of the following possibilites:
with an @code{\\hspace #n} object.
-" }
-% begin verbatim
+
+"
+ doctitle = "Aligning and centering instrument names"
+} % begin verbatim
\paper {
indent = #0
left-margin = #30
\header {
lsrtags = "text, vocal-music"
- texidoc = "
+
+ texidoc = "
You can specify different horizontal alignment for your lyrics, by
overriding the @code{self-alignment-X} property of the @code{LyricText}
object. @code{#-1} is left, @code{#0} is center and @code{#1} is right;
however, you can use @code{#LEFT}, @code{#CENTER} and @code{#RIGHT} as
well.
-" }
-% begin verbatim
+
+"
+ doctitle = "Aligning lyrics"
+} % begin verbatim
\relative c'' {
c1 c c
}
\header {
lsrtags = "text"
- texidoc = "
+
+ texidoc = "
If specified, text marks may be aligned with notation objects other
than bar lines. These objects include @code{ambitus},
@code{breathing-sign}, @code{clef}, @code{custos}, @code{staff-bar},
be done for all the staves).
-" }
-% begin verbatim
+
+"
+ doctitle = "Aligning marks with various notation objects"
+} % begin verbatim
\relative c' {
e1
\header {
lsrtags = "tweaks-and-overrides, paper-and-layout, spacing"
- texidoc = "
+
+ texidoc = "
By setting properties in @code{NonMusicalPaperColumn}, vertical spacing
of alignments can be adjusted per system.
For technical reasons, @code{\\overrideProperty} has to be used for
setting properties on individual objects. @code{\\override} in a
@code{\\context} block may still be used for global overrides.
-" }
-% begin verbatim
+
+"
+ doctitle = "Alignment vertical spacing"
+} % begin verbatim
#(set-global-staff-size 13)
\relative c''
\header {
lsrtags = "editorial-and-educational-use, spacing"
- texidoc = "
+
+ texidoc = "
By default, fingering numbers will be printed outside the staff.
However, this behavior can be canceled.
-" }
-% begin verbatim
+
+"
+ doctitle = "Allowing fingerings to be printed inside the staff"
+} % begin verbatim
\relative c' {
<c-1 e-2 g-3 b-5>2
\once \override Fingering #'staff-padding = #'()
\header {
lsrtags = "rhythms, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
You can alter the number of stems in a beam. In this example, two sets
of four 32nds are joined, as if they were 8th notes.
-" }
-% begin verbatim
+
+"
+ doctitle = "Altering the number of stems in a beam"
+} % begin verbatim
\relative {
#(override-auto-beam-setting '(end * * * *) 1 4)
f32 g a b b a g f
\header {
lsrtags = "pitches, vocal-music"
- texidoc = "
-If you have multiple voices in a single staff and you want a single
-ambitus per staff rather than per voice, add the
-@code{Ambitus_engraver} to the @code{Staff} context rather than to the
-@code{Voice} context.
-" }
-% begin verbatim
+
+ texidoc = "
+Adding the @code{Ambitus_engraver} to the @code{Staff} context create a
+single ambitus per staff, even in the case of staves with multiple
+voices.
+
+"
+ doctitle = "Ambitus with multiple voices"
+} % begin verbatim
\new Staff \with {
\consists "Ambitus_engraver"
}
\header {
lsrtags = "ancient-notation"
- texidoc = "
+
+ texidoc = "
Here are shown many (all?) of the symbols that are included in
LilyPond's support of ancient notation.
-" }
-% begin verbatim
+
+"
+ doctitle = "Ancient fonts"
+} % begin verbatim
upperStaff = \context GregorianStaff = "upperStaff" <<
\context GregorianVoice <<
\set Score.timing = ##f
\header {
lsrtags = "ancient-notation, template"
- texidoc = "
+
+ texidoc = "
This example demonstrates how to do modern transcription of Gregorian
music. Gregorian music has no measure, no stems; it uses only half and
quarter noteheads, and special marks, indicating rests of different
length.
-" }
-% begin verbatim
+
+"
+ doctitle = "Ancient notation template -- modern transcription of gregorian music"
+} % begin verbatim
\include "gregorian-init.ly"
chant = \relative c' {
\header {
lsrtags = "ancient-notation, template"
- texidoc = "
+
+ texidoc = "
When transcribing mensural music, an incipit at the beginning of the
piece is useful to indicate the original key and tempo. While today
musicians are used to bar lines in order to faster recognize rhythmic
music; in fact, the meter often changed after every few notes. As a
compromise, bar lines are often printed between the staves rather than
on the staves.
-" }
-% begin verbatim
+
+"
+ doctitle = "Ancient notation template -- modern transcription of mensural music"
+} % begin verbatim
global = {
\set Score.skipBars = ##t
\header {
lsrtags = "ancient-notation"
- texidoc = "
+
+ texidoc = "
Time signatures may also be engraved in an old style.
-" }
-% begin verbatim
+
+"
+ doctitle = "Ancient time signatures"
+} % begin verbatim
\score {
{
\override Staff.TimeSignature #'style = #'neomensural
\header {
lsrtags = "pitches, editorial-and-educational-use"
- texidoc = "
-The @code{shapeNoteStyles} property gives you the ability to define
-various note head styles for each step of the scale (as defined by the
-key signature or the \"tonic\" property). This property requires a set
-of symbols, which can be purely arbitrary (geometrical expressions such
-as @code{triangle}, @code{cross}, @code{xcircle} etc. are allowed) or
-based on old American engraving tradition (you can use some latin note
-names as well). That said, if you're trying to imitate old American
-song books, you may also want to try LilyPond's predefined note head
-styles, through shortcut commands such as @code{\\aikenHeads} or
-@code{\\sacredHarpHeads}. This example shows different ways to obtain
-shape note heads, and demonstrates the ability to transpose a melody
-without losing the correspondence between harmonic functions and note
-head styles.
-" }
-% begin verbatim
+
+ texidoc = "
+The @code{shapeNoteStyles} property can be used to define various note
+head styles for each step of the scale (as set by the key signature or
+the \"tonic\" property). This property requires a set of symbols, which
+can be purely arbitrary (geometrical expressions such as
+@code{triangle}, @code{cross}, and @code{xcircle} are allowed) or based
+on old American engraving tradition (some latin note names are also
+allowed).
+
+That said, to imitate old American song books, there are several
+predefined note head styles available through shortcut commands such as
+@code{\\aikenHeads} or @code{\\sacredHarpHeads}.
+
+This example shows different ways to obtain shape note heads, and
+demonstrates the ability to transpose a melody without losing the
+correspondence between harmonic functions and note head styles.
+
+"
+ doctitle = "Applying note head styles depending on the step of the scale"
+} % begin verbatim
fragment = {
\key c \major
c2 d e f g a b c
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
Beams can be subdivided automatically. By setting the property
@code{subdivideBeams}, beams are subdivided at beat positions (as
specified in @code{beatLength}).
-" }
-% begin verbatim
+
+"
+ doctitle = "Automatic beam subdivisions"
+} % begin verbatim
\score {
\new Staff \relative {
<< {
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
In a simple time signature of 2/2 or 4/4, 8th notes are beamed by
-default as two sets of four. Using a macro which overrides the
-autobeaming behavior, this snippet changes the beaming to quarter note
-beats.
-" }
-% begin verbatim
+default as two sets of four.
+
+Using a macro which overrides the autobeaming behavior, this snippet
+changes the beaming to quarter note beats.
+
+"
+ doctitle = "Automatic beams two per two in 4/4 or 2/2 time signature"
+} % begin verbatim
% Automatic beams two per two in 4/4 or 2/2 time signature
% _____
% Default | | | |
% The good way adapted from David Bobroff
% macro for beamed two per two in 2/2 and 4/4 time signature
-qbeam= {
+qBeam = {
#(override-auto-beam-setting '(end 1 8 * *) 1 4 'Staff)
#(override-auto-beam-setting '(end 1 8 * *) 2 4 'Staff)
#(override-auto-beam-setting '(end 1 8 * *) 3 4 'Staff)
%Use the macro
\new Staff \relative c'' {
\time 4/4
- \qbeam
+ \qBeam
g8^\markup { with the macro } g g g g g g g |
g g g g4 g8 g g |
}
+++ /dev/null
-@node Bagpipes
-@unnumbered Bagpipes
-
-@lysnippets
-
\header {
lsrtags = "rhythms, breaks"
- texidoc = "
-By default, beams can't be printed across line breaks. Here's a way to
-force the line break, by setting the @code{#'breakable} property. See
-also in the manual the \"Line Breaking\" and \"Manual beams\" sections.
-" }
-% begin verbatim
-\layout { ragged-right= ##t }
+ texidoc = "
+By default, beams can't be printed across line breaks. This behavior
+can be overridden by setting the @code{breakable} property. See also in
+the manual the \"Line breaking\" and \"Manual beams\" sections.
+
+"
+ doctitle = "Beams across line breaks"
+} % begin verbatim
+\layout { ragged-right = ##t }
\relative c'' {
\override Score.Beam #'breakable = ##t
- \time 3/16 c16[ d e \break f]
+ \time 3/16
+ c16[ d e \break
+ f] r r
}
\header {
lsrtags = "editorial-and-educational-use, text"
- texidoc = "
+
+ texidoc = "
The @code{\\whiteout} command underlays a white box under a markup.
Since staff lines are in a lower layer than most other grobs, this
white box will not overlap any other grob.
-" }
-% begin verbatim
+
+"
+ doctitle = "Blanking staff lines using the \whiteout command"
+} % begin verbatim
\relative {
\override TextScript #'extra-offset = #'(2 . 4)
c2-\markup { \whiteout \pad-markup #0.5 "middle C" } c
\header {
lsrtags = "expressive-marks"
- texidoc = "
+
+ texidoc = "
Breathing signs are available in different tastes: commas (default),
ticks, vees and \"railroad tracks\" (caesura).
-" }
-% begin verbatim
+
+"
+ doctitle = "Breathing signs"
+} % begin verbatim
\new Staff \relative c'' {
\key es \major
\time 3/4
Make sure to put the hairpin in a lower layer than the text markup to
actually draw the rectangle above the hairpin.
-" }
+" } % begin verbatim
\score {
\relative c' {
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
A caesura is sometimes denoted with a double \"railtracks\" breath mark
with a fermata sign positioned over the top of the railtracks. This
snippet should present an optically pleasing combination of railtracks
and a fermata.
-" }
-% begin verbatim
+
+"
+ doctitle = "Caesura ("railtracks") with fermata"
+} % begin verbatim
{
c''2.
% construct the symbol
\header {
lsrtags = "expressive-marks, text"
- texidoc = "
+
+ texidoc = "
This example provides a function to typeset a hairpin (de)crescendo
with some additional text below it, such as \"molto\" or \"poco\". The
example also illustrates how to modify the way an object is normally
printed, using some Scheme code.
-" }
-% begin verbatim
+
+"
+ doctitle = "Center text below hairpin dynamics"
+} % begin verbatim
hairpinWithCenteredText = #(define-music-function (parser location text) (markup?)
#{
\override Voice.Hairpin #'stencil = #(lambda (grob)
\header {
lsrtags = "expressive-marks"
- texidoc = "
-To make the @code{\\flageolet} circle smaller you can use the following
-Scheme code.
-" }
-% begin verbatim
+
+ texidoc = "
+To make the @code{\\flageolet} circle smaller use the following Scheme
+function.
+
+"
+ doctitle = "Changing \flageolet mark size"
+} % begin verbatim
smallFlageolet = #(let ((m (make-music 'ArticulationEvent
'articulation-type "flageolet")))
(set! (ly:music-property m 'tweaks)
\header {
lsrtags = "simultaneous-notes, editorial-and-educational-use, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
Individual note heads in a chord can be modified with the
-@code{\\tweak} command inside a chord, by altering the
-@code{'font-size} property.
+@code{\\tweak} command inside a chord, by altering the @code{font-size}
+property.
Inside the chord (within the brackets @code{< >}), before the note to
notehead).
-The code for the chord example shown: @code{}
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing a single note's size in a chord"
+} % begin verbatim
\layout { ragged-right = ##t }
\relative {
<\tweak #'font-size #+2 c e g c \tweak #'font-size #-2 e>1^\markup { A tiny e }_\markup { A big c }
\"Kirchenpausen\" - church rests) within the staff and
prints a simple line otherwise. This default number of ten
may be changed by an override:
-"}
-% begin verbatim
+"} % begin verbatim
+
\relative c'' {
\compressFullBarRests
R1*2 | R1*5 | R1*9
\header {
lsrtags = "tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
The @code{\\applyOutput} command gives you the ability to tune any
layout object, in any context. It requires a Scheme function with three
arguments; advanced users can write it quite easily, whereas new users
may want to use pre-defined functions such as this snippet, or the
example in the manual.
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing properties for individual grobs"
+} % begin verbatim
% ****************************************************************
% ly snippet:
% ****************************************************************
\header {
lsrtags = "expressive-marks, editorial-and-educational-use"
- texidoc = "
+
+ texidoc = "
The appearance of slurs may be changed from solid to dotted or dashed.
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing the appearance of a slur from solid to dotted or dashed"
+} % begin verbatim
\relative c' {
c( d e c) |
\slurDotted
\header {
lsrtags = "chords"
- texidoc = "
+
+ texidoc = "
The english naming of chords (default) can be changed to german
(@code{\\germanChords} replaces B and Bes to H and B) or semi-german
(@code{\\semiGermanChords} replaces B and Bes to H and Bb).
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing the chord names to German or semi-German notation"
+} % begin verbatim
music = \chordmode {
c1/c cis/cis
b/b bis/bis bes/bes
\header {
lsrtags = "text, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
The default font families for text can be overridden with
@code{make-pango-font-tree}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing the default text font family"
+} % begin verbatim
\paper {
% change for other default global staff size.
myStaffSize = #20
\header {
lsrtags = "staff-notation"
- texidoc = "
-The number of lines in a staff may changed by overriding
-@code{line-count} in the properties of @code{StaffSymbol}.
+ texidoc = "
+The number of lines in a staff may changed by overriding the
+@code{StaffSymbol} property @code{line-count}.
-" }
-% begin verbatim
+
+
+
+"
+ doctitle = "Changing the number of lines in a staff"
+} % begin verbatim
upper = \relative c'' {
c1 d e f
}
lower = \relative c {
+ \clef bass
c1 b a g
}
\score {
\context PianoStaff <<
- \new Staff <<
+ \new Staff {
\upper
- >>
- \new Staff {
- \override Staff.StaffSymbol #'line-count = #4
- \clef bass
- \lower
+ }
+ \new Staff {
+ \override Staff.StaffSymbol #'line-count = #4
+ \lower
}
>>
-
}
-
\header {
lsrtags = "staff-notation, tweaks-and-overrides, paper-and-layout"
- texidoc = "
-In order to change staff sizes, both @code{staff-space} and
-@code{fontSize} must be scaled.
-If you do not want to resize staves individually, the simplest way is
-to use @code{#(set-global-staff-size xx)}.
-" }
-% begin verbatim
+ texidoc = "
+Though the simplest way to resize staves is to use
+@code{#(set-global-staff-size xx)}, an individual staff's size can be
+changed by scaling the properties @code{staff-space} and
+@code{fontSize}.
+
+"
+ doctitle = "Changing the staff size"
+} % begin verbatim
<<
- \new Staff \relative c'' { \dynamicDown c8 \ff c c c c c c c }
+ \new Staff \relative c'' { \dynamicDown c8\ff c c c c c c c }
\new Staff \with {
fontSize = #-3
\override StaffSymbol #'staff-space = #(magstep -3)
}
{
\clef bass
- c8 c c c c c c c
+ c8 c c c c\f c c c
}
>>
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
By default, only the numerator of the tuplet number is printed over the
tuplet bracket, i.e., the denominator of the argument to the
@code{\\times} command. Alternatively, num:den of the tuplet number may
be printed, or the tuplet number may be suppressed altogether.
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing the tuplet number"
+} % begin verbatim
\relative c'' {
\times 2/3 { c8 c c } \times 2/3 { c8 c c }
\override TupletNumber #'text = #tuplet-number::calc-fraction-text
\header {
lsrtags = "rhythms, contexts-and-engravers"
- texidoc = "
+
+ texidoc = "
The @code{measureLength} property, together with
@code{measurePosition}, determines when a bar line is needed. However,
when using @code{\\compressMusic}, the scaling of durations makes it
Therefore, @code{measureLength} has to be set manually, using the
@code{ly:make-moment} callback. The second argument must be the same as
the second argument of @code{\\compressMusic}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Changing time signatures inside a polymetric section using \compressMusic"
+} % begin verbatim
\layout {
\context {
\Score
\header {
lsrtags = "rhythms, vocal-music, ancient-notation, contexts-and-engravers"
- texidoc = "
+
+ texidoc = "
This form of notation is used for the chant of the Psalms, where verses
aren't always the same length.
-" }
-% begin verbatim
+
+"
+ doctitle = "Chant or psalms notation"
+} % begin verbatim
stemOn = { \override Staff.Stem #'transparent = ##f }
stemOff = { \override Staff.Stem #'transparent = ##t }
\header {
lsrtags = "chords"
- texidoc = "
+
+ texidoc = "
The property @code{chordNameExceptions} can used to store a list of
special notations for specific chords.
-" }
-% begin verbatim
+
+"
+ doctitle = "Chord name exceptions"
+} % begin verbatim
% 7sus4 denoted with ^7 wahh
chExceptionMusic = {
<c f g bes>1-\markup { \super "7" "wahh" }
@item Regions can span multiple systems. In this case, multiple EPS files are generated.
@end itemize
"
-}
-% begin verbatim
+} % begin verbatim
+
#(ly:set-option 'clip-systems)
#(set! output-count 1)
\header {
lsrtags = "simultaneous-notes, chords, piano-music"
- texidoc = "
+
+ texidoc = "
Clusters are a device to denote that a complete range of notes is to be
played.
-" }
-% begin verbatim
+
+"
+ doctitle = "Clusters"
+} % begin verbatim
\layout {
ragged-right = ##t
}
\header {
lsrtags = "expressive-marks, text"
- texidoc = "
+
+ texidoc = "
Some dynamics may involve text indications (such as \"più forte\" or
\"piano subito\"). They can be produced using a @code{\\markup} block.
-" }
-% begin verbatim
+
+"
+ doctitle = "Combining dynamics with markup texts"
+} % begin verbatim
piuF = \markup { \italic "più" \dynamic "f" }
\relative c'' {
- c2 c-\piuF
+ c2\f c-\piuF
}
\header {
lsrtags = "simultaneous-notes, text"
- texidoc = "
-The part combiner tool ( @code{\\partcombine} command ) allows you to
-combine different parts on the same staff. Text directions such as
-\"solo\" or \"a2\" are added by default; to remove them, simply set the
-property @code{printPartCombineTexts} to \"false\". For vocal scores
-(hymns), there is no need to add \"solo\"/\"a2\" texts, so they should
-be switched off. However, you'd better not use it if there are any
-solos, as they won't be indicated. In such cases, you may simply want
-to use standard LilyPond polyphony. This snippet presents the three
-ways two parts can be printed on a same staff: standard polyphony,
-@code{\\partcombine} without texts, and @code{\\partcombine} with texts.
-
-
-
-" }
-% begin verbatim
+
+ texidoc = "
+The part combiner tool ( @code{\\partcombine} command ) allows the
+combination of several different parts on the same staff. Text
+directions such as \"solo\" or \"a2\" are added by default; to remove
+them, simply set the property @code{printPartCombineTexts} to
+\"false\". For vocal scores (hymns), there is no need to add
+\"solo\"/\"a2\" texts, so they should be switched off. However, it
+might be better not to use it if there are any solos, as they won't be
+indicated. In such cases, standard polyphonic notation may be
+preferable.
+
+This snippet presents the three ways two parts can be printed on a same
+staff: standard polyphony, @code{\\partcombine} without texts, and
+@code{\\partcombine} with texts.
+
+
+
+
+"
+ doctitle = "Combining two parts on the same staff"
+} % begin verbatim
musicUp = \relative c'' {
\time 4/4
a4 c4.( g8) a4 |
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
Odd 20th century time signatures (such as \"5/8\") can often be played
as compound time signatures (e.g. \"3/8 + 2/8\"), which combine two or
more inequal metrics. LilyPond can make such music quite easy to read
and play, by explicitly printing the compound time signatures and
-adapting the automatic beaming behavior. (You can even add graphic
-measure grouping indications; see the appropriate snippet in this
+adapting the automatic beaming behavior. (Graphic measure grouping
+indications can also be added; see the appropriate snippet in this
database.)
-" }
-% begin verbatim
+
+"
+ doctitle = "Compound time signatures"
+} % begin verbatim
#(define (compound-time one two num)
(markup #:override '(baseline-skip . 0) #:number
(#:line ((#:column (one num)) #:vcenter "+" (#:column (two num))))
#(override-auto-beam-setting '(end 1 8 5 8) 1 4)
c8 d e fis gis |
c fis, gis e d |
- c8 d e4 gis8
+ c8 d e4 gis8
}
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
The Scheme function @code{set-time-signature}, in combination with the
@code{Measure_grouping_engraver}, creates measure grouping signs. Such
signs ease reading rhythmically complex modern music. In the following
2 3)}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Conducting signs, measure grouping signs"
+} % begin verbatim
\score {
\relative c'' {
#(set-time-signature 9 8 '(2 2 2 3))
- g8[ g] d[ d] g[ g] a8[( bes g]) |
+ #(revert-auto-beam-setting '(end * * 9 8) 3 8)
+ #(override-auto-beam-setting '(end 1 8 9 8) 1 4)
+ #(override-auto-beam-setting '(end 1 8 9 8) 2 4)
+ #(override-auto-beam-setting '(end 1 8 9 8) 3 4)
+ g8 g d d g g a( bes g) |
#(set-time-signature 5 8 '(3 2))
a4. g4
}
}
}
}
-
\header {
lsrtags = "expressive-marks"
- texidoc = "
+
+ texidoc = "
A contemporary glissando without a final note can be typeset using a
hidden note and cadenza timing.
-" }
-% begin verbatim
+
+"
+ doctitle = "Contemporary glissando"
+} % begin verbatim
\relative c'' {
\time 3/4
\override Glissando #'style = #'zigzag
adding-a-figured-bass-above-or-below-the-notes.ly
adding-an-extra-staff-at-a-line-break.ly
adding-an-extra-staff.ly
-mensurstriche-layout-bar-lines-between-the-staves.ly
+vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
+mensurstriche-layout-bar-lines-between-the-staves.ly
engravers-one-by-one.ly
use-square-bracket-at-the-start-of-a-staff-group.ly
-vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
nesting-staves.ly
\header {
lsrtags = "editorial-and-educational-use, chords, piano-music"
- texidoc = "
+
+ texidoc = "
The placement of fingering numbers can be controlled precisely.
-" }
-% begin verbatim
-\relative c'{
+
+"
+ doctitle = "Controlling the placement of chord fingerings"
+} % begin verbatim
+\relative c' {
\set fingeringOrientations = #'(left)
- <c-1 e-3 a-5 > 4
+ <c-1 e-3 a-5>4
\set fingeringOrientations = #'(down)
- <c-1 e-3 a-5 >
+ <c-1 e-3 a-5>
\set fingeringOrientations = #'(right)
- <c-1 e-3 a-5 >
+ <c-1 e-3 a-5>
\set fingeringOrientations = #'(up)
- <c-1 e-3 a-5 >
+ <c-1 e-3 a-5>
\set fingeringOrientations = #'(left down)
- <c-1 e-3 a-5 > 2
+ <c-1 e-3 a-5>2
\set fingeringOrientations = #'(up right down)
- <c-1 e-3 a-5 >
+ <c-1 e-3 a-5>
}
\header {
lsrtags = "rhythms, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
The default behavior of tuplet-bracket visibility is to print a bracket
unless there is a beam of the same length as the tuplet. To control the
visibility of tuplet brackets, set the property @code{TupletBracket
#'bracket-visibility} to either @code{##t} (always print a bracket),
@code{##f} (never print a bracket) or @code{#'if-no-beam} (only print a
bracket if there is no beam).
-" }
-% begin verbatim
+
+"
+ doctitle = "Controlling tuplet bracket visibility"
+} % begin verbatim
mus = \relative c'' {
\times 2/3 { c16[ d e } f8]
\times 2/3 { c8 d e }
\header {
lsrtags = "pitches"
- texidoc = "
+
+ texidoc = "
In music that contains many occurrences of the same sequence of notes
-at different pitches, you can use the following music function. It
-takes a note, of which the pitch is used. The supporting Scheme
+at different pitches, the following music function may prove useful. It
+takes a note, of which only the pitch is used. The supporting Scheme
functions were borrowed from the \"Tips and tricks\" document in the
manual for version 2.10. This example creates the rhythm used
throughout Mars, from Gustav Holst's The Planets.
-" }
-% begin verbatim
+
+"
+ doctitle = "Creating a sequence of notes on various pitches"
+} % begin verbatim
#(define (make-note-req p d)
(make-music 'NoteEvent
'duration d
\header {
lsrtags = "staff-notation, editorial-and-educational-use, contexts-and-engravers, paper-and-layout"
- texidoc = "
-To create blank staves, you must generate empty measures, removing also
-from the @code{Score} context the @code{Bar_number_engraver}, and from
-the @code{Staff} context the @code{Time_signature_engraver}, the
-@code{Clef_engraver} and the @code{Bar_engraver}.
-" }
-% begin verbatim
+
+ texidoc = "
+To create blank staves, generate empty measures then remove the
+@code{Bar_number_engraver} from the @code{Score} context, and the
+@code{Time_signature_engraver}, @code{Clef_engraver} and
+@code{Bar_engraver} from the @code{Staff} context.
+
+"
+ doctitle = "Creating blank staves"
+} % begin verbatim
#(set-global-staff-size 20)
\score {
\header {
lsrtags = "expressive-marks, text"
- texidoc = "
+
+ texidoc = "
Although the easiest way to add parentheses to a dynamic mark is to use
a @code{\\markup} block, this method has a downside: the created
objects will behave like text markups, and not like dynamics.
commands such as @code{\\dynamicUp} or @code{\\dynamicDown}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Creating "real" parenthesized dynamics"
+} % begin verbatim
\paper { ragged-right = ##t }
parenF = #(make-dynamic-script (markup #:line (#:normal-text #:italic
- #:fontsize 2 "(" #:hspace -0.8 #:dynamic "f" #:normal-text #:italic
- #:fontsize 2 ")"
+ #:fontsize 2 "(" #:hspace -0.8 #:dynamic "f" #:normal-text
+ #:italic #:fontsize 2 ")"
)))
-{
- c''4\parenF c'' c'' \dynamicUp c''\parenF
+\relative c'' {
+ c4\parenF c c \dynamicUp c\parenF
}
\header {
lsrtags = "expressive-marks, text, tweaks-and-overrides"
- texidoc = "
-The @code{\\startTextSpan} and @code{\\stopTextSpan} commands give you
-the ability to create text spanners as easily as pedal indications or
+
+ texidoc = "
+The @code{\\startTextSpan} and @code{\\stopTextSpan} commands allow the
+creation of text spanners as easily as pedal indications or
octavations. Override some properties of the @code{TextSpanner} object
to modify its output.
-" }
-% begin verbatim
+
+"
+ doctitle = "Creating text spanners"
+} % begin verbatim
\relative c'' {
\override TextSpanner #'edge-text = #'("bla" . "blu")
a \startTextSpan
\header {
lsrtags = "ancient-notation, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
Custodes may be engraved in various styles.
-" }
-% begin verbatim
+
+"
+ doctitle = "Custodes"
+} % begin verbatim
\layout { ragged-right = ##t }
\new Staff \with { \consists "Custos_engraver" } \relative c' {
\header {
lsrtags = "editorial-and-educational-use"
- texidoc = "
-The direction of stems on the center line of the staff can be changed,
-as demonstrated in this example.
-" }
-% begin verbatim
+
+ texidoc = "
+The default direction of stems on the center line of the staff is set
+by the @code{Stem} property @code{neutral-direction}.
+
+"
+ doctitle = "Default direction of stems on the center line of the staff"
+} % begin verbatim
\relative c'' {
a b c b
\override Stem #'neutral-direction = #up
\header {
lsrtags = "vocal-music, piano-music, strings, midi"
- texidoc = "
+
+ texidoc = "
Problem: How to know which @code{midiInstrument} would be best for your
composition?Solution: A LilyPond demo file.
-" }
-% begin verbatim
+
+"
+ doctitle = "Demo MidiInstruments"
+} % begin verbatim
\header {
title = "Demo of all midi sounds"
arranger = "Myself "
\header {
lsrtags = "text, paper-and-layout, titles"
- texidoc = "
+
+ texidoc = "
A demonstration of all headers.
-" }
-% begin verbatim
+
+"
+ doctitle = "Demonstrating all headers"
+} % begin verbatim
\header {
copyright = "copyright"
title = "title"
\header {
lsrtags = "staff-notation, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
If there is only one staff in one of the staff types @code{ChoirStaff},
@code{InnerChoirStaff}, @code{InnerStaffGroup} or @code{StaffGroup},
the bracket and the starting bar line will not be displayed as standard
-behavior. This can be changed with:
-
-
-@code{\\override [staffcontext].SystemStartBracket #'collapse-height =
-#1}
- and
-
-@code{\\override [staffcontext].SystemStartBar #'collapse-height = #1}
-
-
-This applies to all staff contexts with
-@code{systemStartDelimiter}-property set to @code{'SystemStartBracket}.
-
-
-
-For staff contexts with @code{'SystemStartBrace}, such as
-@code{PianoStaff}, this tweaking can be used as well.
-
-
-
-" }
-% begin verbatim
-\layout {
- ragged-right = ##t
- indent = 0\cm
-}
-
-\score {
- \new StaffGroup <<
- % Must be lower than your actual amount off staff lines
+behavior. This can be changed by overriding the relevant properties,
+as demonstrated in this example.
+
+Note that in some contexts such as @code{PianoStaff} where the systems
+begin with a brace instead of a bracket, another property has to be
+set, as shown on the second system in the example.
+
+"
+ doctitle = "Display bracket with only one staff in a system"
+} % begin verbatim
+\markup \column {
+ \score {
+ \new StaffGroup <<
+ % Must be lower than your actual amount of staff lines
\override StaffGroup.SystemStartBracket #'collapse-height = #1
\override Score.SystemStartBar #'collapse-height = #1
\new Staff {
- c'4 d' e' f'
+ c'1
}
- >>
-}
-
-\score {
- \new PianoStaff <<
+ >>
+ \layout {ragged-right = ##t}
+ }
+ \score {
+ \new PianoStaff <<
\override PianoStaff.SystemStartBrace #'collapse-height = #1
\override Score.SystemStartBar #'collapse-height = #1
\new Staff {
- c'4 d' e' f'
+ c'
}
- >>
-}
+ >>
+ \layout {ragged-right = ##t}
+ }
+}
\header {
lsrtags = "pitches"
- texidoc = "
+
+ texidoc = "
In early 20th century works, starting with Schoenberg, Berg and Webern
(the \"Second\" Viennese school), every pitch in the twelve-tone scale
has to be regarded as equal, without any hierarchy such as the
classical (tonal) degrees. Therefore, these composers print one
accidental for each note, even at natural pitches, to emphasize their
-new approach to music theory and language. This snippet shows how to
-achieve such notation rules.
-" }
-% begin verbatim
+new approach to music theory and language.
+
+This snippet shows how to achieve such notation rules.
+
+"
+ doctitle = "Dodecaphonic-style accidentals for each note including naturals"
+} % begin verbatim
webernAccidentals = {
% the 5s are just "a value different from any accidental"
\set Staff.keySignature = #'((0 . 5) (1 . 5) (2 . 5) (3 . 5)
c' c' dis' des'
}
\layout {
- \context { \Staff \remove "Key_engraver" }
+ \context {
+ \Staff
+ \remove "Key_engraver"
+ }
}
}
The @code{print-function} can be overridden to draw a box around an
arbitrary grob.
"
-}
-% begin verbatim
+} % begin verbatim
+
\relative c'' {
\override TextScript #'stencil =
#(make-stencil-boxer 0.1 0.3 ly:text-interface::print)
texidoc = "
The @code{\circle} command allows you to draw circles around various objects,
for example fingering indications. However, some objects require
-specific tweaks: rehearsal marks depend on the @code{Score.markFormatter}
+specific tweaks: rehearsal marks depend on the @code{Score.markFormatter} % begin verbatim
context, bar numbers on the @code{Score.BarNumber} context, and so on.
You can tweak the printing of your circles by setting some properties
such as @code{#'thickness}, @code{#'circle-padding} or @code{#'font-size}.
" }
-% begin verbatim
+
\relative c'{
c1
\set Score.markFormatter
making-some-staff-lines-thicker-than-the-others.ly
applying-note-head-styles-depending-on-the-step-of-the-scale.ly
changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
+embedding-native-postscript-in-a--markup-block.ly
default-direction-of-stems-on-the-center-line-of-the-staff.ly
changing-a-single-notes-size-in-a-chord.ly
-grid-lines-emphasizing-rhythms-and-notes-synchronization.ly
controlling-the-placement-of-chord-fingerings.ly
allowing-fingerings-to-be-printed-inside-the-staff.ly
blanking-staff-lines-using-the--whiteout-command.ly
-grid-lines-changing-their-appearance.ly
+grid-lines;-emphasizing-rhythms-and-notes-synchronization.ly
+grid-lines;-changing-their-appearance.ly
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.38"
+
+\header {
+ lsrtags = "editorial-and-educational-use, text"
+
+ texidoc = "
+PostScript code can be directly inserted inside a @code{\\markup}
+block.
+
+"
+ doctitle = "Embedding native PostScript in a \markup block"
+} % begin verbatim
+% PostScript is a registred trademark by Adobe Systems Inc.
+
+\relative c'' {
+ a-\markup { \postscript #"3 4 moveto 5 3 rlineto stroke" }
+ -\markup { \postscript #"[ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke " }
+
+ b-\markup { \postscript #"3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke" }
+ s2
+ a'1
+}
\header {
lsrtags = "contexts-and-engravers"
- texidoc = "
+
+ texidoc = "
The notation problem, creating a certain symbol, is handled by plugins.
Each plugin is called an Engraver. In this example, engravers are
switched on one by one, in the following order:
You may only see the first example in this document; please download
this snippet and run it from your own computer.
-" }
-% begin verbatim
+
+"
+ doctitle = "Engravers one-by-one"
+} % begin verbatim
%% sample music
topVoice = \relative c' {
\key d\major
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
Ties may be engraved manually by changing the @code{tie-configuration}
property of the @code{TieColumn} object. The first number indicates the
distance from the center of the staff in staff-spaces, and the second
number indicates the direction (1 = up, -1 = down).
-" }
-% begin verbatim
+
+"
+ doctitle = "Engraving ties manually"
+} % begin verbatim
\relative c' {
<c e g>2 ~ <c e g> |
\override TieColumn #'tie-configuration =
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
The property @code{tupletSpannerDuration} sets how long each of the
tuplets contained within the brackets after @code{\\times} should last.
Many consecutive tuplets can then be placed within a single
For more information about @code{make-moment}, see \"Time
administration\".
-" }
-% begin verbatim
-\relative {
+
+"
+ doctitle = "Entering several tuplets using only one \times command"
+} % begin verbatim
+\relative c' {
\time 2/4
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\times 2/3 { c8 c c c c c }
creating-text-spanners.ly
adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly
changing-the-appearance-of-a-slur-from-solid-to-dotted-or-dashed.ly
-breathing-signs.ly
-creating-real-parenthesized-dynamics.ly
caesura-railtracks-with-fermata.ly
+piano-template-with-centered-dynamics.ly
+creating-real-parenthesized-dynamics.ly
+breathing-signs.ly
contemporary-glissando.ly
+center-text-below-hairpin-dynamics.ly
adding-parentheses-around-an-expressive-mark-or-chordal-note.ly
line-arrows.ly
changing--flageolet-mark-size.ly
-piano-template-with-centered-dynamics.ly
broken-crescendo-hairpin.ly
-center-text-below-hairpin-dynamics.ly
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
This snippet demonstrates how to obtain automatic ordered rehearsal
marks, but from the letter or number you want.
-" }
-% begin verbatim
+
+"
+ doctitle = "Forcing rehearsal marks to start from a given letter or number"
+} % begin verbatim
\relative c''{
c1 \mark \default
c1 \mark \default
\header {
lsrtags = "text, vocal-music"
- texidoc = "
+
+ texidoc = "
To format individual syllables in lyrics, use @code{\\markup @{ ....
@}} on these lyrics.
-" }
-% begin verbatim
+
+"
+ doctitle = "Formatting lyrics syllables"
+} % begin verbatim
% Tip taken from http://lists.gnu.org/archive/html/lilypond-user/2007-12/msg00215.html
\header {
title = "Markup can be used inside lyrics!"
\header {
lsrtags = "pitches"
- texidoc = "
+
+ texidoc = "
This Scheme-based snippet generates 24 random notes (or as many as
-required), based on the current time (or any randomish number you might
-wish to specify instead, so you can obtain the same random notes each
-time): i.e., to get different random notes patterns, just change this
-number.
-" }
-% begin verbatim
+required), based on the current time (or any randomish number specified
+instead, in order to obtain the same random notes each time): i.e., to
+get different random note patterns, just change this number.
+
+"
+ doctitle = "Generating random notes"
+} % begin verbatim
\score {
-{ #(let ((random-state (seed->random-state (current-time))))
+ { #(let ((random-state (seed->random-state (current-time))))
(ly:export
(make-music 'SequentialMusic 'elements
(map (lambda x
(remainder idx 7)
0))))))
(make-list 24)))))
- }
+ }
}
\header {
lsrtags = "editorial-and-educational-use"
- texidoc = "
-Grid lines can look differently, by modifying some of their properties
-using the @code{\\override} command.
-" }
-% begin verbatim
+
+ texidoc = "
+The appearance of grid lines can be changed by overriding some of their
+properties.
+
+"
+ doctitle = "Grid lines: changing their appearance"
+} % begin verbatim
\layout {
\context {
\Staff
- % sets up grids
+ % set up grids
\consists "Grid_point_engraver"
- % this sets the grid interval to 1 quarternote (crotchet)
+ % set the grid interval to one quarter note
gridInterval = #(ly:make-moment 1 4)
}
}
\new Staff {
\relative c {
% this moves them up one staff space from the default position
- \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
+ \override Score.GridLine #'extra-offset = #'(0.0 . 1.0)
\stemDown
\clef bass
\once \override Score.GridLine #'thickness = #5.0
\header {
lsrtags = "editorial-and-educational-use"
- texidoc = "
+
+ texidoc = "
Regular vertical lines can be drawn between staves to show notes
synchronization; however, in case of monophonic music, you may want to
make the second stave invisible, and make the lines shorter like in
this snippet.
-" }
-% begin verbatim
+
+"
+ doctitle = "Grid lines: emphasizing rhythms and notes synchronization"
+} % begin verbatim
%% sets of grid
\layout {
\context {
\header {
lsrtags = "rhythms, percussion"
- texidoc = "
+
+ texidoc = "
Though the polymetric time signature shown was not the most essential
item here, it has been included to show the beat of this piece (which
is the template of a real Balkan song!).
-" }
-% begin verbatim
+
+"
+ doctitle = "Heavily customized polymetric time signatures"
+} % begin verbatim
#(define (set-time-signature one two three four five six seven eight nine ten
-eleven num)
- (markup #:override '(baseline-skip . 0) #:number
- (#:line ((#:column (one num)) #:vcenter "+" (#:column (two num))
-#:vcenter "+" (#:column (three num)) #:vcenter "+" (#:column (four num))
-#:vcenter "+" (#:column (five num)) #:vcenter "+" (#:column (six num))
-#:vcenter "+" (#:column (seven num)) #:vcenter "+" (#:column (eight
-num)) #:vcenter "+" (#:column (nine num)) #:vcenter "+" (#:column (ten
-num)) #:vcenter "+" (#:column (eleven num))))))
-
-
-melody =
-{ \relative c'' {
- \set Staff.instrumentName = "Bb Sop."
- \key g \major \time 25/8
- \override Staff.TimeSignature #'stencil = #ly:text-interface::print
- \override Staff.TimeSignature #'text = #(set-time-signature "3" "2" "2" "3"
-"2" "2" "2" "2 " "3" "2" "2" "8" )
- \set Staff.beatGrouping = #'(3 2 2 3 2 2 2 2 3 2 2)
- #(override-auto-beam-setting '(end * * 25 8) 3 8)
- #(override-auto-beam-setting '(end * * 25 8) 5 8)
- #(override-auto-beam-setting '(end * * 25 8) 7 8)
- #(override-auto-beam-setting '(end * * 25 8) 10 8)
- #(override-auto-beam-setting '(end * * 25 8) 12 8)
- #(override-auto-beam-setting '(end * * 25 8) 14 8)
- #(override-auto-beam-setting '(end * * 25 8) 16 8)
- #(override-auto-beam-setting '(end * * 25 8) 18 8)
- #(override-auto-beam-setting '(end * * 25 8) 21 8)
- #(override-auto-beam-setting '(end * * 25 8) 23 8)
-
- c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g | \break
- c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4 |
- c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 | \break
- c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 |
- c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 | \break }
+ eleven num)
+ (markup #:override '(baseline-skip . 0) #:number
+ (#:line ((#:column (one num)) #:vcenter "+" (#:column (two num))
+ #:vcenter "+" (#:column (three num)) #:vcenter "+" (#:column (four num))
+ #:vcenter "+" (#:column (five num)) #:vcenter "+" (#:column (six num))
+ #:vcenter "+" (#:column (seven num)) #:vcenter "+" (#:column (eight num))
+ #:vcenter "+" (#:column (nine num)) #:vcenter "+" (#:column (ten num))
+ #:vcenter "+" (#:column (eleven num))))
+ ))
+
+
+melody = \relative c'' {
+ \set Staff.instrumentName = "Bb Sop."
+ \key g \major
+ \time 25/8
+ \override Staff.TimeSignature #'stencil = #ly:text-interface::print
+ \override Staff.TimeSignature #'text = #(set-time-signature "3" "2" "2" "3"
+ "2" "2" "2" "2 " "3" "2" "2" "8" )
+ \set Staff.beatGrouping = #'(3 2 2 3 2 2 2 2 3 2 2)
+ #(override-auto-beam-setting '(end * * 25 8) 3 8)
+ #(override-auto-beam-setting '(end * * 25 8) 5 8)
+ #(override-auto-beam-setting '(end * * 25 8) 7 8)
+ #(override-auto-beam-setting '(end * * 25 8) 10 8)
+ #(override-auto-beam-setting '(end * * 25 8) 12 8)
+ #(override-auto-beam-setting '(end * * 25 8) 14 8)
+ #(override-auto-beam-setting '(end * * 25 8) 16 8)
+ #(override-auto-beam-setting '(end * * 25 8) 18 8)
+ #(override-auto-beam-setting '(end * * 25 8) 21 8)
+ #(override-auto-beam-setting '(end * * 25 8) 23 8)
+
+ c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g | \break
+ c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4 |
+ c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 | \break
+ c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 |
+ c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 | \break
}
-drum = {
- \new DrumStaff \drummode
- {
- \bar "|:" bd4. ^\markup { "Drums" } sn4 bd \bar ":" sn4.
-bd4 sn \bar ":"
- bd sn bd4. sn4 bd \bar ":|"
- }
+
+drum = \new DrumStaff \drummode {
+ \bar "|:" bd4.^\markup { "Drums" } sn4 bd \bar ":" sn4.
+ bd4 sn \bar ":" bd sn bd4. sn4 bd \bar ":|"
}
{
- \melody
- \drum
+ \melody
+ \drum
}
\header {
lsrtags = "text, vocal-music"
- texidoc = "
+
+ texidoc = "
This can be achieved by separating those syllables by tildes.
-" }
-% begin verbatim
+
+"
+ doctitle = "How to put ties between syllables in lyrics"
+} % begin verbatim
\lyrics {
wa~o~a
}
lsrtags = "staff-notation,Ancient notation"
texidoc = "Incipits can be added using the instrument name grob, but
keeping separate the instrument name definition and the incipit definition."
-}
-% begin verbatim
+} % begin verbatim
+
incipit =
#(define-music-function (parser location incipit-music) (ly:music?)
#{
\header {
lsrtags = "staff-notation"
- texidoc = "
+
+ texidoc = "
The @code{\\markup} command is quite versatile. In this snippet, it
contains a @code{\\score} block instead of texts or marks.
-" }
-% begin verbatim
+
+"
+ doctitle = "Inserting score fragments above a staff, as markups"
+} % begin verbatim
tuning = \markup {
\score {
\new Staff \with { \remove "Time_signature_engraver" }
\header {
lsrtags = "piano-music, percussion, guitar, template"
- texidoc = "
+
+ texidoc = "
This is quite an advanced template, for a jazz ensemble. Note that all
instruments are notated in \\key c \\major. This refers to the key in
concert pitch; LilyPond will automatically transpose the key if the
music is within a \\transpose section.
-" }
-% begin verbatim
+
+"
+ doctitle = "Jazz combo template"
+} % begin verbatim
\header {
title = "Song"
subtitle = "(tune)"
0->a, 1->b, 2->c, etc.
BROKEN IN 2.11, COMMENTED OUT."
-}
+} % begin verbatim
{ c'4 }
doctitle = "Line arrows"
lsrtags = "expressive-marks"
texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)"
-}
-% begin verbatim
+} % begin verbatim
+
\relative c'' {
\override TextSpanner #'bound-padding = #1.0
\override TextSpanner #'dash-fraction = #'()
lsrtags = "pitches"
texidoc = "Makam is a type of melody from Turkey using 1/9th-tone
microtonal alterations."
-}
-% begin verbatim
+} % begin verbatim
+
% Define 1/9 alterations.
#(define-public KOMA 1/9)
introducing a tie in a different voice, and blanking the first up-stem
in that voice, the tie appears to cross voices. To prevent the blanked stem's
flag from interfering with tie positioning, the stem is extended.
-" }
+" } % begin verbatim
\relative c'' {
\time 2/4
\header {
lsrtags = "staff-notation, editorial-and-educational-use"
- texidoc = "
+
+ texidoc = "
For pedagogical purposes, you may want to make one staff line thicker
(e.g. the middle line, to emphasize the line of the G clef). This can
be achieved by adding extra lines very close to the line you want to
make thicker, using the @code{'line-positions} property of the
@code{StaffSymbol} object.
-" }
-% begin verbatim
+
+"
+ doctitle = "Making some staff lines thicker than the others"
+} % begin verbatim
{
\override Staff.StaffSymbol #'line-positions = #'(-4 -2 -0.2 0 0.2 2 4)
d'4 e' f' g'
\header {
lsrtags = "rhythms, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
Beam positions may be controlled manually, by overriding the
@code{positions} setting of the @code{Beam} grob.
-" }
-% begin verbatim
-\relative c {
+
+"
+ doctitle = "Manually controlling beam positions"
+} % begin verbatim
+\relative c' {
\time 2/4
- % from upper staffline (position 4) to centre (position 0)
- \override Beam #'positions = #'(2 . 0)
- c'8 c
- % from centre to one above centre (position 2)
- \override Beam #'positions = #'(0 . 1)
+ % from upper staffline (position 4) to center (position 0)
+ \override Beam #'positions = #'(2 . 0)
+ c8 c
+ % from center to one above center (position 2)
+ \override Beam #'positions = #'(0 . 1)
c c
}
lsrtags = "text"
texidoc = "Text that can spread over pages is entered with the
@code{\\markuplines} command."
-}
-% begin verbatim
+} % begin verbatim
+
#(set-default-paper-size "a6")
#(define-markup-list-command (paragraph layout props args) (markup-list?)
\header {
lsrtags = "staff-notation, ancient-notation, contexts-and-engravers, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
The mensurstriche-layout where the bar lines do not show on the staves
but between staves can be achieved with a @code{StaffGroup} instead of
a @code{ChoirStaff}. The bar line on staves is blanked out with an
@code{\\override} command.
-" }
-% begin verbatim
+
+"
+ doctitle = "Mensurstriche layout (bar lines between the staves)"
+} % begin verbatim
global = {
\override Staff.BarLine #'transparent = ##t
s1 s
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
Tuplet brackets can be made to run to prefatory matter or the next
note. Default tuplet brackets end at the right edge of the final note
of the tuplet; full-length tuplet brackets extend farther to the right,
that a clef, time signature, key signature, or another note. The
example shows how to switch tuplets to full length mode and how to
modify what material they cover.
-" }
-% begin verbatim
+
+"
+ doctitle = "Modifying tuplet bracket length"
+} % begin verbatim
\new RhythmicStaff {
% Set tuplets to be extendable...
\set tupletFullLength = ##t
lsrtags = "tweaks-and-overrides"
texidoc = "@cindex Scheme Move Text
Objects of the same type, like text, can be moved around by using some Scheme code.
-" }
-% begin verbatim
+" } % begin verbatim
+
#(define (make-text-checker text)
(lambda (grob) (equal? text (ly:grob-property grob 'text))))
\header {
lsrtags = "staff-notation, contexts-and-engravers, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
The property @code{systemStartDelimiterHierarchy} can be used to make
more complex nested staff groups. The command @code{\\set
StaffGroup.systemStartDelimiterHierarchy} takes an alphabetical list of
staves. The possibilities are @code{SystemStartBar},
@code{SystemStartBracket}, @code{SystemStartBrace}, and
@code{SystemStartSquare}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Nesting staves"
+} % begin verbatim
\new StaffGroup
\relative c'' <<
\set StaffGroup.systemStartDelimiterHierarchy
\header {
lsrtags = "pitches, staff-notation"
- texidoc = "
+
+ texidoc = "
The commonly used @code{\\key} command sets the @code{keySignature}
property, in the @code{Staff} context.
-For non-standard key signatures, you can set this property directly.
-The format of this command is a list:
+To create non-standard key signatures, set this property directly. The
+format of this command is a list:
@code{ \\set Staff.keySignature = #`(((octave . step) . alter) ((octave
. step) . alter) ...) } where, for each element in the list,
etc. (Note the leading comma.)
-However, for each item in the list, you can also use the alternative
-format @code{(step . alter)}, which specifies that the same alteration
-should hold in all octaves.
+Alternatively, for each item in the list, using the more concise format
+@code{(step . alter)} specifies that the same alteration should hold in
+all octaves.
Here is an example of a possible key signature for generating a
whole-tone scale:
-" }
-% begin verbatim
+
+"
+ doctitle = "Non-traditional key signatures"
+} % begin verbatim
\relative c' {
\set Staff.keySignature = #`(((0 . 3) . ,SHARP) ((0 . 5) . ,FLAT) ((0 . 6) . ,FLAT))
c4 d e fis
\header {
lsrtags = "pitches, text"
- texidoc = "
+
+ texidoc = "
Internally, the @code{set-octavation} function sets the properties
@code{ottavation} (for example, to @code{\"8va\"} or @code{\"8vb\"})
and @code{middleCPosition}. To override the text of the bracket, set
@code{ottavation} after invoking @code{set-octavation}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Ottava text"
+} % begin verbatim
{
#(set-octavation 1)
\set Staff.ottavation = #"8"
text markup, it is possible to print the version number of LilyPond in
a score, or in a document generated with @code{lilypond-book}.
"
-}
-% begin verbatim
+} % begin verbatim
+
\score { \context Lyrics {
\override Score.RehearsalMark #'self-alignment-X = #LEFT
\mark #(ly:export (string-append "Processed with LilyPond version " (lilypond-version)))
lsrtags = "spacing"
texidoc = "Page labels may be placed inside music or at top-level,
and refered to in markups."
-}
-% begin verbatim
+} % begin verbatim
+
#(set-default-paper-size "a6")
#(define-markup-command (toc-line layout props label text) (symbol? markup?)
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
This artificial example shows how both manual and automatic line breaks
may be permitted to within a beamed tuplet. Note that such off-beat
tuplets have to be beamed manually.
-" }
-% begin verbatim
+
+"
+ doctitle = "Permitting line breaks within beamed tuplets"
+} % begin verbatim
\layout {
\context {
\Voice
piano-template-with-centered-dynamics.ly
clusters.ly
-jazz-combo-template.ly
+piano-template-with-centered-lyrics.ly
vocal-ensemble-template-with-automatic-piano-reduction.ly
piano-template-simple.ly
controlling-the-placement-of-chord-fingerings.ly
piano-template-with-melody-and-lyrics.ly
-piano-template-with-centered-lyrics.ly
+jazz-combo-template.ly
demo-midiinstruments.ly
\header {
lsrtags = "piano-music, template"
- texidoc = "
+
+ texidoc = "
Here is a simple piano staff with some notes.
-" }
-% begin verbatim
+
+"
+ doctitle = "Piano template (simple)"
+} % begin verbatim
upper = \relative c'' {
\clef treble
\key c \major
Many piano scores have the dynamics centered between the two staves.
This requires a bit of tweaking to implement, but since the template is
right here, you don't have to do the tweaking yourself.
-" }
-% begin verbatim
+" } % begin verbatim
+
upper = \relative c'' {
\clef treble
\key c \major
\header {
lsrtags = "text, piano-music, template"
- texidoc = "
+
+ texidoc = "
Instead of having a full staff for the melody and lyrics, you can place
the lyrics between the piano staff (and omit the separate melody
staff).
-" }
-% begin verbatim
+
+"
+ doctitle = "Piano template with centered lyrics"
+} % begin verbatim
upper = \relative c'' {
\clef treble
\key c \major
\header {
lsrtags = "vocal-music, piano-music, template"
- texidoc = "
+
+ texidoc = "
Here is a typical song format: one staff with the melody and lyrics,
with piano accompaniment underneath.
-" }
-% begin verbatim
+
+"
+ doctitle = "Piano template with melody and lyrics"
+} % begin verbatim
melody = \relative c'' {
\clef treble
\key c \major
ottava-text.ly
tweaking-clef-properties.ly
preventing-extra-naturals-from-being-automatically-added.ly
-ambitus-with-multiple-voices.ly
generating-random-notes.ly
+ambitus-with-multiple-voices.ly
dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly
quoting-another-voice-with-transposition.ly
in polyphonic music multi-measure rests in odd-numbered and
even-numbered voices are vertically separated. The positioning
of multi-measure rests can be controlled as follows:
- "}
-% begin verbatim
+ "} % begin verbatim
+
\relative c'' {
% Multi-measure rests by default are set under the second line
R1
\header {
lsrtags = "repeats, breaks"
- texidoc = "
+
+ texidoc = "
If you want to place an exiting segno sign and add text like \"D.S. al
Coda\" next to it where usually the staff lines are you can use this
snippet. The coda will resume in a new line. There is a variation
documented in this snippet, where the coda will remain on the same
line.
-" }
-% begin verbatim
+
+"
+ doctitle = "Positioning segno and coda (with line break)"
+} % begin verbatim
{
\clef treble
\key g \major
% text and symbols center-aligned
% ===============================
% Move text to the desired position and tweak spacing for optimum text alignment
- \once \override TextScript #'extra-offset = #'( 8 . -5.5 )
+ %\once \override TextScript #'extra-offset = #'( 8 . -5.5 )
\once \override TextScript #'word-space = #1.5
+ \once \override TextScript #'X-offset = #8
+ \once \override TextScript #'Y-offset = #1.5
| s1*0^\markup { \center-align { "D.S. al Coda" \line { \musicglyph #"scripts.coda" \musicglyph #"scripts.tenuto" \musicglyph #"scripts.coda"} } }
% Increasing the unfold counter will expand the staff-free space
altération précédente. Pour modifier ce comportement, assignez la propriété
@code{extraNatural} du contexte @code{Staff} à la valeur @code{##f} (faux).
"
- texidoc = "
+
+ texidoc = "
In accordance with standard typesetting rules, a natural sign is
printed before a sharp or flat if a previous accidental on the same
note needs to be canceled. To change this behavior, set the
@code{extraNatural} property to \"false\" in the @code{Staff} context.
-" }
-% begin verbatim
+
+"
+ doctitle = "Preventing extra naturals from being automatically added"
+} % begin verbatim
\relative {
aeses'4 aes ais a
\set Staff.extraNatural = ##f
\header {
lsrtags = "pitches"
- texidoc = "
+
+ texidoc = "
When the key signature changes, natural signs are automatically printed
to cancel any accidentals from previous key signatures. This may be
-altered by setting to \"false\" the @code{printKeyCancellation}
+prevented by setting to \"false\" the @code{printKeyCancellation}
property in the @code{Staff} context.
-" }
-% begin verbatim
-\relative {
+
+"
+ doctitle = "Preventing natural signs from being printed when the key signature changes"
+} % begin verbatim
+\relative c' {
\key d \major
a b cis d
\key g \minor
\header {
lsrtags = "text"
- texidoc = "
+
+ texidoc = "
Marks can be printed at the end of the current line, instead of the
beginning of the following line. This is particularly useful when a
mark has to be added at the end of a score -- when there is no next
In such cases, the right end of the mark has to be aligned with the
final bar line, as demonstrated on the second line of this example.
-" }
-% begin verbatim
+
+"
+ doctitle = "Printing marks at the end of a line or a score"
+} % begin verbatim
\relative c'' {
\override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible
g2 c
\header {
lsrtags = "text"
- texidoc = "
+
+ texidoc = "
Although text marks are normally only printed above the topmost staff,
they may also be printed on every staff.
-" }
-% begin verbatim
+
+"
+ doctitle = "Printing marks on every staff"
+} % begin verbatim
{
\new Score \with {
\remove "Mark_engraver"
\header {
lsrtags = "rhythms, percussion"
- texidoc = "
+
+ texidoc = "
In the following snippet, two parts have a completely different time
-signature, yet remain synchronized. The bar lines can't be printed at
-the @code{Score} level anymore, so you have to remove the
-@code{Barline_engraver} and put it in the @code{Staff} context.
-" }
-% begin verbatim
+signature, yet remain synchronized. The bar lines can no longer be
+printed at the @code{Score} level; to allow independent bar lines in
+each part, the @code{Barline_engraver} is moved from the @code{Score}
+context to the @code{Staff} context.
+
+"
+ doctitle = "Printing music with different time signatures"
+} % begin verbatim
% Thanks to Adam James Wilson for this snippet
\paper {
\header {
lsrtags = "tweaks-and-overrides, spacing"
- texidoc = "
+
+ texidoc = "
If @code{strict-note-spacing} is set spacing of notes is not influenced
by bars or clefs part way along the system. Rather, they are put just
before the note that occurs at the same time. This may cause
collisions.
-" }
-% begin verbatim
+
+"
+ doctitle = "Proportional strict notespacing"
+} % begin verbatim
\paper {
ragged-right = ##t
indent = 0
middle C; the target is an instrument in F. The target part may be
transposed using @code{\\transpose}. In this case, all the pitches (including the
quoted ones) are transposed."
-}
-% begin verbatim
+} % begin verbatim
+
\addQuote clarinet {
\transposition bes
\repeat unfold 8 { d'16 d'16 d'8 }
music may be quoted. @code{quotedEventTypes} will determines what
things are quoted. In this example, a 16th rest is not quoted, since
@code{rest-event} is not in @code{quotedEventTypes}."
-}
-% begin verbatim
+} % begin verbatim
+
quoteMe = \relative c' { fis4 r16 a8.-> b4-\ff c }
\addQuote quoteMe \quoteMe
\header {
lsrtags = "rhythms, ancient-notation, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
Rests may be used in various styles.
-" }
-% begin verbatim
+
+"
+ doctitle = "Rest styles"
+} % begin verbatim
\layout {
indent = 0.0
\context {
\header {
lsrtags = "rhythms, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
In \"simple\" lead-sheets, sometimes no actual notes are written,
instead only \"rhythmic patterns\" and chords above the measures are
notated giving the structure of a song. Such a feature is for example
rests to be printed as slashes. (If the duration of each beat is not a
quarter note, replace the @code{r4} in the definitions with a rest of
the appropriate duration).
-" }
-% begin verbatim
+
+"
+ doctitle = "Rhythmic slashes"
+} % begin verbatim
% Macro to print single slash
rs = {
\once \override Rest #'stencil = #ly:percent-repeat-item-interface::beat-slash
\header {
lsrtags = "template"
- texidoc = "
+
+ texidoc = "
A template to write score for a diatonic accordion.
- There is a horizontal staff indicating if the accordion must be
This snippet comes with a useful optional macro for the jEdit text
editor.
-" }
-% begin verbatim
+
+"
+ doctitle = "Score for diatonic accordion"
+} % begin verbatim
% Created on Sat Aug 17 2007 by ak
verse= \lyricmode { Wie gross bist du! Wie gross bist du! }
\header {
lsrtags = "repeats"
- texidoc = "
+
+ texidoc = "
By default, the volta brackets will be drawn over all of the
alternative music, but it is possible to shorten them by setting
@code{voltaSpannerDuration}. In the next example, the bracket only
lasts one measure, which is a duration of 3/4.
-" }
-% begin verbatim
+
+"
+ doctitle = "Shortening volta brackets"
+} % begin verbatim
\relative c'' {
\time 3/4
c c c
\header {
lsrtags = "vocal-music, chords, template"
- texidoc = "
+
+ texidoc = "
This template allows you to prepare a song with melody, words, and
chords.
-" }
-% begin verbatim
+
+"
+ doctitle = "Single staff template with notes, lyrics, and chords"
+} % begin verbatim
melody = \relative c' {
\clef treble
\key c \major
\header {
lsrtags = "chords, template"
- texidoc = "
+
+ texidoc = "
Want to prepare a lead sheet with a melody and chords? Look no further!
-" }
-% begin verbatim
+
+"
+ doctitle = "Single staff template with notes and chords"
+} % begin verbatim
melody = \relative c' {
\clef treble
\key c \major
\header {
lsrtags = "vocal-music, template"
- texidoc = "
+
+ texidoc = "
This small template demonstrates a simple melody with lyrics. Cut and
paste, add notes, then words for the lyrics. This example turns off
automatic beaming, which is common for vocal parts. If you want to use
automatic beaming, you'll have to change or comment out the relevant
line.
-" }
-% begin verbatim
+
+"
+ doctitle = "Single staff template with notes and lyrics"
+} % begin verbatim
melody = \relative c' {
\clef treble
\key c \major
\header {
lsrtags = "template"
- texidoc = "
+
+ texidoc = "
This very simple template gives you a staff with notes, suitable for a
solo instrument or a melodic fragment. Cut and paste this into a file,
add notes, and you're finished!
-" }
-% begin verbatim
+
+"
+ doctitle = "Single staff template with only notes"
+} % begin verbatim
melody = \relative c' {
\clef treble
\key c \major
\header {
lsrtags = "rhythms, vocal-music"
- texidoc = "
-Although you can't use @code{s} in @code{\\lyricmode} (it's taken to be
-a literal \"s\", not a space) you can use either @code{\"\"} or
-@code{_}So for example:
-" }
-% begin verbatim
+
+ texidoc = "
+Although @code{s} skips cannot be used in @code{\\lyricmode} (it is
+taken to be a literal \"s\", not a space), double quotes (@code{\"\"})
+or underscores (@code{_}) are available.So for example:
+
+"
+ doctitle = "Skips in lyric mode (2)"
+} % begin verbatim
<<
\relative c'' { a4 b c d }
\new Lyrics \lyricmode { a4 "" _ gap }
\header {
lsrtags = "rhythms, vocal-music"
- texidoc = "
+
+ texidoc = "
The @code{s} syntax for skips is only available in note mode and chord
-mode. In other situations, for example, when entering lyrics, you
-should use the @code{\\skip} command.
-" }
-% begin verbatim
+mode. In other situations, for example, when entering lyrics, using the
+@code{\\skip} command is recommended.
+
+"
+ doctitle = "Skips in lyric mode"
+} % begin verbatim
<<
\relative { a'1 a }
\new Lyrics \lyricmode { \skip 1 bla1 }
adding-an-extra-staff.ly
changing-the-staff-size.ly
use-square-bracket-at-the-start-of-a-staff-group.ly
-quoting-another-voice-with-transposition.ly
quoting-another-voice.ly
volta-multi-staff.ly
inserting-score-fragments-above-a-staff,-as-markups.ly
+quoting-another-voice-with-transposition.ly
nesting-staves.ly
non-traditional-key-signatures.ly
making-some-staff-lines-thicker-than-the-others.ly
\header {
lsrtags = "strings, template"
- texidoc = "
+
+ texidoc = "
This template demonstrates a simple string quartet. It also uses a
\\global section for time and key signatures
-" }
-% begin verbatim
+
+"
+ doctitle = "String quartet template (simple)"
+} % begin verbatim
global= {
\time 4/4
\key c \major
\header {
lsrtags = "strings, template"
- texidoc = "
+
+ texidoc = "
The \"String quartet template\" snippet produces a nice string quartet,
but what if you needed to print parts? This new template demonstrates
how to use the \\tag feature to easily split a piece into individual
Do not forget to remove specified comments when using separate files!
-" }
-% begin verbatim
+
+"
+ doctitle = "String quartet template with separate parts"
+} % begin verbatim
%%%%% piece.ly
%%%%% (This is the global definitions file)
texidoc = "A table of contents is included using
@code{\\markuplines \\table-of-contents}. The TOC items are added with
the @code{\\tocItem} command."
-}
-% begin verbatim
+} % begin verbatim
+
#(set-default-paper-size "a6")
\book {
piano-template-with-centered-dynamics.ly
single-staff-template-with-notes-and-lyrics.ly
single-staff-template-with-only-notes.ly
-jazz-combo-template.ly
+piano-template-with-centered-lyrics.ly
score-for-diatonic-accordion.ly
piano-template-simple.ly
-ancient-notation-template----modern-transcription-of-mensural-music.ly
+string-quartet-template-with-separate-parts.ly
ancient-notation-template----modern-transcription-of-gregorian-music.ly
-single-staff-template-with-notes-and-chords.ly
+ancient-notation-template----modern-transcription-of-mensural-music.ly
+piano-template-with-melody-and-lyrics.ly
string-quartet-template-simple.ly
single-staff-template-with-notes,-lyrics,-and-chords.ly
-piano-template-with-melody-and-lyrics.ly
-string-quartet-template-with-separate-parts.ly
-vocal-ensemble-template.ly
+single-staff-template-with-notes-and-chords.ly
vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
-piano-template-with-centered-lyrics.ly
+jazz-combo-template.ly
+vocal-ensemble-template.ly
vocal-ensemble-template-with-automatic-piano-reduction.ly
creating-text-spanners.ly
creating-real-parenthesized-dynamics.ly
+ottava-text.ly
+embedding-native-postscript-in-a--markup-block.ly
center-text-below-hairpin-dynamics.ly
demonstrating-all-headers.ly
printing-marks-at-the-end-of-a-line-or-a-score.ly
changing-the-default-text-font-family.ly
-combining-two-parts-on-the-same-staff.ly
+how-to-put-ties-between-syllables-in-lyrics.ly
aligning-and-centering-instrument-names.ly
outputting-the-version-number.ly
formatting-lyrics-syllables.ly
-how-to-put-ties-between-syllables-in-lyrics.ly
+combining-two-parts-on-the-same-staff.ly
combining-dynamics-with-markup-texts.ly
vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
aligning-marks-with-various-notation-objects.ly
markup-lines.ly
-printing-marks-on-every-staff.ly
-three-sided-box.ly
piano-template-with-centered-lyrics.ly
+three-sided-box.ly
utf-8.ly
blanking-staff-lines-using-the--whiteout-command.ly
-ottava-text.ly
+printing-marks-on-every-staff.ly
adjusting-lyrics-vertical-spacing.ly
aligning-lyrics.ly
\header {
lsrtags = "rhythms, text"
- texidoc = "
+
+ texidoc = "
This example shows how to add a markup command to get a three sided box
around some text (or other markup).
-" }
-% begin verbatim
+
+"
+ doctitle = "Three-sided box"
+} % begin verbatim
% New command to add a three sided box, with sides north, west and south
% Based on the box-stencil command defined in scm/stencil.scm
% Note that you use ";" to comment a line in Scheme
\header {
lsrtags = "staff-notation, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
You may put the time signature in parentheses.
-" }
-% begin verbatim
+
+"
+ doctitle = "Time signature in parentheses"
+} % begin verbatim
tsMarkup = \markup {
\override #'(baseline-skip . 2) \number {
\bracket \column { "2" "4" }
\header {
lsrtags = "ancient-notation, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
As a workaround to get real incipits which are independent from the
main score these are included as a markup into the field normally used
for the instrument name. As for now lyrics can only be added as a
direct markup. It doesn't unfortunately conform with the spacing of the
main lyrics.
-" }
-% begin verbatim
+
+"
+ doctitle = "Transcription of Ancient music with incipit"
+} % begin verbatim
global = {
\set Score.skipBars = ##t
\key g \major
C flat (-> B), F flat (-> E) and B sharp (-> C)\".
In this manner, the most natural enharmonic notes are chosen.
-"}
-% begin verbatim
+"} % begin verbatim
+
#(define (naturalize-pitch p)
(let* ((o (ly:pitch-octave p))
(a (* 4 (ly:pitch-alteration p)))
\header {
lsrtags = "pitches, staff-notation, tweaks-and-overrides"
- texidoc = "
+
+ texidoc = "
The command @code{\\clef \"treble_8\"} is equivalent to setting
-@code{clefGlyph}, @code{clefPosition} (which controls the Y-position of
-the clef), @code{middleCPosition} and @code{clefOctavation}. A clef is
-printed when any of these properties are changed.
+@code{clefGlyph}, @code{clefPosition} (which controls the vertical
+position of the clef), @code{middleCPosition} and
+@code{clefOctavation}. A clef is printed when any of the properties
+except @code{middleCPosition} are changed.
Note that changing the glyph, the position of the clef, or the
-octavation, does not in itself change the position of subsequent notes
+octavation does not in itself change the position of subsequent notes
on the staff: the position of middle C must also be specified to do
this. The positional parameters are relative to the staff center line,
positive numbers displacing upwards, counting one for each line and
properties manually. On the first line, the manual changes preserve the
standard relative positioning of clefs and notes, whereas on the second
line, they do not.
-" }
-% begin verbatim
+
+"
+ doctitle = "Tweaking clef properties"
+} % begin verbatim
{
% The default treble clef
c'1
display-bracket-with-only-one-staff-in-a-system.ly
-rhythmic-slashes.ly
+time-signature-in-parentheses.ly
changing-the-default-text-font-family.ly
drawing-boxes-around-grobs.ly
manually-controlling-beam-positions.ly
creating-text-spanners.ly
caesura-railtracks-with-fermata.ly
changing-form-of-multi--measure-rests.ly
-time-signature-in-parentheses.ly
+rhythmic-slashes.ly
changing-a-single-notes-size-in-a-chord.ly
nesting-staves.ly
\header {
lsrtags = "staff-notation, contexts-and-engravers"
- texidoc = "
+
+ texidoc = "
The system start delimiter @code{SystemStartSquare} can be used by
setting it explicitly in a @code{StaffGroup} or @code{ChoirStaffGroup}
context.
-" }
-% begin verbatim
+
+"
+ doctitle = "Use square bracket at the start of a staff group"
+} % begin verbatim
\score {
\new StaffGroup { <<
\set StaffGroup.systemStartDelimiter = #'SystemStartSquare
With the @code{\tweak} command, you can tune every grob directly. Here
are some examples of available tweaks.
"
-}
-% begin verbatim
+} % begin verbatim
+
{
\set fingeringOrientations = #'(right)
<
\header {
lsrtags = "rhythms"
- texidoc = "
+
+ texidoc = "
Ties are sometimes used to write out arpeggios. In this case, two tied
notes need not be consecutive. This can be achieved by setting the
-@code{tieWaitForNote} property to true. The same feature is also
+@code{tieWaitForNote} property to \"true\". The same feature is also
useful, for example, to tie a tremolo to a chord, but in principle, it
can also be used for ordinary consecutive notes, as demonstrated in
this example.
-" }
-% begin verbatim
+
+"
+ doctitle = "Using ties with arpeggios"
+} % begin verbatim
\relative c' {
\set tieWaitForNote = ##t
\grace { c16[~ e~ g]~ } <c, e g>2
"
-}
-% begin verbatim
+} % begin verbatim
+
% end verbatim - this comment is a hack to prevent texinfo.tex
% from choking on non-European UTF-8 subsets
% Cyrillic font
\header {
lsrtags = "vocal-music, tweaks-and-overrides, spacing"
- texidoc = "
+
+ texidoc = "
This snippet shows of to use the @code{alignBelowContext} and
@code{alignAboveContext} properties, which may be needed for text
elements (e.g. lyrics) positioning, but also for musical contents such
as ossias.
-" }
-% begin verbatim
+
+"
+ doctitle = "Vertically aligning ossias and lyrics"
+} % begin verbatim
\paper {
ragged-right = ##t
}
\header {
lsrtags = "tweaks-and-overrides, spacing"
- texidoc = "
+
+ texidoc = "
By setting the @code{Y-extent} property to a fixed value, all
@code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
aligned to a common reference point, regardless of their actual extent.
trick is only applied on the second line).
The same idea is used to align the text scripts along their baseline.
-" }
-% begin verbatim
+
+"
+ doctitle = "Vertically centered dynamics and textscripts"
+} % begin verbatim
music = \relative c'' {
c2\p^\markup { "gorgeous" } c\f^\markup { "fantastic" }
c4\p c\f\> c c\!\p
\header {
lsrtags = "vocal-music, piano-music, template"
- texidoc = "
+
+ texidoc = "
This template adds an automatic piano reduction to the standard SATB
vocal score demonstrated in \"Vocal ensemble template\". This
demonstrates one of the strengths of LilyPond – you can use a music
definition more than once. If you make any changes to the vocal notes
(say, tenorMusic), then the changes will also apply to the piano
reduction.
-" }
-% begin verbatim
+
+"
+ doctitle = "Vocal ensemble template with automatic piano reduction"
+} % begin verbatim
global = {
\key c \major
\time 4/4
\header {
lsrtags = "text, vocal-music, contexts-and-engravers, template"
- texidoc = "
+
+ texidoc = "
This template is basically the same as the simple \"Vocal ensemble\"
template, with the exception that here all the lyrics lines are placed
using @code{alignAboveContext} and @code{alignBelowContext}.
-" }
-% begin verbatim
+
+"
+ doctitle = "Vocal ensemble template with lyrics aligned below and above the staves"
+} % begin verbatim
global = {
\key c \major
\time 4/4
\header {
lsrtags = "vocal-music, template"
- texidoc = "
+
+ texidoc = "
Here is a standard four-part SATB vocal score. With larger ensembles,
it's often useful to include a section which is included in all parts.
For example, the time signature and key signatures are almost always
the same for all parts. Like in the \"Hymn\" template, the four voices
are regrouped on only two staves.
-" }
-% begin verbatim
+
+"
+ doctitle = "Vocal ensemble template"
+} % begin verbatim
global = {
\key c \major
\time 4/4
single-staff-template-with-notes-and-lyrics.ly
adding-ambitus-per-voice.ly
skips-in-lyric-mode-2.ly
-skips-in-lyric-mode.ly
vocal-ensemble-template-with-automatic-piano-reduction.ly
-ambitus-with-multiple-voices.ly
-how-to-put-ties-between-syllables-in-lyrics.ly
-vertically-aligning-ossias-and-lyrics.ly
vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
+how-to-put-ties-between-syllables-in-lyrics.ly
+piano-template-with-melody-and-lyrics.ly
single-staff-template-with-notes,-lyrics,-and-chords.ly
+ambitus-with-multiple-voices.ly
+demo-midiinstruments.ly
formatting-lyrics-syllables.ly
-piano-template-with-melody-and-lyrics.ly
+vertically-aligning-ossias-and-lyrics.ly
aligning-lyrics.ly
vocal-ensemble-template.ly
adjusting-lyrics-vertical-spacing.ly
-demo-midiinstruments.ly
+skips-in-lyric-mode.ly
lsrtags = "repeats,staff-notation"
texidoc = "By adding @code{Volta_engraver}, repeat brackets
can be put over staves other than the topmost one in a score."
-}
-% begin verbatim
+} % begin verbatim
+
vmus = \relative c'' {
\repeat volta 2 c1 \alternative { d e }
}