<ul>
<li>
<a class="title"
-href="user/lilypond-learning/index.html">Learning manual</a>
+href="user/lilypond-learning/index.html">Learning Manual (LM)</a>
<br>(start here)
- <li><a class="title" href="user/music-glossary/index.html">Music glossary</a>
+ <li><a class="title"
+href="user/music-glossary/index.html">Music Glossary (MG)</a>
(in <a class="title" href="user/music-glossary-big-page.html">one big page</a> ~ 1 Mb,
in <a class="title" href="user/music-glossary.pdf">PDF</a>)
<ul>
<li>
-<a class="title" href="user/lilypond/index.html">Notation reference</a>
+<a class="title" href="user/lilypond/index.html">Notation
+Reference (NR)</a>
(in <a class="title" href="user/lilypond-big-page.html">one big page</a> ~ 4 Mb,
in <a class="title" href="user/lilypond.pdf">PDF</a>)
<br>(writing music in LilyPond)
<li>
- <a class="title" href="user/lilypond-internals/index.html">Program reference</a>
+ <a class="title"
+href="user/lilypond-internals/index.html">Internals Reference (IR)</a>
(in <a class="title" href="user/lilypond-internals-big-page.html">one big page</a> ~ 1 Mb)
<br>(definitions for tweaking)
<ul>
<li>
- <a class="title" href="user/lilypond-program/index.html">Program usage</a>
+ <a class="title"
+href="user/lilypond-program/index.html">Application Usage (AU)</a>
(in <a class="title" href="user/lilypond-program-big-page.html">one big page</a>,
in <a class="title" href="user/lilypond-program.pdf">PDF</a>)
<br>(how to install and run the program)
LATEX_FILES =$(call src-wildcard,*.latex)
-EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES) README.txt $(EPS_ILLUSTRATIONS)
+EXTRA_DIST_FILES = $(LATEX_FILES) $(IMAGES) $(EPS_ILLUSTRATIONS)
+EXTRA_DIST_FILES += README.txt writing-texinfo.txt policy.txt
IMAGES=$(call src-wildcard,*.png)
EPS_ILLUSTRATIONS=context-example.eps
@echo " (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
@echo "or add something like that to the postinstall script."
@echo
-else
+else # installing directly into standard /usr/...
-$(INSTALL) -d $(DESTDIR)$(package_infodir)
-install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
-install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
-install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
install-info --info-dir=$(infodir) $(outdir)/lilypond.info
(cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
-endif
+endif # installing directly into standard /usr/...
local-uninstall-WWW:
rm -f $(package_infodir)/*.png
-else
+else # out!=www
# Cancel the default info generation rule that generates images:
$(outdir)/%.info: # $(outdir)/%.texi
@echo
@echo "and read the extra instructions."
@echo
-else
+else # installing directly into standard /usr/...
-$(INSTALL) -d $(DESTDIR)$(package_infodir)
-install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
-install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
@echo
@echo " make out=www install-info "
@echo
-endif
+endif # installing into standard /usr/* root# installing into /usr/...
-
-endif
+endif # out!=www
# All web targets, except info image symlinks and info docs are
# installed in non-recursing target from TOP-SRC-DIR
$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
-
-
#
# The split internals reference
#
%%%%% GENERAL POLICY
-See policy.txt
+Formatting: writing-texinfo.txt
+General policy: policy.txt
%%%%% UPDATING DOCS
@ref{Figured bass}
@end itemize
-Here are all subtopics at a glance:
+@c Here are all subtopics at a glance:
@menu
-* Ancient TODO::
+* Alternative note signs for ancient music::
+* Additional note signs for ancient music::
+* Pre-defined contexts::
+* Musica ficta accidentals::
+* Figured bass::
@end menu
-@node Ancient TODO
-@subsection Ancient TODO
-
-
+@node Alternative note signs for ancient music
+@subsection Alternative note signs for ancient music
@menu
* Ancient note heads::
* Ancient clefs::
* Ancient flags::
* Ancient time signatures::
-* Ancient articulations::
-* Custodes::
-* Divisiones::
-* Ligatures::
-* White mensural ligatures::
-* Gregorian square neumes ligatures::
-* Gregorian Chant contexts::
-* Mensural contexts::
-* Musica ficta accidentals::
-* Figured bass::
@end menu
@node Ancient note heads
accidentals. @ref{Key signature}, gives a general introduction of
the use of key signatures.
-Program reference: @internalsref{KeySignature}.
+Internals Reference: @internalsref{KeySignature}.
Examples: @lsrdir{ancient}
The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
addressable with @code{\time}. Use a @code{\markup} instead
+
+@node Additional note signs for ancient music
+@subsection Additional note signs for ancient music
+
+@menu
+* Ancient articulations::
+* Custodes::
+* Divisiones::
+* Ligatures::
+* White mensural ligatures::
+* Gregorian square neumes ligatures::
+@end menu
+
+
@node Ancient articulations
@unnumberedsubsubsec Ancient articulations
@seealso
-Program reference: @internalsref{Custos}.
+Internals Reference: @internalsref{Custos}.
Examples:
@lsr{ancient,custodes@/.ly}.
In this manual: @ref{Breath marks}.
-Program reference: @internalsref{BreathingSign}.
+Internals Reference: @internalsref{BreathingSign}.
Examples: @lsr{expressive,breathing-sign.ly}.
unary music function, such that @code{\augmentum} can be intermixed
with head prefixes in arbitrary order.
+
+@node Pre-defined contexts
+@subsection Pre-defined contexts
+
+@menu
+* Gregorian Chant contexts::
+* Mensural contexts::
+@end menu
+
+
@node Gregorian Chant contexts
@unnumberedsubsubsec Gregorian Chant contexts
@end lilypond
@node Musica ficta accidentals
-@unnumberedsubsubsec Musica ficta accidentals
+@subsection Musica ficta accidentals
In European music from before about 1600, singers were often
expected to chromatically alter notes at their own initiative.
@seealso
-Program reference: @internalsref{Accidental_engraver} engraver and
+Internals Reference: @internalsref{Accidental_engraver} engraver and
the @internalsref{AccidentalSuggestion} object.
@node Figured bass
-@unnumberedsubsubsec Figured bass
+@subsection Figured bass
@cindex Basso continuo
@seealso
-Program reference: @internalsref{NewBassFigure},
+Internals Reference: @internalsref{NewBassFigure},
@internalsref{BassFigureAlignment}, @internalsref{BassFigureLine},
@internalsref{BassFigureBracket}, and
@internalsref{BassFigureContinuation} objects and
particular effect.
-@cindex Program reference
+@cindex Internals Reference
The controls available for tuning are described in a separate
document, the
@iftex
-Program reference manual.
+Internals Reference manual.
@end iftex
@ifnottex
-@ref{Top,Program reference,,lilypond-internals}.
+@ref{Top,Internals Reference,,lilypond-internals}.
@end ifnottex
That manual
lists all different variables, functions and options available in
@internalsref{Engravers}.
@end ifhtml
@ifnothtml
-Program reference @expansion{} Translation @expansion{} Engravers.
+Internals Reference @expansion{} Translation @expansion{} Engravers.
@end ifnothtml
Every context described in
@ifhtml
@internalsref{Contexts}
@end ifhtml
@ifnothtml
-Program reference @expansion{} Translation @expansion{} Context.
+Internals Reference @expansion{} Translation @expansion{} Context.
@end ifnothtml
lists the engravers used for that context.
@quotation
@seealso
-Program reference: @internalsref{Fingering}.
+Internals Reference: @internalsref{Fingering}.
@end quotation
@noindent
As you can see, the @code{Fingering} object is nothing more than a
-bunch of variable settings, and the webpage in the Program Reference
+bunch of variable settings, and the webpage in the Internals Reference
is directly generated from this definition.
version that you are working on. See TRANSLATION for details.
@end ignore
-@node Educational use
-@section Educational use
+@node Editorial annotations
+@section Editorial annotations
@menu
-* Note heads::
* Inside the staff::
* Outside the staff::
@end menu
-@node Note heads
-@subsection Note heads
-
-@menu
-* Easy notation note heads::
-* Shape note heads::
-* Improvisation::
-* Special noteheads::
-@end menu
-
-@node Easy notation note heads
-@unnumberedsubsubsec Easy notation note heads
-
-@cindex note heads, practice
-@cindex note heads, easy notation
-@cindex easy notation
-@cindex Hal Leonard
-
-The @q{easy play} note head includes a note name inside the head.
-It is used in music for beginners
-
-@lilypond[quote,ragged-right,verbatim,fragment,staffsize=26]
- \setEasyHeads
- c'2 e'4 f' | g'1
-@end lilypond
-
-The command @code{\setEasyHeads} overrides settings for the
-@internalsref{NoteHead} object. To make the letters readable, it
-has to be printed in a large font size. To print with a larger
-font, see @ref{Setting the staff size}.
-
-@refcommands
-
-@funindex \setEasyHeads
-@code{\setEasyHeads}
-
-
-@node Shape note heads
-@unnumberedsubsubsec Shape note heads
-
-@cindex note heads, shape
-
-In shape note head notation, the shape of the note head
-corresponds to the harmonic function of a note in the scale. This
-notation was popular in the 19th century American song books.
-
-Shape note heads can be produced by setting @code{\aikenHeads} or
-@code{\sacredHarpHeads}, depending on the style desired.
-
-@lilypond[verbatim,relative=1,fragment]
- \aikenHeads
- c8 d4 e8 a2 g1
- \sacredHarpHeads
- c8 d4. e8 a2 g1
-@end lilypond
-
-Shapes are determined on the step in the scale, where the base of
-the scale is determined by the @code{\key} command
-
-@funindex \key
-@funindex shapeNoteStyles
-@funindex \aikenHeads
-@funindex \sacredHarpHeads
-
-Shape note heads are implemented through the
-@code{shapeNoteStyles} property. Its value is a vector of
-symbols. The k-th element indicates the style to use for the k-th
-step of the scale. Arbitrary combinations are possible, e.g.
-
-@lilypond[verbatim,relative=1,fragment]
-\set shapeNoteStyles =
- ##(cross triangle fa #f mensural xcircle diamond)
-c8 d4. e8 a2 g1
-@end lilypond
-
-
-@node Improvisation
-@unnumberedsubsubsec Improvisation
-
-Improvisation is sometimes denoted with slashed note heads. Such
-note heads can be created by adding a
-@internalsref{Pitch_squash_engraver} to the @internalsref{Voice}
-context. Then, the following command
-
-@example
-\set squashedPosition = #0
-\override NoteHead #'style = #'slash
-@end example
-
-@noindent
-switches on the slashes.
-
-There are shortcuts @code{\improvisationOn} (and an accompanying
-@code{\improvisationOff}) for this command sequence. They are
-used in the following example
-
-@lilypond[verbatim,ragged-right,quote]
-\new Voice \with {
- \consists Pitch_squash_engraver
-} \transpose c c' {
- e8 e g a a16(bes)(a8) g \improvisationOn
- e8
- ~e2~e8 f4 fis8
- ~fis2 \improvisationOff a16(bes) a8 g e
-}
-@end lilypond
-
-
-@node Special noteheads
-@unnumberedsubsubsec Special noteheads
-
-@cindex note heads, special
-
-Different noteheads are used by various instruments for various
-meanings -- crosses are used for @q{parlato} with vocalists,
-stopped notes on guitar; diamonds are used for harmonics on string
-instruments, etc. There is a shorthand (@code{\harmonic}) for
-diamond shapes; the other notehead styles are produced by tweaking
-the property
-
-@lilypond[ragged-right,relative=1,fragment,verbatim,quote]
-c4 d
-\override NoteHead #'style = #'cross
-e f
-\revert NoteHead #'style
-e d <c f\harmonic> <d a'\harmonic>
-@end lilypond
-
-@noindent
-To see all notehead styles, please see @ref{Note head styles}.
-
-
-@seealso
-
-Program reference: @internalsref{NoteHead}.
-
-
-
@node Inside the staff
@subsection Inside the staff
* Hidden notes::
* Coloring objects::
* Parentheses::
-* Ambitus::
* Stems::
@end menu
@seealso
-Program reference: @internalsref{Fingering}.
+Internals Reference: @internalsref{Fingering}.
Examples: @lsr{expressive,fingering-chords.ly}
@end example
-@node Ambitus
-@unnumberedsubsubsec Ambitus
-@cindex ambitus
-
-The term @emph{ambitus} denotes a range of pitches for a given
-voice in a part of music. It may also denote the pitch range that
-a musical instrument is capable of playing. Ambits are printed on
-vocal parts, so performers can easily determine it meets their
-capabilities.
-
-Ambits are denoted at the beginning of a piece near the initial
-clef. The range is graphically specified by two note heads that
-represent the minimum and maximum pitch. To print such ambits,
-add the @internalsref{Ambitus_engraver} to the
-@internalsref{Voice} context, for example,
-
-@example
-\layout @{
- \context @{
- \Voice
- \consists Ambitus_engraver
- @}
-@}
-@end example
-
-This results in the following output
-
-@lilypond[quote,ragged-right]
-\layout {
- \context {
- \Staff
- \consists Ambitus_engraver
- }
-}
-
-\relative \new Staff {
- as'' c e2 cis,2
-}
-@end lilypond
-
-If you have multiple voices in a single staff and you want a
-single ambitus per staff rather than per each voice, add the
-@internalsref{Ambitus_engraver} to the @internalsref{Staff}
-context rather than to the @internalsref{Voice} context. Here is
-an example,
-
-@lilypond[verbatim,ragged-right,quote]
-\new Staff \with {
- \consists "Ambitus_engraver"
-}
-<<
- \new Voice \with {
- \remove "Ambitus_engraver"
- } \relative c'' {
- \override Ambitus #'X-offset = #-1.0
- \voiceOne
- c4 a d e f2
- }
- \new Voice \with {
- \remove "Ambitus_engraver"
- } \relative c' {
- \voiceTwo
- es4 f g as b2
- }
->>
-@end lilypond
-
-@noindent
-This example uses one advanced feature,
-
-@example
-\override Ambitus #'X-offset = #-1.0
-@end example
-
-@noindent
-This code moves the ambitus to the left. The same effect could
-have been achieved with @code{extra-offset}, but then the
-formatting system would not reserve space for the moved object.
-
-@seealso
-
-Program reference: @internalsref{Ambitus},
-@internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
-@internalsref{AmbitusAccidental}.
-
-Examples:
-@lsr{vocal,ambitus@/.ly}.
-
-@refbugs
-
-There is no collision handling in the case of multiple per-voice
-ambitus.
-
-
@node Stems
@unnumberedsubsubsec Stems
* Balloon help::
* Grid lines::
* Blank music sheet::
+* Analysis brackets::
@end menu
@node Balloon help
@seealso
-Program reference: @internalsref{text-balloon-interface}.
+Internals Reference: @internalsref{text-balloon-interface}.
@node Grid lines
@end lilypond
+@node Analysis brackets
+@unnumberedsubsubsec Analysis brackets
+
+@cindex brackets
+@cindex phrasing brackets
+@cindex musicological analysis
+@cindex note grouping bracket
+
+Brackets are used in musical analysis to indicate structure in
+musical pieces. LilyPond supports a simple form of nested
+horizontal brackets. To use this, add the
+@internalsref{Horizontal_bracket_engraver} to the
+@internalsref{Staff} context. A bracket is started with
+@code{\startGroup} and closed with @code{\stopGroup}.
+
+@lilypond[quote,ragged-right,verbatim]
+\score {
+ \relative c'' {
+ c4\startGroup\startGroup
+ c4\stopGroup
+ c4\startGroup
+ c4\stopGroup\stopGroup
+ }
+ \layout {
+ \context {
+ \Staff \consists "Horizontal_bracket_engraver"
+}}}
+@end lilypond
+
+@seealso
+
+Internals Reference: @internalsref{HorizontalBracket}.
+
their output are:
@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-\override TextScript #'font-family = #'typewriter
-\override TextScript #'font-shape = #'upright
-c''4-._"c-."
-c''4--_"c--"
-c''4-+_"c-+"
-c''4-|_"c-|"
-c''4->_"c->"
-c''4-^_"c-^"
-c''4-__"c-_"
+c4-. c-- c-+ c-|
+c-> c-^ c-_
@end lilypond
The marks are automatically placed, but the direction can be
articulations. For the shorthands, the dash itself should be
omitted; the shorthand signs replace it:
-@lilypond[quote,ragged-right,fragment,verbatim]
-c''4^^ c''4_^
+@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
+c4^^ c4_^
c\fermata c^\fermata c_\fermata
@end lilypond
@seealso
-Program reference: @internalsref{Script}.
+Internals Reference: @internalsref{Script}.
@refbugs
@seealso
-Program reference: @internalsref{DynamicText},
+Internals Reference: @internalsref{DynamicText},
@internalsref{Hairpin}. Vertical positioning of these symbols is
handled by @internalsref{DynamicLineSpanner}.
Glossary: @rglos{Hairpin}, @rglos{crescendo}, @rglos{decrescendo}
+@c TODO: add link to LM directions
+
@node Curves
@subsection Curves
@menu
-* Ties::
* Slurs::
* Phrasing slurs::
* Breath marks::
* Falls and doits::
@end menu
-@node Ties
-@unnumberedsubsubsec Ties
-
-@cindex tie
-@funindex ~
-
-A tie connects two adjacent note heads of the same pitch. The tie
-in effect extends the length of a note.
-
-@warning{Ties should not be confused with @emph{slurs}, which
-indicate articulation, or @emph{phrasing slurs}, which indicate
-musical phrasing. A tie is just a way of extending a note
-duration, similar to the augmentation dot.}
-
-A tie is entered using the tilde symbol @code{~}
-
-@lilypond[quote,ragged-right,fragment,verbatim]
-e' ~ e'
-@end lilypond
-
-
-@noindent
-Ties are used either when the note crosses a bar line, or when
-dots cannot be used to denote the rhythm. Ties should also be
-used when note values cross larger subdivisions of the measure:
-
-@lilypond[fragment,quote,ragged-right]
-\relative {
- r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
-}
-@end lilypond
-
-If you need to tie a lot of notes over bars, it may be easier to
-use automatic note splitting (see @ref{Automatic note splitting}).
-This mechanism automatically splits long notes, and ties them
-across bar lines.
-
-@funindex \repeatTie
-@cindex repeating ties
-@cindex volta brackets and ties
-
-When a tie is applied to a chord, all note heads whose pitches
-match are connected. When no note heads match, no ties will be
-created. Chords may be partially tied by placing the tie inside
-the chord.
-
-@lilypond[quote,ragged-right,fragment,verbatim,relative=1]
- <c e g> ~ <c e g>
-<c~ e g~ b> <c e g b>
-@end lilypond
-
-When a second alternative of a repeat starts with a tied note, you
-have to repeat the tie. This can be achieved with
-@code{\repeatTie},
-
-@lilypond[fragment,quote,ragged-right,relative=2]
-\repeat volta 2 { c g <c e>2 ~ }
-\alternative {{ <c e>2. r4 } {<c e>2\repeatTie d4 c }}
-@end lilypond
-
-@cindex Laissez vibrer
-@cindex Ties, laissez vibrer
-
-@notation{L.v.} ties (@notation{laissez vibrer}) indicate that
-notes must not be damped at the end. It is used in notation for
-piano, harp and other string and percussion instruments. They can
-be entered using @code{\laissezVibrer}:
-
-@lilypond[fragment,ragged-right,verbatim,relative=1]
-<c f g>\laissezVibrer
-@end lilypond
-
-The direction of a tie can be specified with @code{\tieUp} or
-@code{\tieDown} (see example below). @code{\tieNeutral} reverts
-to the default behaviour again.
-
-However, as with other music elements of this kind, there is a
-convenient shorthand for forcing tie directions. By adding
-@code{_} or @code{^} before the tilde, the direction is also set:
-
-@lilypond[relative=2,ragged-right,quote,verbatim,fragment]
-c4_~ c c^~ c)
-@end lilypond
-
-
-@seealso
-
-Program reference:
-@internalsref{LaissezVibrerTie}
-@internalsref{LaissezVibrerTieColumn}
-
-Example files:
-@lsr{connecting,laissez-vibrer-ties.ly}
-
-
-@commonprop
-
-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 useful, for example, to tie a tremolo to a chord,
-but in principle, it can also be used for ordinary, consecutive
-notes:
-
-@lilypond[fragment,verbatim,relative=1,ragged-right,quote]
-\set tieWaitForNote = ##t
-\grace { c16[~ e~ g]~ } <c, e g>2
-\repeat tremolo 8 { c32~ c'~ } <c c,>1
-e8~ c~ a~ f~ <e' c a f>2
-\tieUp c8~ a \tieDown \tieDotted g~ c g2
-@end lilypond
-
-Ties may be engraved manually by changing the
-@code{tie-configuration} property. 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).
-
-@lilypond[fragment,verbatim,relative=1,ragged-right,quote]
-<c e g>2~ <c e g> |
-\override TieColumn #'tie-configuration =
- #'((0.0 . 1) (-2.0 . 1) (-4.0 . 1))
-<c e g>~ <c e g> |
-@end lilypond
-
-
-@refcommands
-
-
-@funindex \tieUp
-@code{\tieUp},
-@funindex \tieDown
-@code{\tieDown},
-@funindex \tieNeutral
-@code{\tieNeutral},
-@funindex \tieDotted
-@code{\tieDotted},
-@funindex \tieDashed
-@code{\tieDashed},
-@funindex \tieSolid
-@code{\tieSolid}.
-
-
-@seealso
-
-In this manual: @ref{Automatic note splitting}.
-
-Program reference: @internalsref{Tie}.
-
-
-@refbugs
-
-Switching staves when a tie is active will not produce a slanted
-tie.
-
-Changing clefs or octavations during a tie is not really
-well-defined. In these cases, a slur may be preferable.
-
-
@node Slurs
@unnumberedsubsubsec Slurs
@seealso
-Program reference: @internalsref{Slur}.
+Internals Reference: @internalsref{Slur}.
@node Phrasing slurs
@seealso
-Program reference: @internalsref{PhrasingSlur}.
+Internals Reference: @internalsref{PhrasingSlur}.
@node Breath marks
@seealso
-Program reference: @internalsref{BreathingSign}.
+Internals Reference: @internalsref{BreathingSign}.
Examples: @lsr{expressive,breathing-sign.ly}
* Glissando::
* Arpeggio::
* Trills::
-* Analysis brackets::
@end menu
@node Glissando
@seealso
-Program reference: @internalsref{Glissando}.
+Internals Reference: @internalsref{Glissando}.
Glossary: @rglos{falls}, @rglos{doits}
Example files:
Notation manual: @ref{Ties}, for writing out arpeggios.
-Program reference: @internalsref{Arpeggio}.
+Internals Reference: @internalsref{Arpeggio}.
@refbugs
@seealso
-Program reference: @internalsref{TrillSpanner}.
-
-
-@node Analysis brackets
-@unnumberedsubsubsec Analysis brackets
-
-@cindex brackets
-@cindex phrasing brackets
-@cindex musicological analysis
-@cindex note grouping bracket
-
-Brackets are used in musical analysis to indicate structure in
-musical pieces. LilyPond supports a simple form of nested
-horizontal brackets. To use this, add the
-@internalsref{Horizontal_bracket_engraver} to the
-@internalsref{Staff} context. A bracket is started with
-@code{\startGroup} and closed with @code{\stopGroup}.
-
-@lilypond[quote,ragged-right,verbatim]
-\score {
- \relative c'' {
- c4\startGroup\startGroup
- c4\stopGroup
- c4\startGroup
- c4\stopGroup\stopGroup
- }
- \layout {
- \context {
- \Staff \consists "Horizontal_bracket_engraver"
-}}}
-@end lilypond
-
-@seealso
+Internals Reference: @internalsref{TrillSpanner}.
-Program reference: @internalsref{HorizontalBracket}.
-
@c -*- coding: utf-8; mode: texinfo; -*-
@c This file is part of lilypond-learning.tely
@menu
* Introduction to the LilyPond file structure::
* Score is a (single) compound musical expression::
+* Expressions can be nested after the beginning::
@end menu
@node Introduction to the LilyPond file structure
on the same horizontal position in your text editor.
+@node Expressions can be nested after the beginning
+@subsection Expressions can be nested after the beginning
+
+TODO: this title is teh suck. :(
+
+@lilypond[verbatim,quote,ragged-right]
+\score {
+ <<
+ \new Staff \relative c''{ c1 c c c c }
+ \new StaffGroup \relative c''{
+ \new Staff
+ c1 c
+ << c1 \new Staff { c1 } >>
+ c
+ }
+ >>
+ \layout {
+
+ \context{
+ \Score
+
+ }
+ }
+}
+@end lilypond
+
+
@node Voices contain music
@section Voices contain music
@menu
* On the un-nestedness of brackets and ties::
* Up and down::
-* Distances and measurements::
+* Distances and measurements MAYBE MOVE::
@end menu
@c my name start sucking the more docs I write. -gp
@end verbatim
-@node Distances and measurements
-@subsection Distances and measurements
+@node Distances and measurements MAYBE MOVE
+@subsection Distances and measurements MAYBE MOVE
-DISCUSS
+DISCUSS after working on other sections.
TODO: staff spaces, #UP #DOWN #LEFT #RIGHT. Maybe move into tweaks?
@end menu
@node Soprano and cello
-@unnumberedsubsec Soprano and cello
+@subsection Soprano and cello
Start off with the template that seems closest to what you want to end
up with. Let's say that you want to write something for soprano and
@node TODO another example of extending templates
-@unnumberedsubsec TODO another example of extending templates
+@subsection TODO another example of extending templates
TODO: somebody else fill this in. You guys like vocal stuff,
right? Get to it. :) -gp
@section Scores and parts
TODO: this is really old stuff from the really old tutorial.
-Rewrite, fix, etc. -gp
+Rewrite, fix, etc. Or maybe delete entirely. -gp
In orchestral music, all notes are printed twice. Once in a part for
the musicians, and once in a full score for the conductor. Variables can
@seealso
-Program reference: @internalsref{StringNumber},
+Internals Reference: @internalsref{StringNumber},
@lsr{guitar/,string-number.ly}.
@seealso
-Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}.
+Internals Reference: @internalsref{TabStaff}, @internalsref{TabVoice}.
@refbugs
The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
tunings.
-Program reference: @internalsref{Tab_note_heads_engraver}.
+Internals Reference: @internalsref{Tab_note_heads_engraver}.
@refbugs
@seealso
-Program reference: @internalsref{StrokeFinger}
+Internals Reference: @internalsref{StrokeFinger}
--- /dev/null
+@c -*- coding: utf-8; mode: texinfo; -*-
+@c This file is part of lilypond.tely
+@ignore
+ Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
+
+ When revising a translation, copy the HEAD committish of the
+ version that you are working on. See TRANSLATION for details.
+@end ignore
+
+@node Input syntax
+@chapter Input syntax
+
+This section deals with general lilypond input syntax issues,
+rather than specific notation.
+
+@menu
+* Input files::
+* Common syntax issues TODO name?::
+* Other stuffs TODO move?::
+@end menu
+
+
+@node Input files
+@section Input files
+
+The main format of input for LilyPond are text files. By convention,
+these files end with @samp{.ly}.
+
+@menu
+* File structure::
+* A single music expression::
+* Multiple scores in a book::
+* Extracting fragments of notation::
+* Including LilyPond files::
+* Text encoding::
+* Different editions from one source::
+@end menu
+
+
+@node File structure
+@subsection File structure
+
+A @code{.ly} file contains any number of toplevel expressions, where a
+toplevel expression is one of the following
+
+@itemize
+@item
+An output definition, such as @code{\paper}, @code{\midi}, and
+@code{\layout}. Such a definition at the toplevel changes the default
+settings for the block entered.
+
+@item
+A direct scheme expression, such as
+@code{#(set-default-paper-size "a7" 'landscape)} or
+@code{#(ly:set-option 'point-and-click #f)}.
+
+@item
+A @code{\header} block. This sets the global header block. This
+is the block containing the definitions for book-wide settings, like
+composer, title, etc.
+
+@item
+A @code{\score} block. This score will be collected with other
+toplevel scores, and combined as a single @code{\book}.
+
+This behavior can be changed by setting the variable
+@code{toplevel-score-handler} at toplevel. The default handler is
+defined in the init file @file{scm/@/lily@/.scm}.
+
+The @code{\score} must begin with a music expression, and may
+contain only one music expression.
+
+@item
+A @code{\book} block logically combines multiple movements
+(i.e., multiple @code{\score} blocks) in one document. If there are
+a number of @code{\scores}, one output file will be created for
+each @code{\book} block, in which all corresponding movements are
+concatenated. The only reason to explicitly specify @code{\book} blocks
+in a @code{.ly} file is if you wish multiple output files from a single
+input file. One exception is within lilypond-book documents, where you
+explicitly have to add a @code{\book} block if you want more than a
+single @code{\score} or @code{\markup} in the same example.
+
+This behavior can be changed by setting the variable
+@code{toplevel-book-handler} at toplevel. The default handler is
+defined in the init file @file{scm/@/lily@/.scm}.
+
+@item
+A compound music expression, such as
+@example
+@{ c'4 d' e'2 @}
+@end example
+
+This will add the piece in a @code{\score} and format it in a
+single book together with all other toplevel @code{\score}s and music
+expressions. In other words, a file containing only the above
+music expression will be translated into
+
+@example
+\book @{
+ \score @{
+ \new Staff @{
+ \new Voice @{
+ @{ c'4 d' e'2 @}
+ @}
+ @}
+ @}
+ \layout @{ @}
+ \header @{ @}
+@}
+@end example
+
+This behavior can be changed by setting the variable
+@code{toplevel-music-handler} at toplevel. The default handler is
+defined in the init file @file{scm/@/lily@/.scm}.
+
+@item
+A markup text, a verse for example
+@example
+\markup @{
+ 2. The first line verse two.
+@}
+@end example
+
+Markup texts are rendered above, between or below the scores or music
+expressions, wherever they appear.
+
+@cindex variables
+
+@item
+An variable, such as
+@example
+foo = @{ c4 d e d @}
+@end example
+
+This can be used later on in the file by entering @code{\foo}. The
+name of an variable should have alphabetic characters only; no
+numbers, underscores or dashes.
+
+@end itemize
+
+The following example shows three things that may be entered at
+toplevel
+
+@example
+\layout @{
+ % movements are non-justified by default
+ ragged-right = ##t
+@}
+
+\header @{
+ title = "Do-re-mi"
+@}
+
+@{ c'4 d' e2 @}
+@end example
+
+
+At any point in a file, any of the following lexical instructions can
+be entered:
+
+@itemize
+@item @code{\version}
+@item @code{\include}
+@item @code{\sourcefilename}
+@item @code{\sourcefileline}
+
+@end itemize
+
+
+@node A single music expression
+@subsection A single music expression
+
+A @code{\score} must contain a single music expression. However,
+this music expression may be of any size. Recall that music
+expressions may be included inside other expressions to form
+larger expressions. All of these examples are single music
+expressions; note the curly braces @{ @} or angle brackets <<
+>> at the beginning and ending of the music.
+
+@example
+@{ c'4 c' c' c' @}
+@end example
+
+@lilypond[ragged-right,verbatim,quote]
+{
+ { c'4 c' c' c'}
+ { d'4 d' d' d'}
+}
+@end lilypond
+
+@lilypond[ragged-right,verbatim,quote]
+<<
+ \new Staff { c'4 c' c' c' }
+ \new Staff { d'4 d' d' d' }
+>>
+@end lilypond
+
+@example
+@{
+ \new GrandStaff <<
+ \new StaffGroup <<
+ \new Staff @{ \flute @}
+ \new Staff @{ \oboe @}
+ >>
+ \new StaffGroup <<
+ \new Staff @{ \violinI @}
+ \new Staff @{ \violinII @}
+ >>
+ >>
+@}
+@end example
+
+
+@node Multiple scores in a book
+@subsection Multiple scores in a book
+
+@funindex \book
+@cindex movements, multiple
+
+A document may contain multiple pieces of music and texts. Examples
+of these are an etude book, or an orchestral part with multiple
+movements. Each movement is entered with a @code{\score} block,
+
+@example
+\score @{
+ @var{..music..}
+@}
+@end example
+
+and texts are entered with a @code{\markup} block,
+
+@example
+\markup @{
+ @var{..text..}
+@}
+@end example
+
+@funindex \book
+
+All the movements and texts which appear in the same @code{.ly} file
+will normally be typeset in the form of a single output file.
+
+@example
+\score @{
+ @var{..}
+@}
+\markup @{
+ @var{..}
+@}
+\score @{
+ @var{..}
+@}
+@end example
+
+However, if you want multiple output files from the same @code{.ly}
+file, then you can add multiple @code{\book} blocks, where each such
+@code{\book} block will result in a separate output. If you do not
+specify any @code{\book} block in the file, LilyPond will implicitly
+treat the full file as a single @code{\book} block, see @ref{File
+structure}. One important exception is within lilypond-book documents,
+where you explicitly have to add a @code{\book} block, otherwise only
+the first @code{\score} or @code{\markup} will appear in the output.
+
+The header for each piece of music can be put inside the @code{\score}
+block. The @code{piece} name from the header will be printed before
+each movement. The title for the entire book can be put inside the
+@code{\book}, but if it is not present, the @code{\header} which is at
+the top of the file is inserted.
+
+@example
+\header @{
+ title = "Eight miniatures"
+ composer = "Igor Stravinsky"
+@}
+\score @{
+ @dots{}
+ \header @{ piece = "Romanze" @}
+@}
+\markup @{
+ ..text of second verse..
+@}
+\markup @{
+ ..text of third verse..
+@}
+\score @{
+ @dots{}
+ \header @{ piece = "Menuetto" @}
+@}
+@end example
+
+@node Extracting fragments of notation
+@subsection Extracting fragments of notation
+
+It is possible to quote small fragments of a large score directly from
+the output. This can be compared to clipping a piece of a paper score
+with scissors.
+
+This is done by definining the measures that need to be cut out
+separately. For example, including the following definition
+
+
+@verbatim
+\layout {
+ clip-regions
+ = #(list
+ (cons
+ (make-rhythmic-location 5 1 2)
+ (make-rhythmic-location 7 3 4)))
+}
+@end verbatim
+
+@noindent
+will extract a fragment starting halfway the fifth measure, ending in
+the seventh measure. The meaning of @code{5 1 2} is: after a 1/2 note
+in measure 5, and @code{7 3 4} after 3 quarter notes in measure 7.
+
+More clip regions can be defined by adding more pairs of
+rhythmic-locations to the list.
+
+In order to use this feature, LilyPond must be invoked with
+@code{-dclip-systems}. The clips are output as EPS files, and are
+converted to PDF and PNG if these formats are switched on as well.
+
+For more information on output formats, see @rprogram{Invoking lilypond}.
+
+@seealso
+
+Examples: @lsr{non-notation,clip-systems.ly}
+
+
+@node Including LilyPond files
+@subsection Including LilyPond files
+
+@funindex \include
+@cindex including files
+
+A large project may be split up into separate files. To refer to another
+file, use
+
+@example
+\include "otherfile.ly"
+@end example
+
+The line @code{\include "file.ly"} is equivalent to pasting the contents
+of file.ly into the current file at the place where you have the
+\include. For example, for a large project you might write separate files
+for each instrument part and create a @q{full score} file which brings
+together the individual instrument files.
+
+The initialization of LilyPond is done in a number of files that are
+included by default when you start the program, normally transparent to the
+user. Run lilypond --verbose to see a list of paths and files that Lily
+finds.
+
+Files placed in directory @file{PATH/TO/share/lilypond/VERSION/ly/} (where
+VERSION is in the form @q{2.6.1}) are on the path and available to
+@code{\include}. Files in the
+current working directory are available to \include, but a file of the same
+name in LilyPond's installation takes precedence. Files are
+available to \include from directories in the search path specified as an
+option when invoking @code{lilypond --include=DIR} which adds DIR to the
+search path.
+
+The @code{\include} statement can use full path information, but with the Unix
+convention @samp{/} rather than the DOS/Windows @samp{\}. For example,
+if @file{stuff.ly} is located one directory higher than the current working
+directory, use
+
+@example
+\include "../stuff.ly"
+@end example
+
+
+@node Text encoding
+@subsection Text encoding
+
+LilyPond uses the Pango library to format multi-lingual texts, and
+does not perform any input-encoding conversions. This means that any
+text, be it title, lyric text, or musical instruction containing
+non-ASCII characters, must be utf-8. The easiest way to enter such text is
+by using a Unicode-aware editor and saving the file with utf-8 encoding. Most
+popular modern editors have utf-8 support, for example, vim, Emacs,
+jEdit, and GEdit do.
+
+@c Currently not working
+@ignore
+Depending on the fonts installed, the following fragment shows Hebrew
+and Cyrillic lyrics,
+
+@cindex Cyrillic
+@cindex Hebrew
+@cindex ASCII, non
+
+@li lypondfile[fontload]{utf-8.ly}
+
+The @TeX{} backend does not handle encoding specially at all. Strings
+in the input are put in the output as-is. Extents of text items in the
+@TeX{} backend, are determined by reading a file created via the
+@file{texstr} backend,
+
+@example
+lilypond -dbackend=texstr input/les-nereides.ly
+latex les-nereides.texstr
+@end example
+
+The last command produces @file{les-nereides.textmetrics}, which is
+read when you execute
+
+@example
+lilypond -dbackend=tex input/les-nereides.ly
+@end example
+
+Both @file{les-nereides.texstr} and @file{les-nereides.tex} need
+suitable LaTeX wrappers to load appropriate La@TeX{} packages for
+interpreting non-ASCII strings.
+
+@end ignore
+
+To use a Unicode escape sequence, use
+
+@example
+#(ly:export (ly:wide-char->utf-8 #x2014))
+@end example
+
+
+@seealso
+
+@lsr{text,utf-8.ly}
+
+
+@node Different editions from one source
+@subsection Different editions from one source
+
+@funindex \tag
+@cindex tag
+
+The @code{\tag} command marks music expressions with a name. These
+tagged expressions can be filtered out later. With this mechanism it
+is possible to make different versions of the same music source.
+
+In the following example, we see two versions of a piece of music, one
+for the full score, and one with cue notes for the instrumental part
+
+@example
+c1
+<<
+ \tag #'part <<
+ R1 \\
+ @{
+ \set fontSize = #-1
+ c4_"cue" f2 g4 @}
+ >>
+ \tag #'score R1
+>>
+c1
+@end example
+
+The same can be applied to articulations, texts, etc.: they are
+made by prepending
+@example
+-\tag #@var{your-tag}
+@end example
+to an articulation, for example,
+@example
+c1-\tag #'part ^4
+@end example
+
+This defines a note with a conditional fingering indication.
+
+@cindex keepWithTag
+@cindex removeWithTag
+By applying the @code{\keepWithTag} and @code{\removeWithTag}
+commands, tagged expressions can be filtered. For example,
+@example
+<<
+ @var{the music}
+ \keepWithTag #'score @var{the music}
+ \keepWithTag #'part @var{the music}
+>>
+@end example
+would yield
+
+@lilypondfile[ragged-right,quote]{tag-filter.ly}
+
+The arguments of the @code{\tag} command should be a symbol
+(such as @code{#'score} or @code{#'part}), followed by a
+music expression. It is possible to put multiple tags on
+a piece of music with multiple @code{\tag} entries,
+
+@example
+ \tag #'original-part \tag #'transposed-part @dots{}
+@end example
+
+
+@seealso
+
+Examples: @lsr{parts,tag@/-filter@/.ly}
+
+
+@refbugs
+
+Multiple rests are not merged if you create the score with both tagged
+sections.
+
+
+@node Common syntax issues TODO name?
+@section Common syntax issues TODO name?
+
+@menu
+* Up and down::
+* Distances and measurements MAYBE MOVE::
+@end menu
+
+@node Up and down
+@subsection Up and down
+
+TODO: everything
+
+By default, lilypnod does a pretty jazz'n job of picking
+directions. But in some cases, it may be desirable to force a
+direction.
+
+@verbatim
+-
+^ _
+@end verbatim
+
+
+@node Distances and measurements MAYBE MOVE
+@subsection Distances and measurements MAYBE MOVE
+
+DISCUSS after working on other sections.
+
+TODO: staff spaces, #UP #DOWN #LEFT #RIGHT. Maybe move into tweaks?
+
+
+
+
+
+@node Other stuffs TODO move?
+@section Other stuffs TODO move?
+
+
+@menu
+* Displaying LilyPond notation::
+* Skipping corrected music::
+@end menu
+
+@node Displaying LilyPond notation
+@subsection Displaying LilyPond notation
+
+@funindex \displayLilyMusic
+Displaying a music expression in LilyPond notation can be
+done using the music function @code{\displayLilyMusic}. For example,
+
+@example
+@{
+ \displayLilyMusic \transpose c a, @{ c e g a bes @}
+@}
+@end example
+
+will display
+
+@example
+@{ a, cis e fis g @}
+@end example
+
+By default, LilyPond will print these messages to the console along
+with all the other messages. To split up these messages and save
+the results of @code{\display@{STUFF@}}, redirect the output to
+a file.
+
+@example
+lilypond file.ly >display.txt
+@end example
+
+
+@node Skipping corrected music
+@subsection Skipping corrected music
+
+
+@funindex skipTypesetting
+@funindex showLastLength
+
+When entering or copying music, usually only the music near the end (where
+you
+are adding notes) is interesting to view and correct. To speed up
+this correction process, it is possible to skip typesetting of all but
+the last few measures. This is achieved by putting
+
+@verbatim
+showLastLength = R1*5
+\score { ... }
+@end verbatim
+
+@noindent
+in your source file. This will render only the last 5 measures
+(assuming 4/4 time signature) of every @code{\score} in the input
+file. For longer pieces, rendering only a small part is often an order
+of magnitude quicker than rendering it completely
+
+Skipping parts of a score can be controlled in a more fine-grained
+fashion with the property @code{Score.skipTypesetting}. When it is
+set, no typesetting is performed at all.
+
+This property is also used to control output to the MIDI file. Note that
+it skips all events, including tempo and instrument changes. You have
+been warned.
+
+@lilypond[quote,fragment,ragged-right,verbatim]
+\relative c'' {
+ c8 d
+ \set Score.skipTypesetting = ##t
+ e e e e e e e e
+ \set Score.skipTypesetting = ##f
+ c d b bes a g c2 }
+@end lilypond
+
+In polyphonic music, @code{Score.skipTypesetting} will affect all
+voices and staves, saving even more time.
+
+
+
1.8.2 or newer). If you are installing binary packages, you may need to
install guile-devel or guile-dev or libguile-dev too.
-@item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.8 or newer).
+@item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.11 or newer).
@item @uref{http://gcc.gnu.org/, The GNU c++ compiler} (version 4.x or
newer).
nice make LILYPOND_EXTERNAL_BINARY=~/usr/bin/lilypond web
@end verbatim
+To rebuild the complete HTML docs, run the above script from the
+@file{Documentation/user/} directory, then run the final line (the
+@code{nice make}) from the top source dir.
+
+
@node Testing LilyPond
@subsection Testing LilyPond
@seealso
-Program reference: @internalsref{Contexts}.
+Internals Reference: @internalsref{Contexts}.
@lilypond[quote,ragged-right]
\include "engraver-example.ily"
FIXME: needs almost-complete rewrite. -gp
There are four manuals about LilyPond: the @emph{Learning Manual},
-the @emph{Notation Reference}, the @emph{Program Usage}, and the
-@emph{Program Reference}.
+the @emph{Notation Reference}, the @emph{Application Usage}, and the
+@emph{Internals Reference}.
@subheading Learning Manual (LM)
@item
The
@iftex
-Program reference
+Internals Reference
@end iftex
@ifnottex
-@ref{Top,Program reference,,lilypond-internals}
+@ref{Top,Internals Reference,,lilypond-internals}
@end ifnottex
is a set of heavily cross linked HTML pages, which document the
nitty-gritty details of each and every LilyPond class, object, and
* Musical notation:: Musical notation.
* Specialist notation:: Notation which is only used for
specific purposes.
-* Changing defaults:: Tuning output.
+* Input syntax:: General information about
+ lilypond input files.
* Non-musical notation:: Output that is not musical notation.
* Spacing issues:: Display of output on paper.
+* Changing defaults:: Tuning output.
* Interfaces for programmers:: Expert usage.
Appendices
@include notation.itely
@include specialist.itely
-@include changing-defaults.itely
+@include input.itely
@include non-music.itely
@include spacing.itely
+
+@include changing-defaults.itely
@include programming-interface.itely
@macro rglos {TEXT}
@vindex \TEXT\
-@code{\TEXT\}
+@ref{\TEXT\,,,music-glossary}
@end macro
@macro rprogram{TEXT}
-program usage manual, @internalsref{\TEXT\}
+program usage manual, @ref{\TEXT\,,,lilypond-program}
+@c @internalsref{\TEXT\}
@end macro
@macro ruser{TEXT}
-user manual, @internalsref{\TEXT\}
+user manual, @ref{\TEXT\,,,lilypond}
+@c @internalsref{\TEXT\}
@end macro
@macro rlearning{TEXT}
-learning manual, @internalsref{\TEXT\}
+learning manual, @ref{\TEXT\,,,lilypond-learning}
+@c @internalsref{\TEXT\}
@end macro
@end iftex
@seealso
-Program reference: @ruser{Manual beams}
+Internals Reference: @ruser{Manual beams}
@node fermata
specific notation.
@menu
-* Input files::
* Titles and headers::
* MIDI output::
-* Displaying LilyPond notation::
-* Skipping corrected music::
@end menu
-@node Input files
-@section Input files
-
-The main format of input for LilyPond are text files. By convention,
-these files end with @samp{.ly}.
-
-@menu
-* File structure::
-* A single music expression::
-* Multiple scores in a book::
-* Extracting fragments of notation::
-* Including LilyPond files::
-* Text encoding::
-* Different editions from one source::
-@end menu
-
-
-@node File structure
-@subsection File structure
-
-A @code{.ly} file contains any number of toplevel expressions, where a
-toplevel expression is one of the following
-
-@itemize
-@item
-An output definition, such as @code{\paper}, @code{\midi}, and
-@code{\layout}. Such a definition at the toplevel changes the default
-settings for the block entered.
-
-@item
-A direct scheme expression, such as
-@code{#(set-default-paper-size "a7" 'landscape)} or
-@code{#(ly:set-option 'point-and-click #f)}.
-
-@item
-A @code{\header} block. This sets the global header block. This
-is the block containing the definitions for book-wide settings, like
-composer, title, etc.
-
-@item
-A @code{\score} block. This score will be collected with other
-toplevel scores, and combined as a single @code{\book}.
-
-This behavior can be changed by setting the variable
-@code{toplevel-score-handler} at toplevel. The default handler is
-defined in the init file @file{scm/@/lily@/.scm}.
-
-The @code{\score} must begin with a music expression, and may
-contain only one music expression.
-
-@item
-A @code{\book} block logically combines multiple movements
-(i.e., multiple @code{\score} blocks) in one document. If there are
-a number of @code{\scores}, one output file will be created for
-each @code{\book} block, in which all corresponding movements are
-concatenated. The only reason to explicitly specify @code{\book} blocks
-in a @code{.ly} file is if you wish multiple output files from a single
-input file. One exception is within lilypond-book documents, where you
-explicitly have to add a @code{\book} block if you want more than a
-single @code{\score} or @code{\markup} in the same example.
-
-This behavior can be changed by setting the variable
-@code{toplevel-book-handler} at toplevel. The default handler is
-defined in the init file @file{scm/@/lily@/.scm}.
-
-@item
-A compound music expression, such as
-@example
-@{ c'4 d' e'2 @}
-@end example
-
-This will add the piece in a @code{\score} and format it in a
-single book together with all other toplevel @code{\score}s and music
-expressions. In other words, a file containing only the above
-music expression will be translated into
-
-@example
-\book @{
- \score @{
- \new Staff @{
- \new Voice @{
- @{ c'4 d' e'2 @}
- @}
- @}
- @}
- \layout @{ @}
- \header @{ @}
-@}
-@end example
-
-This behavior can be changed by setting the variable
-@code{toplevel-music-handler} at toplevel. The default handler is
-defined in the init file @file{scm/@/lily@/.scm}.
-
-@item
-A markup text, a verse for example
-@example
-\markup @{
- 2. The first line verse two.
-@}
-@end example
-
-Markup texts are rendered above, between or below the scores or music
-expressions, wherever they appear.
-
-@cindex variables
-
-@item
-An variable, such as
-@example
-foo = @{ c4 d e d @}
-@end example
-
-This can be used later on in the file by entering @code{\foo}. The
-name of an variable should have alphabetic characters only; no
-numbers, underscores or dashes.
-
-@end itemize
-
-The following example shows three things that may be entered at
-toplevel
-
-@example
-\layout @{
- % movements are non-justified by default
- ragged-right = ##t
-@}
-
-\header @{
- title = "Do-re-mi"
-@}
-
-@{ c'4 d' e2 @}
-@end example
-
-
-At any point in a file, any of the following lexical instructions can
-be entered:
-
-@itemize
-@item @code{\version}
-@item @code{\include}
-@item @code{\sourcefilename}
-@item @code{\sourcefileline}
-
-@end itemize
-
-
-@node A single music expression
-@subsection A single music expression
-
-A @code{\score} must contain a single music expression. However,
-this music expression may be of any size. Recall that music
-expressions may be included inside other expressions to form
-larger expressions. All of these examples are single music
-expressions; note the curly braces @{ @} or angle brackets <<
->> at the beginning and ending of the music.
-
-@example
-@{ c'4 c' c' c' @}
-@end example
-
-@lilypond[ragged-right,verbatim,quote]
-{
- { c'4 c' c' c'}
- { d'4 d' d' d'}
-}
-@end lilypond
-
-@lilypond[ragged-right,verbatim,quote]
-<<
- \new Staff { c'4 c' c' c' }
- \new Staff { d'4 d' d' d' }
->>
-@end lilypond
-
-@example
-@{
- \new GrandStaff <<
- \new StaffGroup <<
- \new Staff @{ \flute @}
- \new Staff @{ \oboe @}
- >>
- \new StaffGroup <<
- \new Staff @{ \violinI @}
- \new Staff @{ \violinII @}
- >>
- >>
-@}
-@end example
-
-
-@node Multiple scores in a book
-@subsection Multiple scores in a book
-
-@funindex \book
-@cindex movements, multiple
-
-A document may contain multiple pieces of music and texts. Examples
-of these are an etude book, or an orchestral part with multiple
-movements. Each movement is entered with a @code{\score} block,
-
-@example
-\score @{
- @var{..music..}
-@}
-@end example
-
-and texts are entered with a @code{\markup} block,
-
-@example
-\markup @{
- @var{..text..}
-@}
-@end example
-
-@funindex \book
-
-All the movements and texts which appear in the same @code{.ly} file
-will normally be typeset in the form of a single output file.
-
-@example
-\score @{
- @var{..}
-@}
-\markup @{
- @var{..}
-@}
-\score @{
- @var{..}
-@}
-@end example
-
-However, if you want multiple output files from the same @code{.ly}
-file, then you can add multiple @code{\book} blocks, where each such
-@code{\book} block will result in a separate output. If you do not
-specify any @code{\book} block in the file, LilyPond will implicitly
-treat the full file as a single @code{\book} block, see @ref{File
-structure}. One important exception is within lilypond-book documents,
-where you explicitly have to add a @code{\book} block, otherwise only
-the first @code{\score} or @code{\markup} will appear in the output.
-
-The header for each piece of music can be put inside the @code{\score}
-block. The @code{piece} name from the header will be printed before
-each movement. The title for the entire book can be put inside the
-@code{\book}, but if it is not present, the @code{\header} which is at
-the top of the file is inserted.
-
-@example
-\header @{
- title = "Eight miniatures"
- composer = "Igor Stravinsky"
-@}
-\score @{
- @dots{}
- \header @{ piece = "Romanze" @}
-@}
-\markup @{
- ..text of second verse..
-@}
-\markup @{
- ..text of third verse..
-@}
-\score @{
- @dots{}
- \header @{ piece = "Menuetto" @}
-@}
-@end example
-
-@node Extracting fragments of notation
-@subsection Extracting fragments of notation
-
-It is possible to quote small fragments of a large score directly from
-the output. This can be compared to clipping a piece of a paper score
-with scissors.
-
-This is done by definining the measures that need to be cut out
-separately. For example, including the following definition
-
-
-@verbatim
-\layout {
- clip-regions
- = #(list
- (cons
- (make-rhythmic-location 5 1 2)
- (make-rhythmic-location 7 3 4)))
-}
-@end verbatim
-
-@noindent
-will extract a fragment starting halfway the fifth measure, ending in
-the seventh measure. The meaning of @code{5 1 2} is: after a 1/2 note
-in measure 5, and @code{7 3 4} after 3 quarter notes in measure 7.
-
-More clip regions can be defined by adding more pairs of
-rhythmic-locations to the list.
-
-In order to use this feature, LilyPond must be invoked with
-@code{-dclip-systems}. The clips are output as EPS files, and are
-converted to PDF and PNG if these formats are switched on as well.
-
-For more information on output formats, see @rprogram{Invoking lilypond}.
-
-@seealso
-
-Examples: @lsr{non-notation,clip-systems.ly}
-
-
-@node Including LilyPond files
-@subsection Including LilyPond files
-
-@funindex \include
-@cindex including files
-
-A large project may be split up into separate files. To refer to another
-file, use
-
-@example
-\include "otherfile.ly"
-@end example
-
-The line @code{\include "file.ly"} is equivalent to pasting the contents
-of file.ly into the current file at the place where you have the
-\include. For example, for a large project you might write separate files
-for each instrument part and create a @q{full score} file which brings
-together the individual instrument files.
-
-The initialization of LilyPond is done in a number of files that are
-included by default when you start the program, normally transparent to the
-user. Run lilypond --verbose to see a list of paths and files that Lily
-finds.
-
-Files placed in directory @file{PATH/TO/share/lilypond/VERSION/ly/} (where
-VERSION is in the form @q{2.6.1}) are on the path and available to
-@code{\include}. Files in the
-current working directory are available to \include, but a file of the same
-name in LilyPond's installation takes precedence. Files are
-available to \include from directories in the search path specified as an
-option when invoking @code{lilypond --include=DIR} which adds DIR to the
-search path.
-
-The @code{\include} statement can use full path information, but with the Unix
-convention @samp{/} rather than the DOS/Windows @samp{\}. For example,
-if @file{stuff.ly} is located one directory higher than the current working
-directory, use
-
-@example
-\include "../stuff.ly"
-@end example
-
-
-@node Text encoding
-@subsection Text encoding
-
-LilyPond uses the Pango library to format multi-lingual texts, and
-does not perform any input-encoding conversions. This means that any
-text, be it title, lyric text, or musical instruction containing
-non-ASCII characters, must be utf-8. The easiest way to enter such text is
-by using a Unicode-aware editor and saving the file with utf-8 encoding. Most
-popular modern editors have utf-8 support, for example, vim, Emacs,
-jEdit, and GEdit do.
-
-@c Currently not working
-@ignore
-Depending on the fonts installed, the following fragment shows Hebrew
-and Cyrillic lyrics,
-
-@cindex Cyrillic
-@cindex Hebrew
-@cindex ASCII, non
-
-@li lypondfile[fontload]{utf-8.ly}
-
-The @TeX{} backend does not handle encoding specially at all. Strings
-in the input are put in the output as-is. Extents of text items in the
-@TeX{} backend, are determined by reading a file created via the
-@file{texstr} backend,
-
-@example
-lilypond -dbackend=texstr input/les-nereides.ly
-latex les-nereides.texstr
-@end example
-
-The last command produces @file{les-nereides.textmetrics}, which is
-read when you execute
-
-@example
-lilypond -dbackend=tex input/les-nereides.ly
-@end example
-
-Both @file{les-nereides.texstr} and @file{les-nereides.tex} need
-suitable LaTeX wrappers to load appropriate La@TeX{} packages for
-interpreting non-ASCII strings.
-
-@end ignore
-
-To use a Unicode escape sequence, use
-
-@example
-#(ly:export (ly:wide-char->utf-8 #x2014))
-@end example
-
-
-@seealso
-
-@lsr{text,utf-8.ly}
-
-
-@node Different editions from one source
-@subsection Different editions from one source
-
-@funindex \tag
-@cindex tag
-
-The @code{\tag} command marks music expressions with a name. These
-tagged expressions can be filtered out later. With this mechanism it
-is possible to make different versions of the same music source.
-
-In the following example, we see two versions of a piece of music, one
-for the full score, and one with cue notes for the instrumental part
-
-@example
-c1
-<<
- \tag #'part <<
- R1 \\
- @{
- \set fontSize = #-1
- c4_"cue" f2 g4 @}
- >>
- \tag #'score R1
->>
-c1
-@end example
-
-The same can be applied to articulations, texts, etc.: they are
-made by prepending
-@example
--\tag #@var{your-tag}
-@end example
-to an articulation, for example,
-@example
-c1-\tag #'part ^4
-@end example
-
-This defines a note with a conditional fingering indication.
-
-@cindex keepWithTag
-@cindex removeWithTag
-By applying the @code{\keepWithTag} and @code{\removeWithTag}
-commands, tagged expressions can be filtered. For example,
-@example
-<<
- @var{the music}
- \keepWithTag #'score @var{the music}
- \keepWithTag #'part @var{the music}
->>
-@end example
-would yield
-
-@lilypondfile[ragged-right,quote]{tag-filter.ly}
-
-The arguments of the @code{\tag} command should be a symbol
-(such as @code{#'score} or @code{#'part}), followed by a
-music expression. It is possible to put multiple tags on
-a piece of music with multiple @code{\tag} entries,
-
-@example
- \tag #'original-part \tag #'transposed-part @dots{}
-@end example
-
-
-@seealso
-
-Examples: @lsr{parts,tag@/-filter@/.ly}
-
-
-@refbugs
-
-Multiple rests are not merged if you create the score with both tagged
-sections.
-
-
@node Titles and headers
@section Titles and headers
instrument is used.
-@c Yes, this is a cop-out; this info doesn't belong in the Scheme
-@c chapter, but I'm not certain where to stick it.
-@c I think I'll eventually split this chapter into a "paper/layout"
-@c chapter and a "misc issues" chapter. -gp
-@node Displaying LilyPond notation
-@section Displaying LilyPond notation
-
-@funindex \displayLilyMusic
-Displaying a music expression in LilyPond notation can be
-done using the music function @code{\displayLilyMusic}. For example,
-
-@example
-@{
- \displayLilyMusic \transpose c a, @{ c e g a bes @}
-@}
-@end example
-
-will display
-
-@example
-@{ a, cis e fis g @}
-@end example
-
-By default, LilyPond will print these messages to the console along
-with all the other messages. To split up these messages and save
-the results of @code{\display@{STUFF@}}, redirect the output to
-a file.
-
-@example
-lilypond file.ly >display.txt
-@end example
-
-
-@node Skipping corrected music
-@section Skipping corrected music
-
-
-@funindex skipTypesetting
-@funindex showLastLength
-
-When entering or copying music, usually only the music near the end (where
-you
-are adding notes) is interesting to view and correct. To speed up
-this correction process, it is possible to skip typesetting of all but
-the last few measures. This is achieved by putting
-
-@verbatim
-showLastLength = R1*5
-\score { ... }
-@end verbatim
-
-@noindent
-in your source file. This will render only the last 5 measures
-(assuming 4/4 time signature) of every @code{\score} in the input
-file. For longer pieces, rendering only a small part is often an order
-of magnitude quicker than rendering it completely
-
-Skipping parts of a score can be controlled in a more fine-grained
-fashion with the property @code{Score.skipTypesetting}. When it is
-set, no typesetting is performed at all.
-
-This property is also used to control output to the MIDI file. Note that
-it skips all events, including tempo and instrument changes. You have
-been warned.
-
-@lilypond[quote,fragment,ragged-right,verbatim]
-\relative c'' {
- c8 d
- \set Score.skipTypesetting = ##t
- e e e e e e e e
- \set Score.skipTypesetting = ##f
- c d b bes a g c2 }
-@end lilypond
-
-In polyphonic music, @code{Score.skipTypesetting} will affect all
-voices and staves, saving even more time.
-
-
* Repeats:: Repeat music.
* Simultaneous notes:: More than one note at once.
* Staff notation:: Displaying staves.
-* Educational use:: Special notation to increase legibility.
+* Editorial annotations:: Special notation to increase legibility.
* Text:: Adding text to scores.
@end menu
@seealso
-Program reference: @internalsref{RhythmicStaff}.
+Internals Reference: @internalsref{RhythmicStaff}.
@node Entering percussion
@seealso
-Program reference: @internalsref{note-event}.
+Internals Reference: @internalsref{note-event}.
@node Percussion staves
@unnumberedsubsubsec Percussion staves
Init files: @file{ly/@/drumpitch@/-init@/.ly}.
-Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
+Internals Reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
@refbugs
In this manual: @ref{Manual staff switches}.
-Program reference: @internalsref{AutoChangeMusic}.
+Internals Reference: @internalsref{AutoChangeMusic}.
For fine-tuning the appearance of a pedal bracket, the properties
@code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
@code{PianoPedalBracket} objects (see
-@internalsref{PianoPedalBracket} in the Program reference) can be
+@internalsref{PianoPedalBracket} in the Internals Reference) can be
modified. For example, the bracket may be extended to the right edge
of the note head
@seealso
-Program reference: @internalsref{VoiceFollower}.
+Internals Reference: @internalsref{VoiceFollower}.
@refcommands
@c -*- coding: utf-8; mode: texinfo; -*-
@ignore
- Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
+ Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
When revising a translation, copy the HEAD committish of the
version that you are working on. See TRANSLATION for details.
* Writing pitches::
* Changing multiple pitches::
* Displaying pitches::
+* Note heads::
@end menu
@cindex Absolute
@cindex Absolute octave specification
-@c don't use @samp here because that might get confused with
-@c octave marks
In absolute mode, every note is placed explicitly in a certain
octave. The note names @code{c} to @code{b} are engraved in the
octave below middle C, as in the previous example.
@seealso
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
-Program reference: @internalsref{LedgerLineSpanner},
+Internals Reference: @internalsref{LedgerLineSpanner},
@internalsref{NoteHead}.
difficult to spot; in relative mode, a single error puts the rest
of the piece off by one octave.
+LilyPond examines pitches based on the note names -- in other
+words, an augmented fourth is @emph{not} treated the same as a
+diminished fifth. If we begin at a C, then an F-sharp will be placed a
+higher than the C, while a G-flat will be placed lower than the C.
+
+@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
+c2 fis
+c2 ges
+@end lilypond
+
@seealso
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
@refbugs
In accordance with standard typesetting rules, a natural sign is
printed before a sharp or flat if a previous accidental needs to
-be cancelled. To change this behavior, use
+be canceled. To change this behavior, use
@lilypond[fragment,quote,ragged-right,verbatim,relative=2]
ceses4 ces cis c
Notation reference: @ref{Automatic accidentals}, @ref{Musica ficta
accidentals}.
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
@refbugs
@seealso
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
@seealso
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
@node Transpose
@seealso
-Snippets: @lsrdir{pitch}, @lsr{scheme,
+Snippets: @lsrdir{pitches}, @lsr{scheme,
transpose-pitches-with-minimum-accidentals.ly}.
-Program reference: @internalsref{TransposedMusic}.
+Internals Reference: @internalsref{TransposedMusic}.
@refbugs
* Ottava brackets::
* Instrument transpositions::
* Automatic accidentals::
+* Ambitus::
@end menu
@node Clef
Notation reference: @ref{Ancient clefs}.
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
-Program reference: @internalsref{Clef}.
+Internals Reference: @internalsref{Clef}.
@node Key signature
Music glossary: @rglos{Church mode}, @rglos{scordatura}.
-Snippets: @lsrdir{pitch},
+Snippets: @lsrdir{pitches},
FIXME link to snippet 248,
FIXME link to a snippet about scordatura.
-Program reference: @internalsref{KeyCancellation},
+Internals Reference: @internalsref{KeyCancellation},
@internalsref{KeySignature}, @internalsref{Key_engraver}
@seealso
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
-Program reference: @internalsref{OttavaBracket}.
+Internals Reference: @internalsref{OttavaBracket}.
@refbugs
Notation reference: @ref{Quoting other voices}, @ref{Transpose}.
-Snippets: @lsrdir{pitch}
+Snippets: @lsrdir{pitches}
@node Automatic accidentals
function. This function is called as follows
@funindex set-accidental-style
+
@example
-#(set-accidental-style 'STYLE)
+\new Staff <<
+ #(set-accidental-style 'voice)
+ @{ @dots{} @}
+>>
@end example
@c TODO: check the context stuff below
@c -the default contexts as specified in
@c scm/music-function.scm seem to be different -vv
-Optionally, the function can take two arguments: the name of the
-accidental style, and an optional argument that denotes the context that
-should be changed:
+If no context name is supplied, the accidental style applies to
+the @code{Staff} by default. Optionally, the function can take
+the context for which the style should be changed as a second
+argument:
@example
-#(set-accidental-style 'STYLE #('CONTEXT#))
+#(set-accidental-style 'STYLE #('CONTEXT))
@end example
-If no context name is supplied, @code{Staff} is the default,
-but you may wish to apply the accidental style to a single @code{Voice}
-instead.
+The following accidental styles are supported. To demonstrate
+each style, we use the following example:
-The following accidental styles are supported:
+@c TODO: a Formatter, please clean this up.
+@lilypond[quote,ragged-right,verbatim]
+musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
+ \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
+musicB = { \clef bass \new Voice { \voiceTwo \relative { < fis, a cis>4
+ \change Staff = up cis' \change Staff = down <fis, a>
+ \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
+ <f a d>2 | } }}
+
+\new PianoStaff {
+ << \context Staff = "up" {
+ %%% change the next line as desired:
+ %#(set-accidental-style 'default)
+ \musicA }
+ \context Staff = "down"{
+ %%% change the next line as desired:
+ %#(set-accidental-style 'default)
+ \musicB } >> }
+@end lilypond
+
+@c don't use verbatim in this table.
@table @code
@item default
-This is the default typesetting behavior. It corresponds
-to 18th century common practice: Accidentals are
-remembered to the end of the measure in which they occur and
-only on their own octave.
+This is the default typesetting behavior. It corresponds to
+eighteenth-century common practice: Accidentals are remembered to
+the end of the measure in which they occur and only on their own
+octave. Thus, in the example below, no natural signs are printed
+before the @code{b} in the second measure or the last @code{c}:
@lilypond[quote,ragged-right]
-musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
+musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
musicB = { \clef bass \new Voice { \voiceTwo \relative { < fis, a cis>4
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
- \new PianoStaff {
+\new PianoStaff {
<< \context Staff = "up" {
%#(set-accidental-style 'default)
\musicA }
\context Staff = "down"{
%#(set-accidental-style 'default)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'default" }}}
-}
@end lilypond
@item voice
individually for each voice. Apart from that, the rule is similar to
@code{default}.
-@example
- \new Staff <<
- #(set-accidental-style 'voice)
- @{ @dots{} @}
- >>
-@end example
+As a result, accidentals from one voice do not get canceled in
+other voices, which is often an unwanted result: in the following
+example, it is hard to determine whether the second @code{a}
+should be played natural or sharp. The @code{voice} option should
+therefore be used only if the voices are to be read solely by
+individual musicians. If the staff is to be used by one musician
+(e.g., a conductor or in a piano score) then @code{modern} or
+@code{modern-cautionary} should be used instead.
-As a result, accidentals from one voice do not get canceled in other
-voices, which is often an unwanted result: in the following example, it
-is hard to determine whether the second @samp{a} should be played
-natural or sharp.
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'voice)
\context Staff = "down"{
#(set-accidental-style 'voice)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'voice" }}}
-}
@end lilypond
-The @code{voice} option should be used if the voices
-are to be read solely by individual musicians. If the staff is to be
-used by one musician (e.g., a conductor) then
-@code{modern} or @code{modern-cautionary}
-should be used instead.
-
@item modern
@funindex modern style accidentals
-This rule corresponds to the common practice in the 20th century. This rule
-prints the same accidentals as @code{default}, but temporary
-accidentals also are canceled in other octaves. Furthermore,
-in the same octave, they also get canceled in the following
-measure: in the following example, notice the two natural signs which appear
-in the second bar of the upper staff.
+
+This rule corresponds to the common practice in the twentieth
+century. It prints the same accidentals as @code{default}, with
+two exceptions which serve to avoid ambiguity: after temporary
+accidentals, cancellation marks are printed also in the following
+measure (for notes in the same octave) and, in the same measure,
+for notes in other octaves. Hence the naturals before the
+@code{b} and the @code{c} in the second measure of the upper
+staff:
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern)
\context Staff = "down"{
#(set-accidental-style 'modern)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern" }}}
-}
@end lilypond
-@item @code{modern-cautionary}
+@item modern-cautionary
@funindex modern-cautionary
-This rule is similar to @code{modern}, but the @q{extra} accidentals
-(the ones not typeset by @code{default}) are typeset as cautionary
-accidentals. They are printed in reduced size or (by default)
-with parentheses -- this can be set by definig the @code{cautionary-style}
-property of the @internalsref{AccidentalSuggestion} object.
+
+This rule is similar to @code{modern}, but the @q{extra}
+accidentals (the ones not typeset by @code{default}) are typeset
+as cautionary accidentals. They are by default printed with
+parentheses, but they can also be printed in reduced size by
+defining the @code{cautionary-style} property of the
+@internalsref{AccidentalSuggestion} object.
+
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern-cautionary)
\context Staff = "down"{
#(set-accidental-style 'modern-cautionary)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern-cautionary" }}}
-}
@end lilypond
-@funindex modern-voice
@item modern-voice
-This rule is used for multivoice accidentals to be read both by musicians
-playing one voice and musicians playing all voices. Accidentals are
-typeset for each voice, but they @emph{are} canceled across voices in
-the same @internalsref{Staff}.
+@funindex modern-voice
+
+This rule is used for multivoice accidentals to be read both by
+musicians playing one voice and musicians playing all voices.
+Accidentals are typeset for each voice, but they @emph{are}
+canceled across voices in the same @internalsref{Staff}. Hence,
+the @code{a} in the last measure is canceled because the previous
+cancellation was in a different voice, and the @code{d} in the
+lower staff is canceled because of the accidental in a different
+voice in the previous measure:
+
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern-voice)
\context Staff = "down"{
#(set-accidental-style 'modern-voice)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern-voice" }}}
-}
@end lilypond
@funindex modern-voice-cautionary
@item modern-voice-cautionary
+
This rule is the same as @code{modern-voice}, but with the extra
accidentals (the ones not typeset by @code{voice}) typeset
as cautionaries. Even though all accidentals typeset by
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern-voice-cautionary)
\context Staff = "down"{
#(set-accidental-style 'modern-voice-cautionary)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern-voice-cautionary" }}}
-}
@end lilypond
@item piano
@funindex piano accidentals
-This accidental style takes place in a GrandStaff context. However, you have to
-explicitly set it for @emph{each} individual Staff of the GrandStaff:
+
+This rule reflects twentieth-century practice for piano notation.
+Its behavior is very similar to @code{modern} style, but here
+accidentals also get canceled across the staves in the same
+@internalsref{GrandStaff} or @internalsref{PianoStaff}, hence all
+the cancellations of the final notes.
+
+This accidental style takes place in a GrandStaff context.
+However, you have to explicitly set it for @emph{each} individual
+Staff of the GrandStaff:
+
@example
\new GrandStaff @{ <<
>> @}
@end example
-This rule reflects 20th century practice for piano notation. Its behavior is very
-similar to @code{modern} style, but here accidentals also get canceled
-across the staves in the same @internalsref{GrandStaff} or
-@internalsref{PianoStaff}.
-
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'piano)
\context Staff = "down"{
#(set-accidental-style 'piano)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'piano" }}}
-}
@end lilypond
@item piano-cautionary
@funindex #(set-accidental-style 'piano-cautionary)
+
Same as @code{#(set-accidental-style 'piano)} but with the extra
accidentals typeset as cautionaries.
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'piano-cautionary)
\context Staff = "down"{
#(set-accidental-style 'piano-cautionary)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'piano-cautionary" }}}
-}
@end lilypond
@item no-reset
@funindex no-reset accidental style
+
This is the same as @code{default} but with accidentals lasting
-@q{forever} and not only until the next measure:
+@q{forever} and not only within the same measure:
+
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'no-reset)
\context Staff = "down"{
#(set-accidental-style 'no-reset)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'no-reset" }}}
-}
@end lilypond
@item forget
-This is sort of the opposite of @code{no-reset}: Accidentals
-are not remembered at all -- and hence all accidentals are
-typeset relative to the key signature, regardless of what was
-before in the music
+@funindex forget accidental style
+
+This is the opposite of @code{no-reset}: Accidentals are not
+remembered at all -- and hence all accidentals are typeset
+relative to the key signature, regardless of what was before in
+the music:
@lilypond[quote,ragged-right]
musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'forget)
\context Staff = "down"{
#(set-accidental-style 'forget)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'forget" }}}
-}
@end lilypond
@end table
@seealso
-Program reference: @internalsref{Accidental_engraver},
+Snippets: @lsrdir{pitches}
+
+Internals Reference: @internalsref{Accidental_engraver},
@internalsref{Accidental}, @internalsref{AccidentalSuggestion} and @internalsref{AccidentalPlacement}.
problematic notes.
+@node Ambitus
+@unnumberedsubsubsec Ambitus
+@cindex ambitus
+
+The term @notation{ambitus} or @notation{ambit} denotes a range of pitches
+for a given voice in a part of music. It may also denote the
+pitch range that a musical instrument is capable of playing.
+Ambits are printed on vocal parts, so performers can easily
+determine if it meets their capabilities.
+
+Ambits are denoted at the beginning of a piece near the initial
+clef. The range is graphically specified by two note heads that
+represent the minimum and maximum pitch. To print such ambits,
+add the @internalsref{Ambitus_engraver} to the
+@internalsref{Voice} context, for example:
+
+@lilypond[quote,verbatim,ragged-right]
+\layout {
+ \context {
+ \Staff
+ \consists Ambitus_engraver
+ }
+}
+
+\relative \new Staff {
+ as'' c e2 cis,2
+}
+@end lilypond
+
+If you have multiple voices in a single staff and you want a
+single ambitus per staff rather than per voice, add the
+@internalsref{Ambitus_engraver} to the @internalsref{Staff}
+context rather than to the @internalsref{Voice} context:
+
+@lilypond[verbatim,ragged-right,quote]
+\new Staff \with {
+ \consists "Ambitus_engraver"
+}
+<<
+ \new Voice \with {
+ \remove "Ambitus_engraver"
+ } \relative c'' {
+ \override Ambitus #'X-offset = #-1.0
+ \voiceOne
+ c4 a d e f2
+ }
+ \new Voice \with {
+ \remove "Ambitus_engraver"
+ } \relative c' {
+ \voiceTwo
+ es4 f g as b2
+ }
+>>
+@end lilypond
+
+@noindent
+This example uses one advanced feature,
+
+@example
+\override Ambitus #'X-offset = #-1.0
+@end example
+
+@noindent
+This code moves the ambitus to the left. The same effect could
+have been achieved with @code{extra-offset}, but then the
+formatting system would not reserve space for the moved object.
+
+@seealso
+
+Internals Reference: @internalsref{Ambitus},
+@internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
+@internalsref{AmbitusAccidental}.
+
+Snippets: @lsrdir{pitches},
+@lsr{vocal,ambitus@/.ly}.
+
+
+@refbugs
+
+There is no collision handling in the case of multiple per-voice
+ambitus.
+
+
+@node Note heads
+@subsection Note heads
+
+@menu
+* Easy notation note heads::
+* Shape note heads::
+* Improvisation::
+* Special noteheads::
+@end menu
+
+@node Easy notation note heads
+@unnumberedsubsubsec Easy notation note heads
+
+@cindex note heads, practice
+@cindex note heads, easy notation
+@cindex easy notation
+@cindex Hal Leonard
+
+The @q{easy play} note head includes a note name inside the head.
+It is used in music for beginners
+
+@lilypond[quote,ragged-right,verbatim,fragment,staffsize=26]
+ \setEasyHeads
+ c'2 e'4 f' | g'1
+@end lilypond
+
+The command @code{\setEasyHeads} overrides settings for the
+@internalsref{NoteHead} object. To make the letters readable, it
+has to be printed in a large font size. To print with a larger
+font, see @ref{Setting the staff size}.
+
+@refcommands
+
+@funindex \setEasyHeads
+@code{\setEasyHeads}
+
+@seealso
+
+Snippets: @lsrdir{pitches},
+
+
+@node Shape note heads
+@unnumberedsubsubsec Shape note heads
+
+@cindex note heads, shape
+
+In shape note head notation, the shape of the note head
+corresponds to the harmonic function of a note in the scale. This
+notation was popular in nineteenth-century American song books.
+
+Shape note heads can be produced by setting @code{\aikenHeads} or
+@code{\sacredHarpHeads}, depending on the style desired.
+
+@lilypond[verbatim,relative=1,fragment]
+ \aikenHeads
+ c8 d4 e8 a2 g1
+ \sacredHarpHeads
+ c,8 d4. e8 a2 g1
+@end lilypond
+
+Shapes are typeset according to the step in the scale, where
+the base of the scale is determined by the @code{\key} command.
+
+@funindex \key
+@funindex shapeNoteStyles
+@funindex \aikenHeads
+@funindex \sacredHarpHeads
+
+Shape note heads are implemented through the
+@code{shapeNoteStyles} property. Its value is a vector of
+symbols. The k-th element indicates the style to use for the k-th
+step of the scale. Arbitrary combinations are possible, e.g.:
+
+@lilypond[verbatim,relative=1,fragment]
+\set shapeNoteStyles =
+ ##(cross triangle fa #f mensural xcircle diamond)
+c8 d4. e8 a2 g1
+@end lilypond
+
+@seealso
+
+Snippets: @lsrdir{pitches},
+
+
+@node Improvisation
+@unnumberedsubsubsec Improvisation
+
+Improvisation is sometimes denoted with slashed note heads. Such
+note heads can be created by adding a
+@internalsref{Pitch_squash_engraver} to the @internalsref{Voice}
+context. Then, the following command
+
+@example
+\set squashedPosition = #0
+\override NoteHead #'style = #'slash
+@end example
+
+@noindent
+switches on the slashes.
+
+There are shortcuts @code{\improvisationOn} (and an accompanying
+@code{\improvisationOff}) for this command sequence. They are
+used in the following example
+
+@lilypond[verbatim,ragged-right,quote]
+\new Voice \with {
+ \consists Pitch_squash_engraver
+} \transpose c c' {
+ e8 e g a a16(bes)(a8) g \improvisationOn
+ e8
+ ~e2~e8 f4 fis8
+ ~fis2 \improvisationOff a16(bes) a8 g e
+}
+@end lilypond
+
+@seealso
+
+
+Snippets: @lsrdir{pitches},
+
+
+@node Special noteheads
+@unnumberedsubsubsec Special noteheads
+
+@cindex note heads, special
+
+Different noteheads are used by various instruments for various
+meanings -- crosses are used for @q{parlato} with vocalists,
+stopped notes on guitar; diamonds are used for harmonics on string
+instruments, etc. There is a shorthand (@code{\harmonic}) for
+diamond shapes; the other notehead styles are produced by tweaking
+the property
+
+@lilypond[ragged-right,relative=1,fragment,verbatim,quote]
+c4 d
+\override NoteHead #'style = #'cross
+e f
+\revert NoteHead #'style
+e d <c f\harmonic> <d a'\harmonic>
+@end lilypond
+
+@noindent
+To see all notehead styles, please see @ref{Note head styles}.
+
+
+@seealso
+
+Snippets: @lsrdir{pitches}.
+
+Internals Reference: @internalsref{NoteHead}.
+
+
Users are not expected to read this manual from start to finish.
However, they should be familiar with the material in the Learning
Manual (particularly ``Fundamental Concepts''), so do not repeat
-that material in this book. Also, you should assume that users
-know what the notation means; explaining musical concepts happens
-in the Music Glossary.
+that material in each section of this book. Also, you should
+assume that users know what the notation means; explaining musical
+concepts happens in the Music Glossary.
-* Program Usage: information about using the program lilypond with
- other programs (lilypond-book, operating systems, GUIs,
+* Application Usage: information about using the program lilypond
+ with other programs (lilypond-book, operating systems, GUIs,
convert-ly, etc). This section is written in formal technical
writing style.
Users are not expected to read this manual from start to finish.
+* Internals Reference: not really a documentation book, since it
+ is automagically generated from the source, but this is its
+ name.
+
%%%%% SECTION ORGANIZATION
The order of headings inside documentation sections should be:
main docs
+@refcommands
@commonprop
@seealso
@refbugs
Notation Reference: @ruser{faazle}, @ruser{boo}.
- Snippets: @lsrdir{section}, @lsr{specific/example-name.ly}
+ Application Usage: @rprogram{blah}.
+
+ Installed files: @file{path/to/dir/blahz}.
- Program reference: @internalsref{fazzle}, @internalsref{booar}.
+ Snippets: @lsrdir{section}, @lsr{specific/example-name.ly}.
+ (if there is only one entry, omit a final period. If there
+ are multiple entries, separate them by commas, do not
+ include an `and', and end with a period.)
- Installed files: @file{blahz}.
+ Internals Reference: @internalsref{fazzle}, @internalsref{booar}.
("Snippets" is REQUIRED; the others are optional)
* To create links, use @ref{} if the link is within the same
manual.
-* @commonprop and @refbugs are optional.
-
* Do not include any real info in second-level sections (ie 1.1
Pitches). A first-level section may have introductory material,
but other than that all material goes into third-level sections
(ie 1.1.1 Writing Pitches).
-%%%%% LILYPOND FORMATTING
-
-* Use two spaces for indentation in lilypond examples. (no tabs)
-
-* If possible, only write one bar per line. The notes on each
- line should be an independent line.
- Bad:
- \override textscript #'padding = #3 c1^"hi"
- Good:
- \override textscript #'padding = #3
- c1^"hi"
-
-* LilyPond input should be produce via
- @lilypond[verbatim,quote,ragged-right]
- with `fragment' and `relative=2' optional.
-
- Examples about page layout may alter the quote/ragged-right
- options. Omitting `verbatim' is not allowed.
-
-* Inspirational headwords are produced with
- @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
- {pitches-headword.ly}
-
-* Avoid long stretches of input code. Noone is going to read them
- in print. Instead refer to an example input file with @lsr{}.
-
-* If you want to work on an example outside of the manual (for
- easier/faster processing), use this header:
-
-\paper {
- #(define dump-extents #t)
- indent = 0\mm
- line-width = 160\mm - 2.0 * 0.4\in
- ragged-right = ##t
- force-assignment = #""
- line-width = #(- line-width (* mm 3.000000))
-}
-
-\layout {
-}
-
- You may not change any of these values. If you are making an
- example demonstrating special \paper{} values, contact the
- Documentation Editor.
-
-
-%%%%% TEXT FORMATTING
-
-* Lines should be less than 72 characters long. (I personally
- recommend writing with 66-char lines, but don't bother modifying
- existing material.)
-
-* Do not use tabs. They expand to nothing in DVI output.
-
-* Do not use spaces at the beginning of a line (except in @example
- or @verbatim environments), and do not use more than a single
- space between words. `makeinfo' copies the input lines verbatim
- without removing those spaces.
-
-* Use two spaces after a period.
-
-* Variables or numbers which consist of a single character
- (probably followed by a punctuation mark) should be tied
- properly, either to the previous or the next word. Example:
-
- The variable@tie{}@var{a} ...
-
-* To get consistent indentation in the DVI output it is better to
- avoid the @verbatim environment. Use the @example environment
- instead if possible, but without extraneous indentation. For
- example, this
-
- @example
- foo {
- bar
- }
- @end example
-
- should be replaced with
-
- @example
- foo {
- bar
- }
- @end example
-
- where `@example' starts the line (without leading spaces).
-
-* Do not compress the input vertically; this is, do not use
-
- Beginning of logical unit
- @example
- ...
- @end example
- continuation of logical unit
-
- but
-
- Beginning of logical unit
-
- @example
- ...
- @end example
-
- @noindent
- continuation of logical unit
-
- This makes it easier to avoid forgetting the `@noindent'. Only
- use @noindent if the material is discussing the same material;
- new material should simply begin without anything special on the
- line above it.
-
-* in @itemize use @item on a separate line like this:
- @itemize
- @item
- Foo
-
- @item
- Bar
-
- Do not use @itemize @bullet.
-
-* Specially-marked text:
-
- @code{}: actual lilypond code or property/context names.
- @samp{}: ditto, for single-letter code.
-
-
- ** Any `\' used inside the commands below must be **
- ** written as `\\'. Even if they are inside a @code{}. **
- ( this should only affect @warning{} )
-
- @notation{}: refers to pieces of notation, such as
- "@notation{crescendo} is often abbreviated as
- @notation{cresc.}" This should also be used to refer to
- specific lyrics ("the @notation{A - men} is centered...")
- @q{}: used for `vague' terms in English (and other natural
- languages).
- @qq{}: only for actual quotes -- i.e. "he said" or "she
- wrote".
- @warning{}: produces a "Note: " box. Use for important
- messages.
-
-* References must occur at the end of a sentence, for more
- information see @ref{the texinfo manual}. Ideally this should
- also be the final sentence of a paragraph, but this is not
- required. Any link in a doc section must be duplicated in the
- @seealso section at the bottom.
-
-* Introducing examples may be done with
- . (ie finish the previous sentence/paragaph)
- : (ie `in this example:')
- , (ie `may add foo with the blah construct,')
-
-
-%%%%% READABILITY
-
-* Non-ASCII characters which are in utf-8 should be directly used;
- this is, don't say `Ba@ss{}tuba' but `Baßtuba'. This ensures that
- all such characters appear in all output formats.
-
-* Don't use a @ref{link to another section} in the middle of a
- sentence. It looks ok in HTML, moderately bad in PDF, and
- utterly horrible in INFO. Instead, reword the sentence so that
- users are encouraged to see @ref{link to another section}.
- (at the end of the sentence)
+%%%%% GENERAL WRITING
* Do not forget to create @cindex entries for new sections of text.
Enter commands with @funindex, i.e.
Both index commands should go in front of the actual material.
-* Abbrevs in caps, e.g., HTML, DVI, MIDI, etc.
-
-* Colon usage
-
- 1. To introduce lists
- 2. When beginning a quote: "So, he said,..."
- This usage is rarer. Americans often just use a comma.
- 3. When adding a defining example at the end of a sentence.
+* Preferred terms:
+ - in general, use the American spellings. The internal
+ lilypond property names use this spelling.
+ - list of specific terms:
+canceled, bar
%%%%% TECHNICAL WRITING STYLE
Say `invalid' instead.
-FOR DOC EDITOR ONLY
-
-* sectioning commands (@node and @section) must not appear inside
- an @ignore. Separate those commands with a space, ie @n ode.
-
music name: Each music expression has a name. For example, a note
leads to a @internalsref{NoteEvent}, and @code{\simultaneous} leads to
a @internalsref{SimultaneousMusic}. A list of all expressions
-available is in the Program reference manual, under
+available is in the Internals Reference manual, under
@internalsref{Music expressions}.
@item
interfaces, for example, a note is an @code{event}, but it is also a
@code{note-event}, a @code{rhythmic-event}, and a
@code{melodic-event}. All classes of music are listed in the
-Program reference, under
+Internals Reference, under
@internalsref{Music classes}.
@item
@seealso
-Program reference: @internalsref{VoltaBracket},
+Internals Reference: @internalsref{VoltaBracket},
@internalsref{RepeatedMusic},
@internalsref{VoltaRepeatedMusic}, and
@internalsref{UnfoldedRepeatedMusic}.
@seealso
-Program reference: @internalsref{VoltaBracket},
+Internals Reference: @internalsref{VoltaBracket},
@internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
and @internalsref{UnfoldedRepeatedMusic}.
In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
-Program reference: @internalsref{Beam},
+Internals Reference: @internalsref{Beam},
@internalsref{StemTremolo}.
@seealso
-Program reference: @internalsref{RepeatSlash},
+Internals Reference: @internalsref{RepeatSlash},
@internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
@internalsref{DoublePercentRepeatCounter},
@internalsref{PercentRepeatCounter},
* Durations::
* Tuplets::
* Scaling durations::
+* Ties::
@end menu
@node Durations
For details of this and other settings which control
proportional notation see @ref{Proportional notation}.
-Program reference: @internalsref{Dots}, and
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{Dots}, and
@internalsref{DotColumn}.
+@refbugs
+
+@c duplicated in Durations and Rests. -gp
+There is no fundamental limit to note durations (both in terms of
+longest and shortest), but the number of glyphs is limited: there
+are flags up 64th and rests up to 128th. At the other extreme,
+there are note heads up to longa (4x whole note) and rests up to
+maxima (8 x whole). Since beams can be extended arbitrarily,
+beamed notes can be arbitrarily short.
+
+
+
@node Tuplets
@unnumberedsubsubsec Tuplets
@seealso
-Program reference: @internalsref{TupletBracket},
+FIXME: totally irrelevant link to real-music for
+discussion/demonstration purposes.
+
+Snippets: @lsrdir{rhythms},
+@lsr{real-music,creating-music-with-scheme.ly}.
+
+Internals Reference: @internalsref{TupletBracket},
@internalsref{TupletNumber}, and @internalsref{TimeScaledMusic}.
This manual: @ref{Tuplets}, @ref{Skips}.
+Snippets: @lsrdir{rhythms}
+
+@node Ties
+@unnumberedsubsubsec Ties
+
+@cindex tie
+@funindex ~
+
+A tie connects two adjacent note heads of the same pitch. The tie
+in effect extends the length of a note.
+
+@warning{Ties should not be confused with @emph{slurs}, which
+indicate articulation, or @emph{phrasing slurs}, which indicate
+musical phrasing. A tie is just a way of extending a note
+duration, similar to the augmentation dot.}
+
+A tie is entered using the tilde symbol @code{~}
+
+@lilypond[quote,ragged-right,fragment,verbatim]
+e' ~ e'
+@end lilypond
+
+
+@noindent
+Ties are used either when the note crosses a bar line, or when
+dots cannot be used to denote the rhythm. Ties should also be
+used when note values cross larger subdivisions of the measure:
+
+@lilypond[fragment,quote,ragged-right]
+\relative {
+ r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
+}
+@end lilypond
+
+If you need to tie a lot of notes over bars, it may be easier to
+use automatic note splitting (see @ref{Automatic note splitting}).
+This mechanism automatically splits long notes, and ties them
+across bar lines.
+
+@funindex \repeatTie
+@cindex repeating ties
+@cindex volta brackets and ties
+
+When a tie is applied to a chord, all note heads whose pitches
+match are connected. When no note heads match, no ties will be
+created. Chords may be partially tied by placing the tie inside
+the chord.
+
+@lilypond[quote,ragged-right,fragment,verbatim,relative=1]
+ <c e g> ~ <c e g>
+<c~ e g~ b> <c e g b>
+@end lilypond
+
+When a second alternative of a repeat starts with a tied note, you
+have to repeat the tie. This can be achieved with
+@code{\repeatTie},
+
+@lilypond[fragment,quote,ragged-right,relative=2]
+\repeat volta 2 { c g <c e>2 ~ }
+\alternative {{ <c e>2. r4 } {<c e>2\repeatTie d4 c }}
+@end lilypond
+
+@cindex Laissez vibrer
+@cindex Ties, laissez vibrer
+
+@notation{L.v.} ties (@notation{laissez vibrer}) indicate that
+notes must not be damped at the end. It is used in notation for
+piano, harp and other string and percussion instruments. They can
+be entered using @code{\laissezVibrer}:
+
+@lilypond[fragment,ragged-right,verbatim,relative=1]
+<c f g>\laissezVibrer
+@end lilypond
+
+The direction of a tie can be specified with @code{\tieUp} or
+@code{\tieDown} (see example below). @code{\tieNeutral} reverts
+to the default behaviour again.
+
+However, as with other music elements of this kind, there is a
+convenient shorthand for forcing tie directions. By adding
+@code{_} or @code{^} before the tilde, the direction is also set:
+
+@lilypond[relative=2,ragged-right,quote,verbatim,fragment]
+c4_~ c c^~ c)
+@end lilypond
+
+
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
+Internals Reference:
+@internalsref{LaissezVibrerTie}
+@internalsref{LaissezVibrerTieColumn}
+
+Example files:
+@lsr{connecting,laissez-vibrer-ties.ly}
+
+
+@commonprop
+
+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 useful, for example, to tie a tremolo to a chord,
+but in principle, it can also be used for ordinary, consecutive
+notes:
+
+@lilypond[fragment,verbatim,relative=1,ragged-right,quote]
+\set tieWaitForNote = ##t
+\grace { c16[~ e~ g]~ } <c, e g>2
+\repeat tremolo 8 { c32~ c'~ } <c c,>1
+e8~ c~ a~ f~ <e' c a f>2
+\tieUp c8~ a \tieDown \tieDotted g~ c g2
+@end lilypond
+
+Ties may be engraved manually by changing the
+@code{tie-configuration} property. 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).
+
+@lilypond[fragment,verbatim,relative=1,ragged-right,quote]
+<c e g>2~ <c e g> |
+\override TieColumn #'tie-configuration =
+ #'((0.0 . 1) (-2.0 . 1) (-4.0 . 1))
+<c e g>~ <c e g> |
+@end lilypond
+
+
+@refcommands
+
+
+@funindex \tieUp
+@code{\tieUp},
+@funindex \tieDown
+@code{\tieDown},
+@funindex \tieNeutral
+@code{\tieNeutral},
+@funindex \tieDotted
+@code{\tieDotted},
+@funindex \tieDashed
+@code{\tieDashed},
+@funindex \tieSolid
+@code{\tieSolid}.
+
+
+@seealso
+
+
+
+In this manual: @ref{Automatic note splitting}.
+
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{Tie}.
+
+
+@refbugs
+
+Switching staves when a tie is active will not produce a slanted
+tie.
+
+Changing clefs or octavations during a tie is not really
+well-defined. In these cases, a slur may be preferable.
+
+
@seealso
-Program reference: @internalsref{Rest}.
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{Rest}.
+
+
+@refbugs
+
+@c duplicated in Durations and Rests. -gp
+There is no fundamental limit to note durations (both in terms of
+longest and shortest), but the number of glyphs is limited: there
+are flags up 64th and rests up to 128th. At the other extreme,
+there are note heads up to longa (4x whole note) and rests up to
+maxima (8 x whole). Since beams can be extended arbitrarily,
+beamed notes can be arbitrarily short.
@node Skips
@seealso
-Program reference: @internalsref{SkipMusic}.
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{SkipMusic}.
@node Multi measure rests
This manual: @ref{Text}
-Program reference:
+Snippets: @lsrdir{rhythms}
+
+Internals Reference:
@internalsref{MultiMeasureRest}.
@seealso
-Program reference: @internalsref{TimeSignature}, and
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{TimeSignature}, and
@internalsref{Timing_translator}.
Examples: @lsr{contemporary,compound-time-signature.ly}.
piece. If you use it after the beginning, some odd warnings may
occur.
+@seealso
+
+Snippets: @lsrdir{rhythms}
@node Unmetered music
@unnumberedsubsubsec Unmetered music
@noindent
to indicate where breaks can occur.
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
@node Polymetric notation
@unnumberedsubsubsec Polymetric notation
When using different time signatures in parallel, the spacing is
aligned vertically, but barlines distort the regular spacing.
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
@node Automatic note splitting
@unnumberedsubsubsec Automatic note splitting
@seealso
-Program reference: @internalsref{Completion_heads_engraver}.
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{Completion_heads_engraver}.
@node Setting automatic beam behavior
>>}. If a polyphonic voice ends while an automatic beam is still
accepting notes, it is not typeset.
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
@seealso
-Program reference: @internalsref{Beam}.
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{Beam}.
@refbugs
The @code{\featherDurations} command only works with very short
music snippets, and when numbers in the fraction are small.
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
@node Bars
@subsection Bars
In this manual: @ref{Repeats}, @ref{System start delimiters}.
-Program reference: @internalsref{BarLine} (created at
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{BarLine} (created at
@internalsref{Staff} level), @internalsref{SpanBar} (across
staves), @internalsref{Timing_translator} (for Timing
properties).
@seealso
-Program reference: @internalsref{BarNumber}.
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{BarNumber}.
Examples: @lsrdir{bar number}
will print a warning if the @code{currentBarNumber} is not 123
when it is processed.
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
@node Rehearsal marks
@unnumberedsubsubsec Rehearsal marks
@seealso
+Snippets: @lsrdir{rhythms}
+
This manual: @ref{Text marks}.
-Program reference: @internalsref{RehearsalMark}.
+Internals Reference: @internalsref{RehearsalMark}.
Init files: @file{scm/@/translation@/-functions@/.scm} contains
the definition of @code{format-mark-numbers} and
@seealso
-Program reference: @internalsref{GraceMusic}.
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{GraceMusic}.
@refbugs
>>
@end lilypond
+@seealso
+
+Snippets: @lsrdir{rhythms}
+
@node Time administration
@unnumberedsubsubsec Time administration
This manual: @ref{Bar numbers}, @ref{Unmetered music}
-Program Reference: @internalsref{Timing_translator},
+Snippets: @lsrdir{rhythms}
+
+Internals Reference: @internalsref{Timing_translator},
@internalsref{Score}
@seealso
-Program reference: @internalsref{ClusterSpanner},
+Internals Reference: @internalsref{ClusterSpanner},
@internalsref{ClusterSpannerBeacon},
@internalsref{Cluster_spanner_engraver}.
@seealso
-Program reference: the objects responsible for resolving
+Internals Reference: the objects responsible for resolving
collisions are @internalsref{NoteCollision} and
@internalsref{RestCollision}.
@seealso
-Program reference: @internalsref{PartCombineMusic}.
+Internals Reference: @internalsref{PartCombineMusic}.
@refbugs
system is reevaluated in order to fill the page more evenly; if a page
has space left over, systems are stretched in order to fill that space.
The amount of stretching can be configured though the @code{max-stretch}
-property of the @internalsref{VerticalAlignment} grob. To disable this
-stretching entirely, set @code{max-stretch} to zero.
+property of the @internalsref{VerticalAlignment} grob. By default,
+@code{max-stretch} is set to zero, disabling stretching. To enable
+stretching, a sane value for @code{max-stretch}
+is @code{ly:align-interface::calc-max-stretch}.
In some situations, you may want to stretch most of a system while
leaving some parts fixed. For example, if a piano part occurs in the
ragged-last-bottom = ##f
}
-\score {
+\new Score \with
+{
+ \override VerticalAlignment #'max-stretch = #ly:align-interface::calc-max-stretch
+}
+{
\new GrandStaff
<<
\new StaffGroup
@seealso
-Program reference: @internalsref{StaffSymbol},
+Internals Reference: @internalsref{StaffSymbol},
@internalsref{DrumStaff}.
Examples: @lsrdir{staff}
@seealso
-Program reference: @internalsref{MetronomeMark}, @ref{MIDI
+Internals Reference: @internalsref{MetronomeMark}, @ref{MIDI
output}.
@seealso
-Program reference: @internalsref{InstrumentName}.
+Internals Reference: @internalsref{InstrumentName}.
@node Quoting other voices
Examples: @lsr{parts,quote.ly},
@lsr{parts,quote-transportation.ly}
-Program reference: @internalsref{QuoteMusic}.
+Internals Reference: @internalsref{QuoteMusic}.
@node Formatting cue notes
\override Voice.NoteHead #'style = #'default
\override Voice.Rest #'style = #'default
- % FIXME: setting printKeyCancellation back to #t must not
+ % TODO: setting printKeyCancellation back to #t must not
% occur in the first bar after the incipit. Dto. for forceClef.
% Therefore, we need an extra \skip.
\skip 1*1
@c - maybe ask Amelie Zapf to clean it up, or whether I should just
@c make whatever changes I feel like.
-@c FIXME: produces a warning ; key change merge.
+@c TODO: produces a warning ; key change merge.
@c The `line-width' argument is for the \header.
@lilypond[quote,verbatim,ragged-right,line-width]
In this manual: @ref{Text markup}.
-Program reference: @internalsref{TextScript}.
+Internals Reference: @internalsref{TextScript}.
@node Text spanners
@seealso
-Program reference: @internalsref{TextSpanner}.
+Internals Reference: @internalsref{TextSpanner}.
@node Text marks
@seealso
-Program reference: @internalsref{RehearsalMark}.
+Internals Reference: @internalsref{RehearsalMark}.
This manual: @ref{Overview of text markup commands}.
-Program reference: @internalsref{TextScript}.
+Internals Reference: @internalsref{TextScript}.
Init files: @file{scm/@/new@/-markup@/.scm}.
@seealso
-Program reference: @internalsref{TextSpanner},
+Internals Reference: @internalsref{TextSpanner},
@internalsref{Glissando}, @internalsref{VoiceFollower},
@internalsref{TrillSpanner},
@internalsref{line-spanner-interface}.
version that you are working on. See TRANSLATION for details.
@end ignore
+@ignore
+
+Tutorial Specification:
+
+The LM is written in a tutorial style which introduces the
+most important concepts, structure and syntax of the
+elements of a LilyPond score in a carefully graded sequence
+of steps. Explanations of all musical concepts used in the
+Manual can be found in the Music Glossary, and readers are
+assumed to have no prior knowledge of LilyPond. The
+objective is to take readers to a level where the Notation
+Reference can be understood and employed to both adapt the
+templates in the Appendix to their needs and to begin to
+construct their own. Commonly used tweaks are introduced
+and explained. Examples are provided throughout which,
+while being focussed on the topic being introduced, are long
+enough to seem real in order to retain the readers'
+interest. Each example builds on the previous material, and
+comments are used liberally. Every new aspect is thoroughly
+explained before it is used.
+
+@end ignore
+
@ignore
Tutorial guidelines: (different from policy.txt!)
- unless you have a really good reason, use either
in your own music! For more information about the display of
examples in the manual, see @ref{How to read the tutorial}.}
-@cindex Case sensitive
+@cindex case sensitive
In addition, LilyPond input is @strong{case sensitive}. @code{
@{ c d e @}} is valid input; @code{@{ C D E @}} will produce an
error message.
@subheading Entering music and viewing output
@cindex PDF file
-@cindex Viewing music
+@cindex viewing music
In this section we will explain what commands to run and how to
view or print the output.
@subheading Pitches
Music glossary: @rglos{pitch}, @rglos{interval}, @rglos{fourth},
-@rglos{scale}, @rglos{middle C}, @rglos{octave}.
+@rglos{scale}, @rglos{middle C}, @rglos{octave},
+@rglos{accidental}.
The easiest way to enter notes is by using @code{\relative} mode.
-In this mode, the @notation{interval} between the previous note and
-the current note is assumed to be within a @notation{fourth}. We
-begin by entering the most elementary piece of music, a
-@notation{scale}.
+In this mode, the octave is chosen automatically by assuming the
+following note is always to be placed closest to the previous note,
+i.e., it is to be placed in the octave which is within three
+staff spaces of the previous note. We begin by entering the most
+elementary piece of music, a @notation{scale}, in which every note
+is within just one staff space of the previous note.
@lilypond[verbatim,quote,ragged-right]
-\relative c' {
+\relative c' { % set the starting point to middle C
c d e f
g a b c
}
@end lilypond
The initial note is @notation{middle C}. Each successive note is
-within a fourth of the previous note -- in other words, the first
+placed closest to the previous note -- in other words, the first
@code{c} is the closest C to middle C. This is followed by the
closest D to the previous note. We can create melodies which
have larger intervals:
@end lilypond
@noindent
-As you may notice, this example does not start on middle C. The first
-note -- the @code{d} -- is the closest D to middle C.
+It is not necessary for the first note of the melody to start on
+the note which specifies the starting pitch. In the previous
+example, the first note -- the @code{d} -- is the closest D to
+middle C.
+
+By adding (or removing) quotes @code{'} or commas @code{,} from
+the @code{\relative c' @{} command, we can change the starting
+octave:
+
+@lilypond[verbatim,quote,ragged-right]
+\relative c'' { % one octave above middle C
+ e c a c
+}
+@end lilypond
+
+Relative mode can be confusing initially, but is the easiest way
+to enter most melodies. Let us see how this relative calculation
+works in practice. Starting from a B, which is on the middle line
+in a treble clef, you can reach a C, D and E within 3 staff spaces
+going up, and an A, G and F within 3 staff spaces going down. So
+if the note following a B is a C, D or F it will be assumed to be
+above the B, and an A, G or F will be assumed to be below.
+
+@lilypond[verbatim,quote,ragged-right]
+\relative c'' {
+ b c % c is 1 staff space up, so is the c above
+ b d % d is 2 up or 5 down, so is the d above
+ b e % e is 3 up or 4 down, so is the e above
+ b a % a is 4 up or 3 down, so is the a below
+ b g % g is 5 up or 2 down, so is the g below
+ b f % f is 6 up or 1 down, so is the f below
+}
+@end lilypond
+
+Exactly the same happens even when any of these notes are
+sharpened or flatted. @notation{Accidentals} are @strong{totally
+ignored} in the calculation of relative position. Precisely the
+same staff space counting is done from a note at any other
+position on the staff.
-To add intervals that are larger than a fourth, we can raise
-the @notation{octave} by adding a single quote @code{'} (or apostrophe)
-to the note name. We can lower the octave by adding a comma @code{,} to
-the note name.
+To add intervals that are larger than three staff spaces, we can
+raise the @notation{octave} by adding a single quote @code{'} (or
+apostrophe) to the note name. We can lower the octave by adding a
+comma @code{,} to the note name.
@lilypond[verbatim,quote,ragged-right]
\relative c'' {
@itemize
-@cindex Case sensitive
+@cindex case sensitive
@item
@strong{Case sensitive}:
it matters whether you enter a letter in lower case (e.g. @code{a,
on one staff.
@menu
-* Relative note names::
* Accidentals and key signatures::
* Ties and slurs::
* Articulation and dynamics::
@end menu
-@node Relative note names
-@subsection Relative note names
-
-Music glossary: @rglos{octave}, @rglos{fourth}, @rglos{fifth}.
-
-LilyPond calculates the pitch of each note relative to the
-previous one@footnote{There is another mode of entering pitches,
-@ruser{Absolute note names}. However, in practice relative mode is
-much easier and safer to use.}, as we saw in @ref{Simple
-notation}. If no extra @notation{octave} marks (@code{'} and
-@code{,}) are added, it assumes that each pitch is within a
-@notation{fourth} of the previous note.
-
-LilyPond examines pitches based on the note names -- in other
-words, an augmented fourth is @emph{not} treated the same as a
-diminished fifth. If we begin at a C, then an F-sharp will be placed a
-higher than the C, while a G-flat will be placed lower than the C.
-
-@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
-c2 fis
-c2 ges
-@end lilypond
-
-@seealso
-@quotation
-@table @asis
-@item Relative octaves
-see @ruser{Relative octaves}.
-@item Octave check
-see @ruser{Octave check}.
-@end table
-@end quotation
-
-
@node Accidentals and key signatures
@subsection Accidentals and key signatures
@item Tuplets
see @ruser{Tuplets},
@item Pickups
-see @ruser{Partial measures}.
+see @ruser{Upbeats}.
@end table
@end quotation
@node Setting simple songs
@subsection Setting simple songs
-@cindex Lyrics
-@cindex Songs
+@cindex lyrics
+@cindex songs
Music glossary: @rglos{lyrics}.
TODO: explain what/why. maybe in other sections.
+
@menu
* Common tweaks::
* TODO other name::
@quotation
@seealso
-Program reference: @internalsref{DynamicText}, @internalsref{Hairpin}.
+Internals Reference: @internalsref{DynamicText}, @internalsref{Hairpin}.
Vertical positioning of these symbols is handled by
@internalsref{DynamicLineSpanner}.
@end quotation
@section TODO other name
@menu
-* Default files::
+* Predefined tweaks::
* Advanced tweaks with Scheme::
* Avoiding tweaks with slower processing::
* The three methods of tweaking::
@end menu
-@node Default files
-@subsection Default files
+@node Predefined tweaks
+@subsection Predefined tweaks
+
+TODO: Some tweaks are really common, blah blah.
+
+for example \slurUp, \fatText.
+
+Show example, then explain where to find ly/propert-ly.
+
-The Program Reference documentation contains a lot of information
+The Internals Reference documentation contains a lot of information
about LilyPond, but even more information can be gathered from
looking at the internal LilyPond files.
by examining the simplest method, and gradually increase complexity.
@menu
-* TODO subsection vocal music::
+* Simple lyrics::
+* Aligning lyrics to a melody::
+* Vocals and variables::
+* Flexibility in placement::
+* Spacing vocals::
+* More about stanzas::
@end menu
-
@commonprop
Checking to make sure that text scripts and lyrics are within the margins is
@end example
-@node TODO subsection vocal music
-@subsection TODO subsection vocal music
+@node Simple lyrics
+@subsection Simple lyrics
@menu
* Setting simple songs::
* Entering lyrics::
-* Aligning lyrics to a melody::
-* Automatic syllable durations::
-* Another way of entering lyrics::
-* Assigning more than one syllable to a single note::
-* More than one note on a single syllable::
-* Extenders and hyphens::
-* Working with lyrics and variables::
-* Flexibility in placement::
-* Lyrics to multiple notes of a melisma::
-* Divisi lyrics::
-* Switching the melody associated with a lyrics line::
-* Lyrics independent of notes::
-* Spacing lyrics::
-* More about stanzas::
-* Other vocal issues::
@end menu
@node Setting simple songs
@lilypond[quote,ragged-right,fragment,verbatim]
\relative { e4 f e d e f e2 }
-\addlyrics { He said: â\80\9cLet my peo ple goâ\80\9d. }
+\addlyrics { He said: ââ\82¬Å\93Let my peo ple goââ\82¬Â\9d. }
@end lilypond
To use normal quotes in lyrics, add a backslash before the
@seealso
-Program reference: @internalsref{LyricText}, @internalsref{LyricSpace}.
-
+Internals Reference: @internalsref{LyricText}, @internalsref{LyricSpace}.
@node Aligning lyrics to a melody
-@unnumberedsubsubsec Aligning lyrics to a melody
+@subsection Aligning lyrics to a melody
@funindex \lyricmode
@funindex \addlyrics
@seealso
-Program reference: @internalsref{Lyrics}.
+Internals Reference: @internalsref{Lyrics}.
@node Assigning more than one syllable to a single note
@seealso
-Program reference: @internalsref{LyricCombineMusic}.
+Internals Reference: @internalsref{LyricCombineMusic}.
@c Here come the section which used to be "Melismata"
@c the new title might be more self-explanatory
@seealso
-Program reference: @internalsref{Melisma_translator}.
+Internals Reference: @internalsref{Melisma_translator}.
@lsr{vocal,lyric@/-combine.ly}.
@seealso
-Program reference: @internalsref{LyricExtender},
+Internals Reference: @internalsref{LyricExtender},
@internalsref{LyricHyphen}
+@node Vocals and variables
+@subsection Vocals and variables
+
+@menu
+* Working with lyrics and variables::
+@end menu
+
@node Working with lyrics and variables
@unnumberedsubsubsec Working with lyrics and variables
+
@cindex lyrics, variables
To define variables containing lyrics, the function @code{\lyricmode}
@seealso
@c TODO: document \new Staff << Voice \lyricsto >> bug
-Program reference: @internalsref{LyricCombineMusic},
+Internals Reference: @internalsref{LyricCombineMusic},
@internalsref{Lyrics}.
@node Flexibility in placement
-@unnumberedsubsubsec Flexibility in placement
+@subsection Flexibility in placement
Often, different stanzas of one song are put to one melody in slightly
differing ways. Such variations can still be captured with
@end lilypond
+@node Spacing vocals
+@subsection Spacing vocals
+
+@menu
+* Spacing lyrics::
+@end menu
+
@node Spacing lyrics
@unnumberedsubsubsec Spacing lyrics
@node More about stanzas
-@unnumberedsubsubsec More about stanzas
+@subsection More about stanzas
-@cindex stanza number
+@menu
+* Adding stanza numbers ::
+* Adding dynamics marks::
+* Adding singer names::
+* Printing stanzas at the end ::
+* Printing stanzas at the end in multiple columns ::
+@end menu
+
+
+@node Adding stanza numbers
@unnumberedsubsubsec Adding stanza numbers
+@cindex stanza number
+
Stanza numbers can be added by setting @code{stanza}, e.g.,
@lilypond[quote,ragged-right,verbatim,relative=2,fragment]
Hi, my name is Bert.
} \addlyrics {
\set stanza = "2. "
- Oh, ché -- ri, je t'aime
+ Oh, chÃ\83© -- ri, je t'aime
}
@end lilypond
These numbers are put just before the start of the first syllable.
+@node Adding dynamics marks
@unnumberedsubsubsec Adding dynamics marks
Stanzas differing in loudness may be indicated by putting a
>>
@end lilypond
+@node Adding singer names
+@unnumberedsubsubsec Adding singer names
+
@cindex singer name
@cindex name of singer
-@unnumberedsubsubsec Adding singer names
Names of singers can also be added. They are printed at the start of
the line, just like instrument names. They are created by setting
@end lilypond
+@node Printing stanzas at the end
@unnumberedsubsubsec Printing stanzas at the end
Sometimes it is appropriate to have one stanza set
@end lilypond
+@node Printing stanzas at the end in multiple columns
@unnumberedsubsubsec Printing stanzas at the end in multiple columns
When a piece of music has many verses, they are often printed in
@seealso
-Program reference: @internalsref{LyricText}, @internalsref{StanzaNumber},
+Internals Reference: @internalsref{LyricText}, @internalsref{StanzaNumber},
@internalsref{VocalName}.
-
-
-@node Other vocal issues
-@unnumberedsubsubsec Other vocal issues
-
+@c TODO: stick elsewhere
@ignore
+@n ode Other vocal issues
+@s ubsection Other vocal issues
+
yeah, I'm giving up somewhat by stuffing a bunch of things in
here. But at least they're in the manual now; it's easier to
move them around in the manual once they're already here.
Besides, if users complain about everything stuffed in here, I
can ask them for specific instructions about where to move these
examples, and that might get them more involved in the docs. -gp
-@end ignore
+
@q{Parlato} is spoken without pitch but still with rhythm; it is
notated by cross noteheads. This is demonstrated in
@ref{Special noteheads}.
+@end ignore
--- /dev/null
+DOCUMENTATION FORMATTING
+------------------------
+
+The language is called texinfo; you can see its manual here:
+http://www.gnu.org/software/texinfo/manual/texinfo/
+
+However, you don't need to read those docs. The most important
+thing to notice is that text is text. If you see a mistake in the
+text, you can fix it. If you want to change the order of
+something, you can cut-and-paste that stuff into a new location.
+
+
+%%%%% SECTIONING COMMANDS
+
+Most of the manual operates at the
+ @node Foo
+ @unnumberedsubsubsec Foo
+level. Sections are created with
+ @node Foo
+ @subsection Foo
+commands.
+
+* sectioning commands (@node and @section) must not appear inside
+ an @ignore. Separate those commands with a space, ie @n ode.
+
+
+
+%%%%% LILYPOND FORMATTING
+
+* Use two spaces for indentation in lilypond examples. (no tabs)
+
+* If possible, only write one bar per line. The notes on each
+ line should be an independent line.
+ Bad:
+ \override textscript #'padding = #3 c1^"hi"
+ Good:
+ \override textscript #'padding = #3
+ c1^"hi"
+
+* LilyPond input should be produce via
+ @lilypond[verbatim,quote,ragged-right]
+ with `fragment' and `relative=2' optional.
+
+ Examples about page layout may alter the quote/ragged-right
+ options. Omitting `verbatim' is not allowed except for special
+ circumstances.
+
+* Inspirational headwords are produced with
+ @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
+ {pitches-headword.ly}
+
+* Avoid long stretches of input code. Noone is going to read them
+ in print. Please create a smaller example. (the smaller
+ example does not need to be minimal, however)
+
+* If you want to work on an example outside of the manual (for
+ easier/faster processing), use this header:
+
+\paper {
+ #(define dump-extents #t)
+ indent = 0\mm
+ line-width = 160\mm - 2.0 * 0.4\in
+ ragged-right = ##t
+ force-assignment = #""
+ line-width = #(- line-width (* mm 3.000000))
+}
+
+\layout {
+}
+
+ You may not change any of these values. If you are making an
+ example demonstrating special \paper{} values, contact the
+ Documentation Editor.
+
+
+%%%%% TEXT FORMATTING
+
+* Lines should be less than 72 characters long. (I personally
+ recommend writing with 66-char lines, but don't bother modifying
+ existing material.)
+
+* Do not use tabs.
+
+* Do not use spaces at the beginning of a line (except in @example
+ or @verbatim environments), and do not use more than a single
+ space between words. `makeinfo' copies the input lines verbatim
+ without removing those spaces.
+
+* Use two spaces after a period.
+
+* Variables or numbers which consist of a single character
+ (probably followed by a punctuation mark) should be tied
+ properly, either to the previous or the next word. Example:
+
+ The variable@tie{}@var{a} ...
+
+* To get consistent indentation in the DVI output it is better to
+ avoid the @verbatim environment. Use the @example environment
+ instead if possible, but without extraneous indentation. For
+ example, this
+
+ @example
+ foo {
+ bar
+ }
+ @end example
+
+ should be replaced with
+
+ @example
+ foo {
+ bar
+ }
+ @end example
+
+ where `@example' starts the line (without leading spaces).
+
+* Do not compress the input vertically; this is, do not use
+
+ Beginning of logical unit
+ @example
+ ...
+ @end example
+ continuation of logical unit
+
+ but
+
+ Beginning of logical unit
+
+ @example
+ ...
+ @end example
+
+ @noindent
+ continuation of logical unit
+
+ This makes it easier to avoid forgetting the `@noindent'. Only
+ use @noindent if the material is discussing the same material;
+ new material should simply begin without anything special on the
+ line above it.
+
+* in @itemize use @item on a separate line like this:
+ @itemize
+ @item
+ Foo
+
+ @item
+ Bar
+
+ Do not use @itemize @bullet.
+
+
+%%%%% SYNTAX SURVEY
+
+@c - single line comments
+@ignore ... @end ignore - multi-line comment
+
+@cindex - General index. Please add as many as you can.
+@funindex - is for a \lilycommand.
+
+@example ... @end ignore - example text that should be set as a
+ blockquote. Any {} must be escaped with @{ }@
+@itemize @item A @item B ... @end itemize - for bulleted lists.
+ Do not compress vertically like this.
+
+@code{} - typeset in a tt-font. Use for actual lilypond code or
+ property/context names.
+@notation{} - refers to pieces of notation, e.g.
+ "@notation{cres.}". Also use to specific lyrics ("the
+ @notation{A - men} is centered")
+@q{} - Single quotes. Used for `vague' terms.
+@qq{} - Double quotes. Used for actual quotes ("he said").
+
+@warning{}: produces a "Note: " box. Use for important
+ messages.
+
+@tie{} - Variables or numbers which consist of a single character
+ (probably followed by a punctuation mark) should be tied
+ properly, either to the previous or the next word. Example:
+ "The letter@tie{}@q{I} is skipped"
+
+@var - Use for variables.
+@warning{} - produces a "Note: " box.
+ Any `\' used inside this must be written as `\\'.
+
+
+
+%%%%% OTHER TEXT CONCERNS
+
+* References must occur at the end of a sentence, for more
+ information see @ref{the texinfo manual}. Ideally this should
+ also be the final sentence of a paragraph, but this is not
+ required. Any link in a doc section must be duplicated in the
+ @seealso section at the bottom.
+
+* Introducing examples may be done with
+ . (ie finish the previous sentence/paragaph)
+ : (ie `in this example:')
+ , (ie `may add foo with the blah construct,')
+
+* Abbrevs in caps, e.g., HTML, DVI, MIDI, etc.
+
+* Colon usage
+
+ 1. To introduce lists
+ 2. When beginning a quote: "So, he said,..."
+ This usage is rarer. Americans often just use a comma.
+ 3. When adding a defining example at the end of a sentence.
+
+* Non-ASCII characters which are in utf-8 should be directly used;
+ this is, don't say `Ba@ss{}tuba' but `Baßtuba'. This ensures that
+ all such characters appear in all output formats.
+
+* Don't use a @ref{link to another section} in the middle of a
+ sentence. It looks ok in HTML, moderately bad in PDF, and
+ utterly horrible in INFO. Instead, reword the sentence so that
+ users are encouraged to see @ref{link to another section}.
+ (at the end of the sentence)
+
+
mkdir -p $(tree-share-prefix)/tex
cd $(tree-bin) && \
ln -sf ../../lily/$(outconfbase)/lilypond . && \
- for i in abc2ly convert-ly etf2ly lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
+ for i in abc2ly convert-ly etf2ly lilymidi lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
cd $(tree-lib-prefix) && \
ln -s ../../../../python/$(outconfbase) python
import os.path
import shutil
-dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitch','repeats','scheme','spacing','staff','text','vocal','other','nonmusic','engravers','instrument']
+dirs = []
+dirs.extend(['pitches', 'rhythms'])
+
+dirs.extend(['real-music'])
+#dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitch','repeats','scheme','spacing','staff','text','vocal','other','nonmusic','engravers','instrument']
notsafe=[]
try:
dirs, symlinks, files = mirrortree.walk_tree (
tree_roots = doc_dirs,
process_dirs = outdir,
- exclude_dirs = '(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + r'|po|out|\w*?-root)(/|$)',
+ exclude_dirs = '(^|/)(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + r'|po|out|\w*?-root)(/|$)',
find_files = r'.*?\.(?:midi|html|pdf|png|txt|ly|signature)$|VERSION',
exclude_files = r'lily-[0-9a-f]+.*\.pdf')
dirs = [re.sub ('/' + outdir, '', d) for d in dirs]
while outdir in dirs:
dirs.remove (outdir)
-dirs = list( set (dirs))
+dirs = list (set (dirs))
dirs.sort ()
strip_file_name = {}
CPPFLAGS="$save_CPPFLAGS"
-STEPMAKE_MAKEINFO(REQUIRED, 4.8)
+STEPMAKE_MAKEINFO(REQUIRED, 4.11)
STEPMAKE_PYTHON_DEVEL(REQUIRED)
STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.15)
depth = ..
### FIXME: change this back before merging with main!!!
-#SUBDIRS = regression tutorial mutopia manual lsr new
-SUBDIRS = tutorial mutopia manual lsr new
+SUBDIRS = regression tutorial mutopia manual lsr new
+#SUBDIRS = tutorial mutopia manual lsr new
examples = typography-demo les-nereides wilhelmus proportional bach-schenker cary
depth = ../../
-SUBDIRS = ancient chords connecting contemporary education expressive
-SUBDIRS += guitar parts pitch repeats spacing staff text vocal scheme other
+SUBDIRS = pitches rhythms
+
+SUBDIRS += real-music
+
+# old stuffs
+SUBDIRS += ancient chords connecting contemporary education expressive
+SUBDIRS += guitar parts repeats spacing staff text vocal scheme other
SUBDIRS += engravers nonmusic instrument
STEPMAKE_TEMPLATES=documentation texinfo tex
-\version "2.10.0"
+\version "2.11.34"
\header{
texidoc = "@unnumbered LilyPond Examples
These pages show LilyPond examples (snippets) from the
@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+@subheading 1 Musical notation
+
+@strong{@uref{pitches/collated-files.html,Pitches}}
+
+@strong{@uref{rhythms/collated-files.html,Rhythms}}
+(@uref{rhythms/collated-files.pdf,pdf link})
+
+
+@subheading Special collections
+
+@strong{@uref{real-music/collated-files.html,Real music}}
+
+@strong{@uref{scheme/collated-files.html,Advanced stuff with
+scheme}} (actually, still old stuff)
+
+
+@sp 5
+
+@subheading old stuffs
+
@strong{@uref{ancient/collated-files.html,Ancient}}
@strong{@uref{chords/collated-files.html,Chords}}
@strong{@uref{parts/collated-files.html,Preparing parts}}
-@strong{@uref{pitch/collated-files.html,Pitch}}
-
@strong{@uref{repeats/collated-files.html,Repeats}}
@strong{@uref{spacing/collated-files.html,Spacing issues}}
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
-
-\header{
-texidoc = "
-@unnumbered Introduction
-
-This document shows examples from the
-@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
-
-In the web version of this document, you can click on the file name
-or figure for each example to see the corresponding input file."
-}
-
-% make sure .png is generated.
-\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
-
+++ /dev/null
-depth = ../../../
-
-STEPMAKE_TEMPLATES=documentation texinfo tex
-LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
-
-## Hmm, would this work? No -- if we really want examples, move
-## to other dir (input/) comes to mind.
-## examples = font20 ancient-font
-## LOCALSTEPMAKE_TEMPLATES += ly mutopia
-
-EXTRA_DIST_FILES=
-
-include $(depth)/make/stepmake.make
-
-TITLE=Advanced snippets
+++ /dev/null
-# -*-python-*-
-
-Import ('env', 'collate')
-collate (title = 'Advanced snippets')
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
-
-\header { texidoc = "
-The part combiner tool ( \partcombine command ) allows you to combine
-different parts on a same Staff. You can choose whether you want or
-don't want to add texts such as \"solo\" or \"a2\", by defining the
-printPartCombineTexts property.
-
-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 wan't to use standard LilyPond polyphony.
-
-This snippet presents the three ways two parts can be printed on a same
-staff : standard polyphony, \partcombine whitout texts, and
-\partcombine with texts.
-
-
-" }
-
-musicUp = { \time 4/4
- \relative c'' {
- a4 c4.(g8) a4 |
- g4 e' g,( a8 b) |
- c b a2.
- }
-}
-
-musicDown = {
- \relative c'' {
- g4 e4.(d8) c4 |
- r2 g'4( f8 e) |
- d2 a
- }
-}
-\score{
- \new Staff {
- \set Staff.instrumentName = "Standard polyphony "
- << \musicUp \\ \musicDown >>
- }
- \layout{
- indent = 6.0\cm
- }
-}
-
-\score{
- \context Staff {
- \set Staff.instrumentName = "PartCombine without texts "
- \partcombine \musicUp \musicDown
- }
- \layout{
- indent = 6.0\cm
- \context {
- \Voice
- printPartCombineTexts = ##f
- }
- }
-}
-
-\score{
- \context Staff {
- \set Staff.instrumentName = "PartCombine with texts "
- \partcombine \musicUp \musicDown
- }
- \layout{
- indent = 6.0\cm
- \context {
- \Voice
- printPartCombineTexts = ##t
- }
- }
-}
-
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
-
-\header { texidoc = "
-In early XXth century works, starting with Schönberg, Berg and Webern
-(the \"second\" Viennese school), every pitch in the twelve- note 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 (thanks to Rune
-Zedeler) shows how to achieve such notation rules with LilyPond.
-" }
-
-webernAccidentals = {
- % the 5s are just "a value different from any accidental"
- \set Staff.keySignature = #'((0 . 5) (1 . 5) (2 . 5) (3 . 5)
- (4 . 5) (5 . 5) (6 . 5))
- \set Staff.extraNatural = ##f
- #(set-accidental-style 'forget)
-}
-
-\layout {
- \context { \Staff \remove Key_engraver }
-}
-\score {
- {
- \webernAccidentals
- c' dis' cis' cis'
- c' dis' cis' cis'
- c' c' dis' des'
- }
-}
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
-
-\header { texidoc = "
- Normally accidentals are printed automatically, but you may also print
-them manually. A reminder accidental can be forced by adding an
-exclamation mark ! after the pitch. A cautionary accidental (i.e., an
-accidental within parentheses) can be obtained by adding the question
-mark `?' after the pitch.
-
-
-
-Cautionary accidentals may be made smaller, or placed inside
-parentheses
-" }
-
-{
-cis' cis' cis'! cis'?
-
- c''4
- cis''?4
- \once \override Staff.AccidentalCautionary #'font-size = #-2
- cis''?4
- \once \override Staff.AccidentalCautionary #'parenthesized = ##t
- cis''?4
-}
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\header {
-
- texidoc = "Makam is Turkish type of melody that uses 1/9 tone
- microtonal alterations."
-
-}
-
-
-\version "2.11.23"
-
-%{
-
-Define 1/9 alterations.
-
-%}
-
-
-#(define-public KOMA 1/9)
-#(define-public BAKIYE 4/9)
-#(define-public KUCUK 5/9)
-#(define-public BUYUKMUCENNEB 8/9)
-
-%{
-
-Define pitch names
-
-%}
-
-makamPitchNames = #`(
- (c . ,(ly:make-pitch -1 0 NATURAL))
- (d . ,(ly:make-pitch -1 1 NATURAL))
- (e . ,(ly:make-pitch -1 2 NATURAL))
- (f . ,(ly:make-pitch -1 3 NATURAL))
- (g . ,(ly:make-pitch -1 4 NATURAL))
- (a . ,(ly:make-pitch -1 5 NATURAL))
- (b . ,(ly:make-pitch -1 6 NATURAL))
-
- (cc . ,(ly:make-pitch -1 0 KOMA))
- (dc . ,(ly:make-pitch -1 1 KOMA))
- (ec . ,(ly:make-pitch -1 2 KOMA))
- (fc . ,(ly:make-pitch -1 3 KOMA))
- (gc . ,(ly:make-pitch -1 4 KOMA))
- (ac . ,(ly:make-pitch -1 5 KOMA))
- (bc . ,(ly:make-pitch -1 6 KOMA))
-
- (cb . ,(ly:make-pitch -1 0 BAKIYE))
- (db . ,(ly:make-pitch -1 1 BAKIYE))
- (eb . ,(ly:make-pitch -1 2 BAKIYE))
- (fb . ,(ly:make-pitch -1 3 BAKIYE))
- (gb . ,(ly:make-pitch -1 4 BAKIYE))
- (ab . ,(ly:make-pitch -1 5 BAKIYE))
- (bb . ,(ly:make-pitch -1 6 BAKIYE))
-
- (ck . ,(ly:make-pitch -1 0 KUCUK))
- (dk . ,(ly:make-pitch -1 1 KUCUK))
- (ek . ,(ly:make-pitch -1 2 KUCUK))
- (fk . ,(ly:make-pitch -1 3 KUCUK))
- (gk . ,(ly:make-pitch -1 4 KUCUK))
- (ak . ,(ly:make-pitch -1 5 KUCUK))
- (bk . ,(ly:make-pitch -1 6 KUCUK))
-
- (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
- (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
- (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
- (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
- (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
- (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
- (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
-
- ;; f for flat.
- (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
- (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
- (efc . ,(ly:make-pitch -1 2 (- KOMA)))
- (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
- (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
- (afc . ,(ly:make-pitch -1 5 (- KOMA)))
- (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
-
- (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
- (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
- (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
- (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
- (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
- (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
- (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
-
- (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
- (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
- (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
- (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
- (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
- (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
- (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
-
- (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
- (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
- (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
- (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
- (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
- (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
- (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
-
-)
-
-
-%% set pitch names.
-pitchnames = \makamPitchNames
-#(ly:parser-set-note-names parser makamPitchNames)
-
-\paper
-{
- ragged-right = ##t
-}
-
-
-makamGlyphs = #'((1 . "accidentals.doublesharp")
- (8/9 . "accidentals.sharp.slashslashslash.stemstem")
- (5/9 . "accidentals.sharp.slashslashslash.stem")
- (4/9 . "accidentals.sharp")
- (1/9 . "accidentals.sharp.slashslash.stem")
- (0 . "accidentals.natural")
- (-1/9 . "accidentals.mirroredflat")
- (-4/9 . "accidentals.flat.slash")
- (-5/9 . "accidentals.flat")
- (-8/9 . "accidentals.flat.slashslash")
- (-1 . "accidentals.flatflat")
- )
-
-\relative {
-
- %{ define alteration <-> symbol mapping. The following glyphs are available.
-
- accidentals.sharp
- accidentals.sharp.slashslash.stem
- accidentals.sharp.slashslashslash.stemstem
- accidentals.sharp.slashslashslash.stem
- accidentals.sharp.slashslash.stemstemstem
- accidentals.natural
- accidentals.flat
- accidentals.flat.slash
- accidentals.flat.slashslash
- accidentals.mirroredflat.flat
- accidentals.mirroredflat
- accidentals.flatflat
- accidentals.flatflat.slash
- accidentals.doublesharp
-
- %}
-
- \override Accidental #'glyph-name-alist = \makamGlyphs
-
- \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs
- \set Staff.keySignature = #'(
- (3 . 4/9)
- (6 . -1/9))
-
- c cc db fk gbm gfc gfb efk dfbm
-}
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
-
-\header { texidoc = "
-Extending stems to the center line may be prevented using
-@code{no-stem-extend}.
-
-
-" }
-
-\score {
- \context Voice \relative c {
- \context Staff <<
- \new Voice {
- f2 f8 g a b
- \override Stem #'no-stem-extend = ##t
- f2 f8 g a b
- }
- \new Voice {
- c''2 c8 b a g
- \override Stem #'no-stem-extend = ##t
- c2 c8 b a g
- }
- >>
-
- }
-
-}
-
-
+++ /dev/null
-%% Do not edit this file; it is auto-generated from LSR!
-\version "2.11.23"
-
-\header { texidoc = "
-Rests may be used in various styles.
-
-
-
-" }
-
-\layout {
- indent = 0.0
- raggedright = ##t
-}
-
-\context Staff \relative c {
- \set Score.timing = ##f
- \override Staff.Rest #'style = #'mensural
- r\maxima^\markup \typewriter { mensural }
- r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
- \bar ""
-
- \override Staff.Rest #'style = #'neomensural
- r\maxima^\markup \typewriter { neomensural }
- r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
- \bar ""
-
- \override Staff.Rest #'style = #'classical
- r\maxima^\markup \typewriter { classical }
- r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
- \bar ""
-
- \override Staff.Rest #'style = #'default
- r\maxima^\markup \typewriter { default }
- r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-
-}
-
-
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header{
+texidoc = "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file."
+}
+
+% make sure .png is generated.
+\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
+
--- /dev/null
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work? No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES=
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
--- /dev/null
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Ambits can be added per voice. In that case, the ambitus must be moved
+manually to prevent collisions.
+" }
+
+\new Staff <<
+ \new Voice \with {
+ \consists "Ambitus_engraver"
+ } \relative c'' {
+ \override Ambitus #'X-offset = # 1.0
+ \voiceOne
+ c4 a d e f2
+ }
+ \new Voice \with {
+ \consists "Ambitus_engraver"
+ } \relative c' {
+ \voiceTwo
+ es4 f g as b2
+ }
+>>
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Ambituses indicate pitch ranges for voices.
+
+
+Accidentals only show up if they're not part of key signature.
+@code{AmbitusNoteHead} grobs also have ledger lines.
+" }
+
+\layout {
+ ragged-right = ##t
+ \context {
+ \Voice
+ \consists Ambitus_engraver
+ }
+}
+
+\relative
+<<
+ \new Staff {
+ \time 2/4 c4 f'
+ }
+ \new Staff \relative {
+ \time 2/4
+ \key d \major
+ cis as'
+ }
+>>
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The shapeNoteStyles property gives you the ability to define various
+note heads 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 triangle, cross, 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 heads styles, through
+shortcut commands such as \\aikenHeads or \\sacredHarpHeads.
+
+This exemple shows different ways to obtain shape note heads, and
+demonstrates the ability to transpose a melody without losing the
+correspondance between harmonic functions and note heads styles.
+" }
+
+fragment = {
+ \key c \major
+ c1 d e f g a b c
+ \break
+}
+
+\relative {
+ \set shapeNoteStyles = ##(do re mi fa #f la ti)
+ \fragment
+}
+
+% temporary change help LSR integration -gp
+%{
+\transpose c d
+ \relative {
+ \set shapeNoteStyles = ##(do re mi fa #f la ti)
+ \fragment
+}
+
+\relative {
+ \set shapeNoteStyles = ##(cross triangle fa #f mensural xcircle diamond)
+ \fragment
+}
+%}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { 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. The following
+example shows possibilities when setting properties manually.
+" }
+
+{
+ \set Staff.clefGlyph = #"clefs.F"
+ \set Staff.clefPosition = #2
+ c'4
+ \set Staff.clefGlyph = #"clefs.G"
+ c'4
+ \set Staff.clefGlyph = #"clefs.C"
+ c'4
+ \set Staff.clefOctavation = #7
+ c'4
+ \set Staff.clefOctavation = #0
+ \set Staff.clefPosition = #0
+ c'4
+ \clef "bass"
+ c'4
+ \set Staff.middleCPosition = #4
+ c'4
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+ The clef indicates which lines of the staff correspond to which
+pitches. The clef is set with the @code{\\clef} command
+
+
+ @{ c''2 \\clef alto g'2 @}
+
+
+Supported clefs include:
+
+@code{treble, violin, G, G2} G clef on 2nd line @code{alto, C} C clef
+on 3rd line @code{tenor} C clef on 4th line. @code{bass, F} F clef on
+4th line @code{french} G clef on 1st line, so-called French violin clef
+@code{soprano} C clef on 1st line @code{mezzosoprano} C clef on 2nd
+line @code{baritone} C clef on 5th line @code{varbaritone} F clef on
+3rd line @code{subbass} F clef on 5th line @code{percussion} percussion
+clef @code{tab} tablature clef
+
+ By adding @code{_8} or @code{^8} to the clef name, the clef is
+transposed one octave down or up, respectively, and @code{_15} and
+@code{^15} transposes by two octaves. The argument clefname must be
+enclosed in quotes when it contains underscores or digits. See the last
+two bars for an example.
+" }
+
+{ g'2 \clef alto g'2
+ \clef tenor g'2 \clef bass g'2
+ \clef french g'2 \clef soprano g'2
+ \clef mezzosoprano g'2 \clef baritone g'2
+ \clef varbaritone g'2 \clef subbass g'2
+ \clef percussion g'2 \clef tab g'2
+% TO TRANSPOSE THE CLEF ONE OCTAVE UP OR DOWN SEE THE FOLLOWING BARS:
+ \clef "G_8" c'1 \clef "G^8" c'1
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { 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
+functions were borrowed from the Tips and Tricks document in the manual.
+
+This example creates the rhythm used throughout Mars, from The Planets,
+by Gustav Holst.
+" }
+
+#(define (make-note-req p d)
+ (make-music 'NoteEvent
+ 'duration d
+ 'pitch p))
+
+#(define (make-note p d)
+ (make-music 'EventChord
+ 'elements (list (make-note-req p d))))
+
+#(define (seq-music-list elts)
+ (make-music 'SequentialMusic
+ 'elements elts))
+
+#(define (make-triplet elt)
+ (make-music 'TimeScaledMusic
+ 'denominator 3
+ 'numerator 2
+ 'element elt))
+
+
+rhythm = #(define-music-function (parser location note) (ly:music?)
+ "Make the rhythm in Mars (the Planets) at the given note's pitch"
+ (let* ((p (ly:music-property
+ (car (ly:music-property note 'elements))
+ 'pitch)))
+ (seq-music-list (list
+ (make-triplet (seq-music-list (list
+ (make-note p (ly:make-duration 3 0 2 3))
+ (make-note p (ly:make-duration 3 0 2 3))
+ (make-note p (ly:make-duration 3 0 2 3))
+ )))
+ (make-note p (ly:make-duration 2 0))
+ (make-note p (ly:make-duration 2 0))
+ (make-note p (ly:make-duration 3 0))
+ (make-note p (ly:make-duration 3 0))
+ (make-note p (ly:make-duration 2 0))
+ ))))
+
+\score {
+ \new Staff {
+ \time 5/4
+
+ \rhythm c'
+ \rhythm c''
+ \rhythm g
+ }
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+This example shows prelude in C major of WTK1, but coded using Scheme
+functions to avoid typing work.
+" }
+
+\version "2.11.23"
+
+\include "deutsch.ly"
+#(define (transform music)
+ (let* ((es (ly:music-property music 'elements))
+ (n (ly:music-property music 'name)))
+ (if (not (equal? n 'SequentialMusic))
+ (ly:warning "transform needs SequentialMusic, got ~a" n)
+ (begin
+ (let recurse ((elts es))
+ (if (not (equal? elts '()))
+ (begin
+ ((trans (ly:music-property (cadr elts) 'elements)) (car
+elts))
+ (set-cdr! elts (cddr elts))
+ (recurse (cdr elts))
+ )))))
+ music
+ ))
+
+#(define ((trans pitches) music)
+ (let* ((es (ly:music-property music 'elements))
+ (e (ly:music-property music 'element))
+ (p (ly:music-property music 'pitch)))
+
+ (if (pair? es)
+ (ly:music-set-property!
+ music 'elements
+ (map (trans pitches) es)))
+
+ (if (ly:music? e)
+ (ly:music-set-property!
+ music 'element
+ ((trans pitches) e)))
+
+ (if (ly:pitch? p)
+ (let* ((o (ly:pitch-octave p))
+ (n (ly:pitch-notename p))
+ (i (+ (* 7 o) n))
+ (pes (ly:music-property (list-ref pitches i) 'elements))
+ (pnew (ly:music-property (car pes) 'pitch))
+ )
+ (ly:music-set-property! music 'pitch pnew)
+ ))
+ music))
+
+
+
+
+
+
+
+pat = \transpose c c' \repeat unfold 2 {
+ << { \context Staff = "up" {r8 e16 f g e f g } }
+ { \context Staff = "down" <<
+ \context Voice = "vup" { \stemUp \tieUp r16 d8.~d4 }
+ \context Voice = "vdwn" { \stemDown c2 }
+ >> }
+ >>
+}
+
+enda = { r8 f,16 a, c f c a, \stemUp c \change Staff = down
+ a, f, a, f, d, f, d, \change Staff = up \stemNeutral
+ r8 g16 h d' f' d' h d' h g h d f e\prall d <e g c'>1^\fermata \bar
+"|."
+}
+endb = {\stemUp \tieUp r16 c,8.~c,4~c,2 r16 h,,8.~h,,4~h,,2 c,1 \bar
+"|."}
+endc = {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
+
+\score {
+ \transpose c c' \context PianoStaff <<
+ \new Staff = "up" { \clef "G" }
+ \new Staff = "down" { \clef "F" }
+ { \applyMusic #transform {
+ \pat {c e g c' e' }
+ \pat {c d a d' f' }
+ }
+ % Etc, we get the idea now
+ }
+ >>
+}
+
+
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+In early XXth century works, starting with Schönberg, Berg and Webern
+(the \"second\" Viennese school), every pitch in the twelve- note 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 (thanks to Rune
+Zedeler) shows how to achieve such notation rules with LilyPond.
+" }
+
+webernAccidentals = {
+ % the 5s are just "a value different from any accidental"
+ \set Staff.keySignature = #'((0 . 5) (1 . 5) (2 . 5) (3 . 5)
+ (4 . 5) (5 . 5) (6 . 5))
+ \set Staff.extraNatural = ##f
+ #(set-accidental-style 'forget)
+}
+
+\layout {
+ \context { \Staff \remove Key_engraver }
+}
+\score {
+ {
+ \webernAccidentals
+ c' dis' cis' cis'
+ c' dis' cis' cis'
+ c' c' dis' des'
+ }
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+ Normally accidentals are printed automatically, but you may also print
+them manually. A reminder accidental can be forced by adding an
+exclamation mark ! after the pitch. A cautionary accidental (i.e., an
+accidental within parentheses) can be obtained by adding the question
+mark `?' after the pitch.
+
+
+
+Cautionary accidentals may be made smaller, or placed inside
+parentheses
+" }
+
+{
+cis' cis' cis'! cis'?
+
+ c''4
+ cis''?4
+ \once \override Staff.AccidentalCautionary #'font-size = #-2
+ cis''?4
+ \once \override Staff.AccidentalCautionary #'parenthesized = ##t
+ cis''?4
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+This Scheme-based snippet allows you to generate 256 random notes 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.
+" }
+
+\score {
+{ #(let ((random-state (seed->random-state (current-time))))
+ (ly:export
+ (make-music 'SequentialMusic 'elements
+ (map (lambda x
+ (let ((idx (random 12 random-state)))
+ (make-music 'EventChord
+ 'elements (list (make-music 'NoteEvent
+ 'duration (ly:make-duration 2 0 1 1)
+ 'pitch (ly:make-pitch (quotient idx 7)
+ (remainder idx 7)
+ 0))))))
+ (make-list 256)))))
+ }
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The key signature indicates the tonality in which a piece is played.
+It is denoted by a set of alterations (flats or sharps) at the start of
+the staff.
+
+ Setting or changing the key signature is done with the @code{\\key}
+command
+
+
+@code{\\key} pitch type
+
+
+Here, type should be @code{\\major} or @code{\\minor} to get
+pitch-major or pitch-minor, respectively. You may also use the
+standard mode names (also called “church modes”): @code{\\ionian},
+@code{\\locrian}, @code{\\aeolian}, @code{\\mixolydian},
+@code{\\lydian}, @code{\\phrygian}, and @code{\\dorian}.
+
+
+This command sets the context property @code{Staff.keySignature}.
+Non-standard key signatures can be specified by setting this property
+directly.
+
+
+Accidentals and key signatures often confuse new users, because
+unaltered notes get natural signs depending on the key signature.
+" }
+
+\relative c''
+{
+\key d \major
+a b cis d
+\key g \minor
+a bes c d
+\set Staff.printKeyCancellation = ##f
+\key d \major
+a b cis d
+\key g \minor
+a bes c d
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\header {
+
+ texidoc = "Makam is Turkish type of melody that uses 1/9 tone
+ microtonal alterations."
+
+}
+
+
+\version "2.11.23"
+
+%{
+
+Define 1/9 alterations.
+
+%}
+
+
+#(define-public KOMA 1/9)
+#(define-public BAKIYE 4/9)
+#(define-public KUCUK 5/9)
+#(define-public BUYUKMUCENNEB 8/9)
+
+%{
+
+Define pitch names
+
+%}
+
+makamPitchNames = #`(
+ (c . ,(ly:make-pitch -1 0 NATURAL))
+ (d . ,(ly:make-pitch -1 1 NATURAL))
+ (e . ,(ly:make-pitch -1 2 NATURAL))
+ (f . ,(ly:make-pitch -1 3 NATURAL))
+ (g . ,(ly:make-pitch -1 4 NATURAL))
+ (a . ,(ly:make-pitch -1 5 NATURAL))
+ (b . ,(ly:make-pitch -1 6 NATURAL))
+
+ (cc . ,(ly:make-pitch -1 0 KOMA))
+ (dc . ,(ly:make-pitch -1 1 KOMA))
+ (ec . ,(ly:make-pitch -1 2 KOMA))
+ (fc . ,(ly:make-pitch -1 3 KOMA))
+ (gc . ,(ly:make-pitch -1 4 KOMA))
+ (ac . ,(ly:make-pitch -1 5 KOMA))
+ (bc . ,(ly:make-pitch -1 6 KOMA))
+
+ (cb . ,(ly:make-pitch -1 0 BAKIYE))
+ (db . ,(ly:make-pitch -1 1 BAKIYE))
+ (eb . ,(ly:make-pitch -1 2 BAKIYE))
+ (fb . ,(ly:make-pitch -1 3 BAKIYE))
+ (gb . ,(ly:make-pitch -1 4 BAKIYE))
+ (ab . ,(ly:make-pitch -1 5 BAKIYE))
+ (bb . ,(ly:make-pitch -1 6 BAKIYE))
+
+ (ck . ,(ly:make-pitch -1 0 KUCUK))
+ (dk . ,(ly:make-pitch -1 1 KUCUK))
+ (ek . ,(ly:make-pitch -1 2 KUCUK))
+ (fk . ,(ly:make-pitch -1 3 KUCUK))
+ (gk . ,(ly:make-pitch -1 4 KUCUK))
+ (ak . ,(ly:make-pitch -1 5 KUCUK))
+ (bk . ,(ly:make-pitch -1 6 KUCUK))
+
+ (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
+ (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
+ (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
+ (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
+ (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
+ (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
+ (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
+
+ ;; f for flat.
+ (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
+ (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
+ (efc . ,(ly:make-pitch -1 2 (- KOMA)))
+ (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
+ (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
+ (afc . ,(ly:make-pitch -1 5 (- KOMA)))
+ (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
+
+ (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
+ (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
+ (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
+ (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
+ (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
+ (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
+ (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
+
+ (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
+ (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
+ (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
+ (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
+ (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
+ (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
+ (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
+
+ (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
+ (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
+ (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
+ (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
+ (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
+ (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
+ (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
+
+)
+
+
+%% set pitch names.
+pitchnames = \makamPitchNames
+#(ly:parser-set-note-names parser makamPitchNames)
+
+\paper
+{
+ ragged-right = ##t
+}
+
+
+makamGlyphs = #'((1 . "accidentals.doublesharp")
+ (8/9 . "accidentals.sharp.slashslashslash.stemstem")
+ (5/9 . "accidentals.sharp.slashslashslash.stem")
+ (4/9 . "accidentals.sharp")
+ (1/9 . "accidentals.sharp.slashslash.stem")
+ (0 . "accidentals.natural")
+ (-1/9 . "accidentals.mirroredflat")
+ (-4/9 . "accidentals.flat.slash")
+ (-5/9 . "accidentals.flat")
+ (-8/9 . "accidentals.flat.slashslash")
+ (-1 . "accidentals.flatflat")
+ )
+
+\relative {
+
+ %{ define alteration <-> symbol mapping. The following glyphs are available.
+
+ accidentals.sharp
+ accidentals.sharp.slashslash.stem
+ accidentals.sharp.slashslashslash.stemstem
+ accidentals.sharp.slashslashslash.stem
+ accidentals.sharp.slashslash.stemstemstem
+ accidentals.natural
+ accidentals.flat
+ accidentals.flat.slash
+ accidentals.flat.slashslash
+ accidentals.mirroredflat.flat
+ accidentals.mirroredflat
+ accidentals.flatflat
+ accidentals.flatflat.slash
+ accidentals.doublesharp
+
+ %}
+
+ \override Accidental #'glyph-name-alist = \makamGlyphs
+
+ \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs
+ \set Staff.keySignature = #'(
+ (3 . 4/9)
+ (6 . -1/9))
+
+ c cc db fk gbm gfc gfb efk dfbm
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Half-flats and half-sharps are formed by adding -eh and -ih; the
+following is a series of Cs with increasing pitches. Micro tones are
+also exported to the MIDI file. There are no generally accepted
+standards for denoting three quarter flats, so LilyPond's symbol does
+not conform to any standard.
+" }
+
+\relative c''
+{
+{ ceseh ceh cih cisih }
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The notes are specified by the letters a through g. The octave is
+formed with notes ranging from c to b. The pitch c is an octave below
+middle C and the letters span the octave above that C.
+" }
+
+{
+\clef bass
+a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+A sharp is formed by adding -is to the end of a pitch name and a flat
+is formed by adding -es. Double sharps and double flats are obtained by
+adding -isis or -eses. These names are the Dutch note names. In Dutch,
+aes is contracted to as, but both forms are accepted. Similarly, both
+es and ees are accepted.
+" }
+
+\relative c''
+{
+% ly snippet contents follows:
+ceses4
+ces
+c
+cis
+cisis
+
+% end ly snippet
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The optional octave specification takes the form of a series of single
+quote (`'') characters or a series of comma (`,') characters. Each '
+raises the pitch by one octave; each , lowers the pitch by an octave
+" }
+
+{
+c' c'' es' g' as' gisis' ais'
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+There is a way to enforce enharmonic modifications for notes in order
+to have the minimum number of accidentals. In that case, ``Double
+accidentals should be removed, as well as E-sharp (-> F), bC (-> B), bF
+(-> E), B-sharp (-> C).'', as proposed by a request for a new feature.
+In this manner, the most natural enharmonic notes are chosen in this
+example.
+" }
+
+#(define (naturalise-pitch p)
+ (let* ((o (ly:pitch-octave p))
+ (a (ly:pitch-alteration p))
+ (n (ly:pitch-notename p)))
+
+ (cond
+ ((and (> a 1) (or (eq? n 6) (eq? n 2)))
+ (set! a (- a 2))
+ (set! n (+ n 1)))
+ ((and (< a -1) (or (eq? n 0) (eq? n 3)))
+ (set! a (+ a 2))
+ (set! n (- n 1))))
+
+ (cond
+ ((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
+ ((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
+
+ (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))
+ (if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7))))
+
+ (ly:make-pitch o n a)))
+
+#(define (naturalise music)
+ (let* ((es (ly:music-property music 'elements))
+ (e (ly:music-property music 'element))
+ (p (ly:music-property music 'pitch)))
+
+ (if (pair? es)
+ (ly:music-set-property!
+ music 'elements
+ (map (lambda (x) (naturalise x)) es)))
+
+ (if (ly:music? e)
+ (ly:music-set-property!
+ music 'element
+ (naturalise e)))
+
+ (if (ly:pitch? p)
+ (begin
+ (set! p (naturalise-pitch p))
+ (ly:music-set-property! music 'pitch p)))
+
+ music))
+
+music = \relative c' { c4 d e f g a b c }
+
+naturaliseMusic =
+#(define-music-function (parser location m)
+ (ly:music?)
+ (naturalise m))
+
+\score {
+ \context Staff {
+ \transpose c ais \music
+ \naturaliseMusic \transpose c ais \music
+ \transpose c deses \music
+ \naturaliseMusic \transpose c deses \music
+ }
+ \layout { ragged-right = ##t}
+}
+
+
--- /dev/null
+\version "2.10.0"
+
+\header{
+texidoc = "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file."
+}
+
+% make sure .png is generated.
+\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
+
--- /dev/null
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work? No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES=
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
--- /dev/null
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+This example shows prelude in C major of WTK1, but coded using Scheme
+functions to avoid typing work.
+" }
+
+\version "2.11.23"
+
+\include "deutsch.ly"
+#(define (transform music)
+ (let* ((es (ly:music-property music 'elements))
+ (n (ly:music-property music 'name)))
+ (if (not (equal? n 'SequentialMusic))
+ (ly:warning "transform needs SequentialMusic, got ~a" n)
+ (begin
+ (let recurse ((elts es))
+ (if (not (equal? elts '()))
+ (begin
+ ((trans (ly:music-property (cadr elts) 'elements)) (car
+elts))
+ (set-cdr! elts (cddr elts))
+ (recurse (cdr elts))
+ )))))
+ music
+ ))
+
+#(define ((trans pitches) music)
+ (let* ((es (ly:music-property music 'elements))
+ (e (ly:music-property music 'element))
+ (p (ly:music-property music 'pitch)))
+
+ (if (pair? es)
+ (ly:music-set-property!
+ music 'elements
+ (map (trans pitches) es)))
+
+ (if (ly:music? e)
+ (ly:music-set-property!
+ music 'element
+ ((trans pitches) e)))
+
+ (if (ly:pitch? p)
+ (let* ((o (ly:pitch-octave p))
+ (n (ly:pitch-notename p))
+ (i (+ (* 7 o) n))
+ (pes (ly:music-property (list-ref pitches i) 'elements))
+ (pnew (ly:music-property (car pes) 'pitch))
+ )
+ (ly:music-set-property! music 'pitch pnew)
+ ))
+ music))
+
+
+
+
+
+
+
+pat = \transpose c c' \repeat unfold 2 {
+ << { \context Staff = "up" {r8 e16 f g e f g } }
+ { \context Staff = "down" <<
+ \context Voice = "vup" { \stemUp \tieUp r16 d8.~d4 }
+ \context Voice = "vdwn" { \stemDown c2 }
+ >> }
+ >>
+}
+
+enda = { r8 f,16 a, c f c a, \stemUp c \change Staff = down
+ a, f, a, f, d, f, d, \change Staff = up \stemNeutral
+ r8 g16 h d' f' d' h d' h g h d f e\prall d <e g c'>1^\fermata \bar
+"|."
+}
+endb = {\stemUp \tieUp r16 c,8.~c,4~c,2 r16 h,,8.~h,,4~h,,2 c,1 \bar
+"|."}
+endc = {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
+
+\score {
+ \transpose c c' \context PianoStaff <<
+ \new Staff = "up" { \clef "G" }
+ \new Staff = "down" { \clef "F" }
+ { \applyMusic #transform {
+ \pat {c e g c' e' }
+ \pat {c d a d' f' }
+ }
+ % Etc, we get the idea now
+ }
+ >>
+}
+
+
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The \\markup command is quite versatile. In this snippet, it contains a
+\\score bloc instead of texts or marks.
+" }
+
+tuning = \markup {
+ \score {
+ \new Staff \with {
+ \remove Time_signature_engraver
+ } {
+ \clef bass <c, g, d g>1
+ }
+ \layout { ragged-right = ##t }
+ }
+}
+
+
+\header {
+ title = "Solo Cello Suites"
+ subtitle = "Suite IV"
+ subsubtitle = \markup { "Originalstimmung:" \tuning }
+}
+
+\relative {
+ \time 4/8
+ \times 2/3 { c'8 d e } \times 2/3 {c d e}
+ \times 2/3 { c8 d e } \times 2/3 {c d e}
+ g8 a8 g8 a
+ g8 a8 g8 a
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+A template to write score for a diatonic accordion.
+
+- There is a horizontal staff indicating if the accordion must be
+pushed (thick line) or pulled (thin line)
+
+- There is a small rhytmic staff with lyrics that describes the bass
+buttons to press. The bar-lines are made of gridlines ( Gridlines,
+not a really satisfying solution, but the best I found)
+
+- The tabulator staff for diatonic accordions shows the geographic
+position of the buttons and not (as for every other instrument) the
+pitch of the tones. The keys on the melody-side of the accordion are
+placed in three columns and about 12 rows. In the tabulator staff
+notation the - most outer column is described with notes between
+lines - most inner column is described with notes between lines with
+a cross as accidental - middle column is described with notes on a
+line, whereby the row in the middle is represented on the middle
+line in the staff.
+
+
+
+Some words to transpose piano note to the diatonic accordion.
+------------------------------------------------------------ 1. Every
+diatonic accordion is built for some keys only. For example for the
+key of C-major and F-major. So it is important to transpose a piano
+melody to match one of these keys. Transpose the source code, not
+only the output because you need this code later on to translate it
+once more to the tabulator staff. This can be done with the command
+'displayLilyMusic'.
+
+2. You have to alternate the push and pull-direction of the accordion
+regularely. If the player has a too long part to pull the accordion
+gets broken. At the other hand some harmonies are only available in
+one direction (push or pull) Considering this decide which parts of
+the melody are the push-parts and whic the pull-parts.
+
+3. For each pull- / or push-part translate the piano notes to the
+according tabulatur representation.
+
+This snippet comes with a useful optional macro for the jEdit text
+editor.
+" }
+
+% Created on Sat Aug 17 2007 by ak
+
+verse= \lyricmode { Wie gross bist du! Wie gross bist du! }
+
+harmonies = \new ChordNames \chordmode {
+ \germanChords \set chordChanges = ##t
+ bes8 bes8 bes8 es2 f bes1
+}
+
+NoStem = \override Stem #'transparent = ##t
+NoNoteHead= \override NoteHead #'transparent = ##t
+ZeroBeam = \override Beam #'positions = #'(0 . 0)
+
+staffTabLine = \new Staff \with { \remove "Time_signature_engraver" \remove "Clef_engraver" } {
+ \override Staff.StaffSymbol #'line-positions = #'( 0 )
+% Shows one horizontal line. The vertical line (simulating a bar-line) is simulated with a gridline
+ \set Staff.midiInstrument="choir aahs"
+ \key c \major
+ \relative c''
+ {
+ % disable the following line to see the the noteheads while writing the song
+ \NoNoteHead
+ \override NoteHead #'no-ledgers = ##t
+
+ % The beam between 8th-notes is used to draw the push-line
+ %How to fast write the push-lines:
+ % 1. write repeatedly 'c c c c c c c c |' for the whole length of the song
+ % 2. uncomment the line \NoNoteHead
+ % 3. compile
+ % 4. Mark the positions on which push/pull changes.
+ % In the score-picture click on the position the push- or pull-part starts
+ % (on the noteHead, the cursor will change to a hand-icon).
+ % The cursor in the source code will jump just at this position.
+ % a) If a push-part starts there, replace the 'c' by an 'e['
+ % b) If a pull-part starts there, replace the 'c' by an 's'
+ % 5. Switch into 'overwrite-mode' by pressing the 'ins' key.
+ % 6. For the pull-parts overwrite the 'c' with 's'
+ % 7. For every push-part replace the last 'c' with 'e]'
+ % 8. Switch into 'insert-mode' again
+ % 9. At last it should look lik e.g. (s s e[ c | c c c c c c c c | c c c c c c e] s s)
+ % 10. re-enable the line \NoNoteHead
+ \autoBeamOff
+ \ZeroBeam
+ s8 s s | e[ c c c c c c e] | s s s s s
+ }
+}
+
+%{
+notePush= { e f fis g a c' c' d' ees' e' f' fis' g' a' bes' c'' c'' d'' ees'' e'' f'' fis'' g'' a'' c''' c''' ees''' e''' f''' g''' a''' }
+tabPush= { g f e b a d' c' bisis disis' f' e' aisis' a' g' fisis' b' c'' eisis'' cisis'' e'' d'' gisis'' g'' f'' a'' b'' bisis'' d''' c''' f''' e''' }
+
+notePull= { g aes bes b c' cis' d' ees' e' f' fis' g' aes' a' bes' b' c'' cis'' d'' ees'' e'' f'' g'' aes'' a'' bes'' b'' c''' cis''' d''' e''' }
+tabPull= { g e f b a disis' d' bisis c' f' fisis' e' aisis' a' g' c'' b' cisis'' e'' eisis'' d'' g'' f'' gisis'' b'' a'' d''' f''' bisis'' c''' e''' }
+%}
+
+% Accordion melody in tabulator score
+% 1. Place a copy of the piano melody below
+% 2. Separate piano melody into pull- and push-parts according to the staffTabLine you've already made
+% 3. For each line: Double the line. Remark the 1st one (Keeps unchanged as reference) and then change the second line using the transformation paper
+% or the macros 'conv2diaton push.bsh' and 'conv2diaton pull.bsh'
+% Tips:
+% - In jEdit Search & Replace mark the Option 'Keep Dialog'
+
+AccordionTabTwoCBesDur= {
+ % pull 1
+ %<f' bes'>8 <f' a'>8 <d' bes'>8 |
+<g'' a''>8 <g'' b''>8 <e'' a''>8 |
+ % push 2
+ %<g' c''>4 <f' d''> <g' ees''> <f' a'> |
+<g'' a''>4 <d'' eisis''> <g'' bisis''> <d'' f''> |
+ % pull 3
+% <f' bes'>2 r8 }
+ <g'' a''>2 r8 }
+
+ AccordionTab= { \dynamicUp
+% 1. Place a copy of the piano melody above
+% 2. Separate piano melody into pull- and push-parts according to the staffTabLine you've already made
+% 3. For each line: Double the line. Remark the 1st one (Keeps unchanged as reference) and then
+% change the second line using the transformation paper
+% Tips:
+% - In jEdit Search & Replace mark the Option 'Keep Dialog'
+% -
+\AccordionTabTwoCBesDur
+ }
+
+
+
+ \layout {
+ \context {
+ \Staff
+ \consists "Grid_point_engraver"
+
+ gridInterval = #(ly:make-moment 4 4) % 4/4 - tact. How many beats per bar
+
+ % The following line has to be adjusted O-F-T-E-N.
+ \override GridPoint #'Y-extent = #'(-2 . -21)
+ }
+ \context {
+ \ChoirStaff
+ \remove "System_start_delimiter_engraver"
+ }
+}
+
+staffVoice = \new Staff=astaffvoice {
+ \time 4/4
+ \set Staff.instrumentName="Voice"
+ \set Staff.midiInstrument="voice oohs"
+ \key bes \major
+ \partial 8*3
+ \clef treble
+ {
+ \context Voice = "melodyVoi"
+ { <f' bes'>8 <f' a'>8 <d' bes'>8 | <g' c''>4 <f' d''> <g' es''> <f' a'> | <f' bes'>2 r8 }
+ \bar "|."
+ }
+}
+
+staffAccordionMel = \new Staff \with { \remove "Clef_engraver" } {
+ #(set-accidental-style 'forget) %Set the accidentals (Vorzeichen) for each note,
+ %do not remember them for the rest of the measure.
+ \time 4/4
+ \set Staff.instrumentName="Accordion"
+ \set Staff.midiInstrument="voice oohs"
+ \key c \major
+ \clef treble
+ { \AccordionTab \bar "|." }
+}
+
+ AltOn = #(define-music-function (parser location mag) (number?)
+ #{ \override Stem #'length = #$(* 7.0 mag)
+ \override NoteHead #'font-size =
+ #$(inexact->exact (* (/ 6.0 (log 2.0)) (log mag))) #})
+
+ AltOff = {
+ \revert Stem #'length
+ \revert NoteHead #'font-size
+ }
+
+BassRhytm = {s4 s8 | c2 c2 | c2 s8 }
+LyricBassRhythmI= \lyricmode { c b | c }
+
+staffBassRhytm = \new Staff=staffbass \with { \remove "Clef_engraver" } {
+ % This is not a RhythmicStaff because it must be possible to append lyrics.
+
+ \override Score.GridLine #'extra-offset = #'( 13.0 . 0.0 ) % x.y
+ \override Staff.StaffSymbol #'line-positions = #'( 0 )
+ % Shows one horizontal line. The vertical line (simulating a bar-line) is simulated by a grid
+ % Search for 'grid' in this page to find all related functions
+ \time 4/4
+ {
+ \context Voice = "VoiceBassRhytm"
+ \stemDown \AltOn #0.6
+ \relative c''
+ {
+ \BassRhytm
+ }
+ \AltOff
+ \bar "|."
+ }
+}
+
+\new Score
+\with {
+ \consists "Grid_line_span_engraver" %The vertical line (simulating a bar-line) in the staffBassRhytm is a gridline
+}
+\new ChoirStaff
+ <<
+ \harmonies
+ \staffVoice
+ \context Lyrics = "lmelodyVoi" \with {alignBelowContext=astaffvoice} { \lyricsto "melodyVoi" \verse }
+ \staffAccordionMel
+ \staffTabLine
+ \staffBassRhytm
+ \context Lyrics = "lBassRhytmAboveI" \with {alignAboveContext=staffbass} \lyricsto VoiceBassRhytm \LyricBassRhythmI
+ >>
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% APPENDIX %
+% macro 'macro_conv2diaton_push.bsh' for jedit editor %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%{
+// original saved in 'Handorg_Adria_Diaton_III.xls'
+// Save this buffer, to the other recorded macros in the jedit editor
+// and the macro should appear in the
+// Macros menu.
+
+// /ak 17.8.07 This macro from converts lilypond piano notation into
+// lilypond tabulator notation for the push-part (at the bottom the pull-part) of a diatonic accordion
+// It replaces the piano notes of the line where the cursor is by the accordion notation
+
+
+
+// Known issues: 1) A note at the end of line is not replaced
+
+textArea.goToEndOfWhiteSpace(false);
+textArea.goToStartOfWhiteSpace(true);
+
+
+String firstName, lastName;
+
+int ReplaceTextInSelection(String sfind, String sreplace)
+{
+//MsgConcat = new StringBuffer(512);
+//MsgConcat.append("Ha");
+
+//Macros.message(view, "On that line replace \"" + sfind + "\" by \"" + sreplace+ "\"");
+SearchAndReplace.setSearchString(sfind.toString());
+SearchAndReplace.setReplaceString(sreplace.toString());
+SearchAndReplace.setBeanShellReplace(false);
+SearchAndReplace.setIgnoreCase(true);
+SearchAndReplace.replace(view);
+SearchAndReplace.setRegexp(true);
+return 1;
+}
+
+
+String smainfind;
+String smainrepl;
+
+
+// Push-part tmp
+smainfind="(\\s|^|<|\\{)(c,)([^\'^is^es])"; smainrepl="$1tmpd\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis,)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des,)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d,)([^\'^is^es])"; smainrepl="$1tmpbisis-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis,)([^\'^is^es])"; smainrepl="$1tmpdisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees,)([^\'^is^es])"; smainrepl="$1tmpdisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e,)([^\'^is^es])"; smainrepl="$1tmpg$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f,)([^\'^is^es])"; smainrepl="$1tmpf$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis,)([^\'^is^es])"; smainrepl="$1tmpe$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges,)([^\'^is^es])"; smainrepl="$1tmpe$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g,)([^\'^is^es])"; smainrepl="$1tmpb$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis,)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes,)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a,)([^\'^is^es])"; smainrepl="$1tmpa$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais,)([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes,)([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b,)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(c)([^\'^is^es])"; smainrepl="$1tmpd\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d)([^\'^is^es])"; smainrepl="$1tmpbisis$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis)([^\'^is^es])"; smainrepl="$1tmpdisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees)([^\'^is^es])"; smainrepl="$1tmpdisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e)([^\'^is^es])"; smainrepl="$1tmpf\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f)([^\'^is^es])"; smainrepl="$1tmpe\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis)([^\'^is^es])"; smainrepl="$1tmpaisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges)([^\'^is^es])"; smainrepl="$1tmpaisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g)([^\'^is^es])"; smainrepl="$1tmpa\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a)([^\'^is^es])"; smainrepl="$1tmpg\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais)([^\'^is^es])"; smainrepl="$1tmpfisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes)([^\'^is^es])"; smainrepl="$1tmpfisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b)([^\'^is^es])"; smainrepl="$1tmpr$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(c\')([^\'^is^es])"; smainrepl="$1tmpb\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d\')([^\'^is^es])"; smainrepl="$1tmpeisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis\')([^\'^is^es])"; smainrepl="$1tmpcisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees\')([^\'^is^es])"; smainrepl="$1tmpcisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e\')([^\'^is^es])"; smainrepl="$1tmpe\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f\')([^\'^is^es])"; smainrepl="$1tmpd\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g\')([^\'^is^es])"; smainrepl="$1tmpg\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(as\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a\')([^\'^is^es])"; smainrepl="$1tmpf\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais\')([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes\')([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(c\'\')([^\'^is^es])"; smainrepl="$1tmpa\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d\'\')([^\'^is^es])"; smainrepl="$1tmpeisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis\'\')([^\'^is^es])"; smainrepl="$1tmpbisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees\'\')([^\'^is^es])"; smainrepl="$1tmpbisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e\'\')([^\'^is^es])"; smainrepl="$1tmpd\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f\'\')([^\'^is^es])"; smainrepl="$1tmpc\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis\'\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges\'\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g\'\')([^\'^is^es])"; smainrepl="$1tmpf\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a\'\')([^\'^is^es])"; smainrepl="$1tmpe\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+
+smainfind="(\\s|^|<|\\{)(tmp)()"; smainrepl="$1$3"; ReplaceTextInSelection( smainfind, smainrepl );
+*/
+
+/*
+// Pull-part tmp
+smainfind="(\\s|^|<|\\{)(c,)([^\'^is^es])"; smainrepl="$1tmpa-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis,)([^\'^is^es])"; smainrepl="$1tmpdisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des,)([^\'^is^es])"; smainrepl="$1tmpdisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d,)([^\'^is^es])"; smainrepl="$1tmpd\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis,)([^\'^is^es])"; smainrepl="$1tmpbisis-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees,)([^\'^is^es])"; smainrepl="$1tmpbisis-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e,)([^\'^is^es])"; smainrepl="$1tmpc\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f,)([^\'^is^es])"; smainrepl="$1tmpf\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis,)([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges,)([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g,)([^\'^is^es])"; smainrepl="$1tmpg$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis,)([^\'^is^es])"; smainrepl="$1tmpe$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes,)([^\'^is^es])"; smainrepl="$1tmpe$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a,)([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais,)([^\'^is^es])"; smainrepl="$1tmpf$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes,)([^\'^is^es])"; smainrepl="$1tmpf$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b,)([^\'^is^es])"; smainrepl="$1tmpb$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(c)([^\'^is^es])"; smainrepl="$1tmpa$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis)([^\'^is^es])"; smainrepl="$1tmpdisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des)([^\'^is^es])"; smainrepl="$1tmpdisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d)([^\'^is^es])"; smainrepl="$1tmpd\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis)([^\'^is^es])"; smainrepl="$1tmpbisis$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees)([^\'^is^es])"; smainrepl="$1tmpbisis$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e)([^\'^is^es])"; smainrepl="$1tmpc\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f)([^\'^is^es])"; smainrepl="$1tmpf\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis)([^\'^is^es])"; smainrepl="$1tmpfisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges)([^\'^is^es])"; smainrepl="$1tmpfisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g)([^\'^is^es])"; smainrepl="$1tmpe\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis)([^\'^is^es])"; smainrepl="$1tmpaisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes)([^\'^is^es])"; smainrepl="$1tmpaisis\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a)([^\'^is^es])"; smainrepl="$1tmpa\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais)([^\'^is^es])"; smainrepl="$1tmpg\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes)([^\'^is^es])"; smainrepl="$1tmpg\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b)([^\'^is^es])"; smainrepl="$1tmpc\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(c\')([^\'^is^es])"; smainrepl="$1tmpb\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis\')([^\'^is^es])"; smainrepl="$1tmpcisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des\')([^\'^is^es])"; smainrepl="$1tmpcisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d\')([^\'^is^es])"; smainrepl="$1tmpe\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis\')([^\'^is^es])"; smainrepl="$1tmpeisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees\')([^\'^is^es])"; smainrepl="$1tmpeisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e\')([^\'^is^es])"; smainrepl="$1tmpd\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f\')([^\'^is^es])"; smainrepl="$1tmpg\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis\')([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges\')([^\'^is^es])"; smainrepl="$1tmpfisis\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g\')([^\'^is^es])"; smainrepl="$1tmpf\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a\')([^\'^is^es])"; smainrepl="$1tmpb\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais\')([^\'^is^es])"; smainrepl="$1tmpa\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes\')([^\'^is^es])"; smainrepl="$1tmpa\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b\')([^\'^is^es])"; smainrepl="$1tmpd\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(c\'\')([^\'^is^es])"; smainrepl="$1tmpf\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(cis\'\')([^\'^is^es])"; smainrepl="$1tmpbisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(des\'\')([^\'^is^es])"; smainrepl="$1tmpbisis\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(d\'\')([^\'^is^es])"; smainrepl="$1tmpc\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(dis\'\')([^\'^is^es])"; smainrepl="$1tmpeisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ees\'\')([^\'^is^es])"; smainrepl="$1tmpeisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(e\'\')([^\'^is^es])"; smainrepl="$1tmpe\'\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(f\'\')([^\'^is^es])"; smainrepl="$1tmpg\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(fis\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ges\'\')([^\'^is^es])"; smainrepl="$1tmpr-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(g\'\')([^\'^is^es])"; smainrepl="$1tmpf\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(gis\'\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(aes\'\')([^\'^is^es])"; smainrepl="$1tmpgisis\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(a\'\')([^\'^is^es])"; smainrepl="$1tmpb\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(ais\'\')([^\'^is^es])"; smainrepl="$1tmpa\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(bes\'\')([^\'^is^es])"; smainrepl="$1tmpa\'\'$3"; ReplaceTextInSelection( smainfind, smainrepl );
+smainfind="(\\s|^|<|\\{)(b\'\')([^\'^is^es])"; smainrepl="$1tmpd\'\'\'-.$3"; ReplaceTextInSelection( smainfind, smainrepl );
+
+smainfind="(\\s|^|<|\\{)(tmp)()"; smainrepl="$1$3"; ReplaceTextInSelection( smainfind, smainrepl );
+*/
+
+
+%}
+
--- /dev/null
+\version "2.11.23"
+
+\header{ texidoc = "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+@ifhtml
+Also available as a @uref{collated-files.pdf,PDF}
+@end ifhtml
+"}
+
+% make sure .png is generated.
+\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
+
--- /dev/null
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work? No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES=
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
--- /dev/null
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { 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
+placed after the starting note and its duration, not before. Similarly,
+the right square bracket should directly follow the note which is to be
+at the end of the requested beaming, even if this note happens to be
+inside a tuplet section. This snippet demonstrates how to superpose
+manual beaming, manual slurs, ties, and phrasing slurs, while using
+tuplet sections (enclosed with curly braces).
+" }
+
+{
+ r16[ g16 \times 2/3 {r16 e'8] }
+
+ g16( a \times 2/3 {b d e') }
+
+ g8[( a \times 2/3 {b d') e'~]}
+
+ \times 4/5 {e'32\( a b d' e'} a'4.\)
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+In time signature 2/2 or 4/4 the beam are @code{ _____
+ _ _ Default | | | | I want | | | |. } Use a \"macro\" with
+#(override-auto-beam-setting '.....
+
+
+
+" }
+
+% Automatic beams two per two in 4/4 or 2/2 time signature
+% _____
+% Default | | | |
+% _ _
+% I want | | | |
+
+% The good way adapted from David Bobrof
+
+% macro for beamed two per two in 2/2 and 4/4 time signature
+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)
+ }
+% other macros
+timeFractionstyle={ \override Staff.TimeSignature #'style = #'()}
+textn = ^\markup{ without the macro }
+texty = ^\markup{ with the macro }
+
+\score {
+ <<
+ \new Staff << \relative c'' {
+ \timeFractionstyle
+ \time 4/4
+ g8\textn g g g g g g g g g g g4 g8 g g
+ }
+ >>
+
+ %Use the macro
+
+ \new Staff << \relative c'' {
+ \timeFractionstyle
+ \time 4/4
+ \qbeam
+ g8\texty g g g g g g g g g g g4 g8 g g
+ }
+ >>
+ >>
+\layout{ raggedright = ##t }
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The measureLength variable, together with measurePosition, determines
+when a barline is needed. However, when using \\compressMusic, the
+scaling of durations makes it difficult to change time signatures
+without making a mess of it.
+
+Therefore, measureLength has to be set manually, using the
+ly:make-moment callback. The second argument has to be the same as the
+second argument of \\compressMusic.
+" }
+
+\layout {
+ \context { \Score
+ \remove "Timing_translator"
+ \remove "Default_bar_line_engraver"
+ }
+ \context {
+ \Staff
+ \consists "Timing_translator"
+ \consists "Default_bar_line_engraver"
+ }
+}
+
+<<
+ \new Staff {
+ \compressMusic #'( 8 . 5 ) {
+ \time 6/8
+ \set Timing.measureLength = #(ly:make-moment 3 5)
+ b8 b b b b b
+ \time 2/4
+ \set Timing.measureLength = #(ly:make-moment 2 5)
+ b4 b
+ }
+ }
+ \new Staff {
+ \clef bass
+ \time 2/4
+ c2 d e f }
+ >>
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { 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 musics quite easy to read
+and play, by explicitly printing the compound time signatures and
+adapting the automatic beaming behaviour. (You can even add graphic
+measure groping indications, the appropriate snippet in this database.)
+
+" }
+
+#(define (compound-time one two num)
+ (markup #:override '(baseline-skip . 0) #:number
+ (#:line ((#:column (one num)) #:vcenter "+" (#:column (two num))))))
+
+
+\relative {
+ %% compound time signature hack
+ \time 5/8
+ \override Staff.TimeSignature #'stencil = #ly:text-interface::print
+ \override Staff.TimeSignature #'text = #(compound-time "2" "3" "8" )
+ #(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
+}
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The Scheme function @code{set-time-signature}, in combination with the
+Measure grouping engraver, it will create MeasureGrouping signs. Such
+signs ease reading rhythmically complex modern music. In the following
+example, the 9/8 measure is subdivided in 2, 2, 2 and 3. This is
+passed to @code{set-time-signature} as the third argument @code{(2 2 2
+3)}
+
+
+" }
+
+\score {
+ \relative c'' {
+ #(set-time-signature 9 8 '(2 2 2 3))
+ g8[ g] d[ d] g[ g] a8[( bes g]) |
+ #(set-time-signature 5 8 '(3 2))
+ a4. g4
+ }
+ \layout {
+ \context {
+ \Staff
+ \consists "Measure_grouping_engraver"
+ }
+ }
+}
+
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Though the set-time-signature thing was not the most essential here, it
+has been included to show the beat of this piece (which is a template
+of a real balkan song!).
+" }
+
+#(define (compound-time one two three four five six seven eight nine ten 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))))))
+
+
+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 = #(compound-time "3" "2" "2" "3" "2" "2" "2" "3" "2" "2" "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 ":|"
+ }
+}
+
+{
+ \melody
+ \drum
+}
depth = ../../
-SUBDIRS = ancient chords connecting contemporary education expressive
-SUBDIRS += guitar parts pitch repeats spacing staff text vocal scheme other
+SUBDIRS = pitches rhythms
+SUBDIRS += ancient chords connecting contemporary education expressive
+SUBDIRS += guitar parts repeats spacing staff text vocal scheme other
SUBDIRS += engravers nonmusic instrument
+++ /dev/null
-\version "2.10.0"
-
-\header{
-texidoc = "
-@unnumbered Introduction
-
-This document shows examples from the
-@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
-
-In the web version of this document, you can click on the file name
-or figure for each example to see the corresponding input file."
-}
-
-% make sure .png is generated.
-\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
-
+++ /dev/null
-depth = ../../../
-
-STEPMAKE_TEMPLATES=documentation texinfo tex
-LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
-
-## Hmm, would this work? No -- if we really want examples, move
-## to other dir (input/) comes to mind.
-## examples = font20 ancient-font
-## LOCALSTEPMAKE_TEMPLATES += ly mutopia
-
-EXTRA_DIST_FILES=
-
-include $(depth)/make/stepmake.make
-
-TITLE=Advanced snippets
+++ /dev/null
-# -*-python-*-
-
-Import ('env', 'collate')
-collate (title = 'Advanced snippets')
+++ /dev/null
-\header {
-
- texidoc = "Makam is Turkish type of melody that uses 1/9 tone
- microtonal alterations."
-
-}
-
-
-\version "2.11.6"
-
-%{
-
-Define 1/9 alterations.
-
-%}
-
-
-#(define-public KOMA 1/9)
-#(define-public BAKIYE 4/9)
-#(define-public KUCUK 5/9)
-#(define-public BUYUKMUCENNEB 8/9)
-
-%{
-
-Define pitch names
-
-%}
-
-makamPitchNames = #`(
- (c . ,(ly:make-pitch -1 0 NATURAL))
- (d . ,(ly:make-pitch -1 1 NATURAL))
- (e . ,(ly:make-pitch -1 2 NATURAL))
- (f . ,(ly:make-pitch -1 3 NATURAL))
- (g . ,(ly:make-pitch -1 4 NATURAL))
- (a . ,(ly:make-pitch -1 5 NATURAL))
- (b . ,(ly:make-pitch -1 6 NATURAL))
-
- (cc . ,(ly:make-pitch -1 0 KOMA))
- (dc . ,(ly:make-pitch -1 1 KOMA))
- (ec . ,(ly:make-pitch -1 2 KOMA))
- (fc . ,(ly:make-pitch -1 3 KOMA))
- (gc . ,(ly:make-pitch -1 4 KOMA))
- (ac . ,(ly:make-pitch -1 5 KOMA))
- (bc . ,(ly:make-pitch -1 6 KOMA))
-
- (cb . ,(ly:make-pitch -1 0 BAKIYE))
- (db . ,(ly:make-pitch -1 1 BAKIYE))
- (eb . ,(ly:make-pitch -1 2 BAKIYE))
- (fb . ,(ly:make-pitch -1 3 BAKIYE))
- (gb . ,(ly:make-pitch -1 4 BAKIYE))
- (ab . ,(ly:make-pitch -1 5 BAKIYE))
- (bb . ,(ly:make-pitch -1 6 BAKIYE))
-
- (ck . ,(ly:make-pitch -1 0 KUCUK))
- (dk . ,(ly:make-pitch -1 1 KUCUK))
- (ek . ,(ly:make-pitch -1 2 KUCUK))
- (fk . ,(ly:make-pitch -1 3 KUCUK))
- (gk . ,(ly:make-pitch -1 4 KUCUK))
- (ak . ,(ly:make-pitch -1 5 KUCUK))
- (bk . ,(ly:make-pitch -1 6 KUCUK))
-
- (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
- (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
- (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
- (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
- (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
- (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
- (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
-
- ;; f for flat.
- (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
- (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
- (efc . ,(ly:make-pitch -1 2 (- KOMA)))
- (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
- (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
- (afc . ,(ly:make-pitch -1 5 (- KOMA)))
- (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
-
- (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
- (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
- (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
- (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
- (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
- (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
- (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
-
- (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
- (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
- (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
- (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
- (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
- (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
- (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
-
- (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
- (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
- (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
- (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
- (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
- (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
- (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
-
-)
-
-
-%% set pitch names.
-pitchnames = \makamPitchNames
-#(ly:parser-set-note-names parser makamPitchNames)
-
-\paper
-{
- ragged-right = ##t
-}
-
-
-makamGlyphs = #'((1 . "accidentals.doublesharp")
- (8/9 . "accidentals.sharp.slashslashslash.stemstem")
- (5/9 . "accidentals.sharp.slashslashslash.stem")
- (4/9 . "accidentals.sharp")
- (1/9 . "accidentals.sharp.slashslash.stem")
- (0 . "accidentals.natural")
- (-1/9 . "accidentals.mirroredflat")
- (-4/9 . "accidentals.flat.slash")
- (-5/9 . "accidentals.flat")
- (-8/9 . "accidentals.flat.slashslash")
- (-1 . "accidentals.flatflat")
- )
-
-\relative {
-
- %{ define alteration <-> symbol mapping. The following glyphs are available.
-
- accidentals.sharp
- accidentals.sharp.slashslash.stem
- accidentals.sharp.slashslashslash.stemstem
- accidentals.sharp.slashslashslash.stem
- accidentals.sharp.slashslash.stemstemstem
- accidentals.natural
- accidentals.flat
- accidentals.flat.slash
- accidentals.flat.slashslash
- accidentals.mirroredflat.flat
- accidentals.mirroredflat
- accidentals.flatflat
- accidentals.flatflat.slash
- accidentals.doublesharp
-
- %}
-
- \override Accidental #'glyph-name-alist = \makamGlyphs
-
- \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs
- \set Staff.keySignature = #'(
- (3 . 4/9)
- (6 . -1/9))
-
- c cc db fk gbm gfc gfb efk dfbm
-}
--- /dev/null
+\version "2.10.0"
+
+\header{
+texidoc = "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file."
+}
+
+% make sure .png is generated.
+\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
+
--- /dev/null
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work? No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES=
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
--- /dev/null
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
--- /dev/null
+\header {
+
+ texidoc = "Makam is Turkish type of melody that uses 1/9 tone
+ microtonal alterations."
+
+}
+
+
+\version "2.11.6"
+
+%{
+
+Define 1/9 alterations.
+
+%}
+
+
+#(define-public KOMA 1/9)
+#(define-public BAKIYE 4/9)
+#(define-public KUCUK 5/9)
+#(define-public BUYUKMUCENNEB 8/9)
+
+%{
+
+Define pitch names
+
+%}
+
+makamPitchNames = #`(
+ (c . ,(ly:make-pitch -1 0 NATURAL))
+ (d . ,(ly:make-pitch -1 1 NATURAL))
+ (e . ,(ly:make-pitch -1 2 NATURAL))
+ (f . ,(ly:make-pitch -1 3 NATURAL))
+ (g . ,(ly:make-pitch -1 4 NATURAL))
+ (a . ,(ly:make-pitch -1 5 NATURAL))
+ (b . ,(ly:make-pitch -1 6 NATURAL))
+
+ (cc . ,(ly:make-pitch -1 0 KOMA))
+ (dc . ,(ly:make-pitch -1 1 KOMA))
+ (ec . ,(ly:make-pitch -1 2 KOMA))
+ (fc . ,(ly:make-pitch -1 3 KOMA))
+ (gc . ,(ly:make-pitch -1 4 KOMA))
+ (ac . ,(ly:make-pitch -1 5 KOMA))
+ (bc . ,(ly:make-pitch -1 6 KOMA))
+
+ (cb . ,(ly:make-pitch -1 0 BAKIYE))
+ (db . ,(ly:make-pitch -1 1 BAKIYE))
+ (eb . ,(ly:make-pitch -1 2 BAKIYE))
+ (fb . ,(ly:make-pitch -1 3 BAKIYE))
+ (gb . ,(ly:make-pitch -1 4 BAKIYE))
+ (ab . ,(ly:make-pitch -1 5 BAKIYE))
+ (bb . ,(ly:make-pitch -1 6 BAKIYE))
+
+ (ck . ,(ly:make-pitch -1 0 KUCUK))
+ (dk . ,(ly:make-pitch -1 1 KUCUK))
+ (ek . ,(ly:make-pitch -1 2 KUCUK))
+ (fk . ,(ly:make-pitch -1 3 KUCUK))
+ (gk . ,(ly:make-pitch -1 4 KUCUK))
+ (ak . ,(ly:make-pitch -1 5 KUCUK))
+ (bk . ,(ly:make-pitch -1 6 KUCUK))
+
+ (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
+ (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
+ (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
+ (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
+ (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
+ (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
+ (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
+
+ ;; f for flat.
+ (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
+ (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
+ (efc . ,(ly:make-pitch -1 2 (- KOMA)))
+ (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
+ (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
+ (afc . ,(ly:make-pitch -1 5 (- KOMA)))
+ (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
+
+ (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
+ (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
+ (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
+ (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
+ (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
+ (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
+ (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
+
+ (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
+ (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
+ (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
+ (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
+ (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
+ (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
+ (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
+
+ (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
+ (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
+ (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
+ (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
+ (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
+ (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
+ (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
+
+)
+
+
+%% set pitch names.
+pitchnames = \makamPitchNames
+#(ly:parser-set-note-names parser makamPitchNames)
+
+\paper
+{
+ ragged-right = ##t
+}
+
+
+makamGlyphs = #'((1 . "accidentals.doublesharp")
+ (8/9 . "accidentals.sharp.slashslashslash.stemstem")
+ (5/9 . "accidentals.sharp.slashslashslash.stem")
+ (4/9 . "accidentals.sharp")
+ (1/9 . "accidentals.sharp.slashslash.stem")
+ (0 . "accidentals.natural")
+ (-1/9 . "accidentals.mirroredflat")
+ (-4/9 . "accidentals.flat.slash")
+ (-5/9 . "accidentals.flat")
+ (-8/9 . "accidentals.flat.slashslash")
+ (-1 . "accidentals.flatflat")
+ )
+
+\relative {
+
+ %{ define alteration <-> symbol mapping. The following glyphs are available.
+
+ accidentals.sharp
+ accidentals.sharp.slashslash.stem
+ accidentals.sharp.slashslashslash.stemstem
+ accidentals.sharp.slashslashslash.stem
+ accidentals.sharp.slashslash.stemstemstem
+ accidentals.natural
+ accidentals.flat
+ accidentals.flat.slash
+ accidentals.flat.slashslash
+ accidentals.mirroredflat.flat
+ accidentals.mirroredflat
+ accidentals.flatflat
+ accidentals.flatflat.slash
+ accidentals.doublesharp
+
+ %}
+
+ \override Accidental #'glyph-name-alist = \makamGlyphs
+
+ \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs
+ \set Staff.keySignature = #'(
+ (3 . 4/9)
+ (6 . -1/9))
+
+ c cc db fk gbm gfc gfb efk dfbm
+}
--- /dev/null
+\version "2.10.0"
+
+\header{
+texidoc = "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file."
+}
+
+% make sure .png is generated.
+\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
+
--- /dev/null
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work? No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES=
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
--- /dev/null
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
--- /dev/null
+\version "2.11.23"
+
+\header{ texidoc = "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+@ifhtml
+Also available as a @uref{collated-files.pdf,PDF}
+@end ifhtml
+"}
+
+% make sure .png is generated.
+\markup{ "This document is for LilyPond version" #(ly:export(lilypond-version)) }
+
--- /dev/null
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work? No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES=
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
--- /dev/null
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
\relative c'' {
\override TextSpanner #'bound-padding = #1.0
- \override TextSpanner #'dash-fraction = #'()
+ \override TextSpanner #'style = #line
\override TextSpanner #'bound-details #'right #'arrow = ##t
\override TextSpanner #'bound-details #'left #'text = #"fof"
\override TextSpanner #'bound-details #'right #'text = #"gag"
\relative <<
\new Staff {
- \override DynamicTextSpanner #'dash-fraction = ##f
\setTextCresc
+ \set crescendoSpanner = #'line
c1_\< c c1\!
}
\new Staff {
s2
d2 \glissando d'2
- \once \override Glissando #'dash-fraction = #0.5
+ \override Glissando #'style = #'dashed-line
d,2 \glissando d'2
\override Glissando #'style = #'dotted-line
d,2 \glissando d'2
Real page_penalty_;
Real turn_penalty_;
+ bool title_;
+
Line_details ()
{
force_ = infinity_f;
break_penalty_ = 0;
page_penalty_ = 0;
turn_penalty_ = 0;
+ title_ = false;
}
Line_details (Prob *pb)
break_penalty_ = 0;
page_penalty_ = robust_scm2double (pb->get_property ("page-break-penalty"), 0);
turn_penalty_ = robust_scm2double (pb->get_property ("page-turn-penalty"), 0);
+ title_ = to_boolean (pb->get_property ("is-title"));
}
};
bool ragged_last () const;
bool is_last () const;
Real page_height (int page_number, bool last) const;
+ Real page_top_space () const;
protected:
Paper_book *book_;
vector<Constrained_breaking> line_breaking_;
bool ragged_;
bool ragged_last_;
+ Real page_top_space_;
vector<Line_division> current_configurations_;
vector<Break_position> current_chunks_;
Real rod_height_;
Real spring_len_;
Real inverse_spring_k_;
+ Real page_top_space_;
Line_details last_line_;
+ Line_details first_line_;
- Page_spacing (Real page_height)
+ Page_spacing (Real page_height, Real page_top_space)
{
page_height_ = page_height;
+ page_top_space_ = page_top_space;
clear ();
}
Stencil stil;
- SCM dash_fraction = me->get_property ("dash-fraction");
- if (scm_is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
+ if (type == ly_symbol2scm ("dashed-line") || type == ly_symbol2scm ("dotted-line"))
{
Real fraction
= type == ly_symbol2scm ("dotted-line")
? 0.0
- : robust_scm2double (dash_fraction, 0.4);
+ : robust_scm2double (me->get_property ("dash-fraction"), 0.4);
fraction = min (max (fraction, 0.0), 1.0);
Real period = Staff_symbol_referencer::staff_space (me)
}
ADD_INTERFACE (Line_interface,
- "Generic line objects. Any object using lines supports this. Normally, "
- "you get a straight line. If @code{dash-period} is defined, a dashed line is "
- "produced; the length of the dashes is tuned with "
+ "Generic line objects. Any object using lines supports this. "
+ "The property @code{style} can be @code{line}, "
+ "@code{dashed-line}, @code{trill}, \n"
+ "@code{dotted-line} or @code{zigzag}.\n"
+ "\n",
+ "For dashed-line, the length of the dashes is tuned with "
"@code{dash-fraction}. If the latter is set to 0, a dotted line is "
- "produced. If @code{dash-fraction} is negative, the line is made "
+ "produced. If @code{dash-period} is negative, the line is made "
"transparent.",
/* properties */
rod.item_drul_[LEFT] = li;
rod.item_drul_[RIGHT] = ri;
- rod.distance_ = li->extent (li, X_AXIS)[BIGGER]
- - ri->extent (ri, X_AXIS)[SMALLER]
+ rod.distance_ = Paper_column::minimum_distance (li, ri)
+ length
+ 2 * robust_scm2double (me->get_property ("bound-padding"), 1.0);
compressed.extent_[UP] = old.extent_[UP] + orig[i].extent_.length () + old.padding_;
compressed.space_ += old.space_;
compressed.inverse_hooke_ += old.inverse_hooke_;
+ compressed.title_ = old.title_;
/* we don't need the force_ field for the vertical spacing,
so we use force_ = n to signal that the line was compressed,
book_ = pb;
ragged_ = to_boolean (pb->paper_->c_variable ("ragged-bottom"));
ragged_last_ = to_boolean (pb->paper_->c_variable ("ragged-last-bottom"));
+ page_top_space_ = robust_scm2double (pb->paper_->c_variable ("page-top-space"), 0);
create_system_list ();
find_chunks_and_breaks (is_break);
}
return ragged_last_;
}
+Real
+Page_breaking::page_top_space () const
+{
+ return page_top_space_;
+}
+
/* translate indices into breaks_ into start-end parameters for the line breaker */
void
Page_breaking::line_breaker_args (vsize sys,
ly_symbol2scm ("is-last"), scm_from_bool (last),
SCM_UNDEFINED));
SCM height = scm_apply_1 (calc_height, page, SCM_EOL);
- return scm_to_double (height) - scm_to_double (book_->paper_->c_variable ("page-top-space"));
+ return scm_to_double (height) - page_top_space_;
}
SCM
Page_spacing_result res;
vsize page = 0;
vsize page_first_line = 0;
- Page_spacing space (page_height (first_page_num, false));
+ Page_spacing space (page_height (first_page_num, false), page_top_space_);
cache_line_details (configuration);
for (vsize line = 0; line < cached_line_details_.size (); line++)
Page_spacing_result
Page_breaking::space_systems_on_1_page (vector<Line_details> const &lines, Real page_height, bool ragged)
{
- Page_spacing space (page_height);
+ Page_spacing space (page_height, page_top_space_);
Page_spacing_result ret;
for (vsize i = 0; i < lines.size (); i++)
vector<Real> page1_force;
vector<Real> page2_force;
- Page_spacing page1 (page1_height);
- Page_spacing page2 (page2_height);
+ Page_spacing page1 (page1_height, page_top_space_);
+ Page_spacing page2 (page2_height, page_top_space_);
page1_force.resize (cached_line_details_.size () - 1, infinity_f);
page2_force.resize (cached_line_details_.size () - 1, infinity_f);
void
Page_spacing::calc_force ()
{
- if (rod_height_ + last_line_.bottom_padding_ >= page_height_)
+ /* If the first system is a title, we add back in the page-top-space. */
+ Real height = first_line_.title_ ? page_height_ + page_top_space_ : page_height_;
+
+ if (rod_height_ + last_line_.bottom_padding_ >= height)
force_ = infinity_f;
else
- force_ = (page_height_ - rod_height_ - last_line_.bottom_padding_ - spring_len_)
+ force_ = (height - rod_height_ - last_line_.bottom_padding_ - spring_len_)
/ max (0.1, inverse_spring_k_);
}
void
Page_spacing::append_system (const Line_details &line)
{
+ if (!rod_height_)
+ first_line_ = line;
+
rod_height_ += last_line_.padding_;
rod_height_ += line.extent_.length ();
spring_len_ += line.space_;
inverse_spring_k_ += line.inverse_hooke_;
+ first_line_ = line;
+
calc_force ();
}
Page_spacer::calc_subproblem (vsize page, vsize line)
{
bool last = line == lines_.size () - 1;
- Page_spacing space (breaker_->page_height (page + first_page_num_, last));
+ Page_spacing space (breaker_->page_height (page + first_page_num_, last),
+ breaker_->page_top_space ());
Page_spacing_node &cur = state_.at (line, page);
bool ragged = ragged_ || (ragged_last_ && last);
{
Grob *me = unsmob_grob (smob);
Grob *stem = Note_column::get_stem (me->get_parent (X_AXIS));
- return scm_from_bool (stem && to_boolean (stem->get_property ("cross-staff")));
+
+ if (stem && to_boolean (stem->get_property ("cross-staff")))
+ return SCM_BOOL_T;
+
+ Grob *slur = unsmob_grob (me->get_object ("slur"));
+ SCM avoid_slur = me->get_property ("avoid-slur");
+ if (slur && to_boolean (slur->get_property ("cross-staff"))
+ && (avoid_slur == ly_symbol2scm ("outside")
+ || avoid_slur == ly_symbol2scm ("around")))
+ return SCM_BOOL_T;
+
+ return SCM_BOOL_F;
}
MAKE_SCHEME_CALLBACK (Script_interface, print, 1);
#include "output-def.hh"
#include "modified-font-metric.hh"
+static void
+replace_whitespace (string *str)
+{
+ for (vsize i = 0; i < str->size (); i++)
+ if (isspace ((*str)[i]))
+ (*str)[i] = ' ';
+}
+
MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 3);
SCM
Text_interface::interpret_string (SCM layout_smob,
string str = ly_scm2string (markup);
Output_def *layout = unsmob_output_def (layout_smob);
Font_metric *fm = select_encoded_font (layout, props);
+
+ replace_whitespace (&str);
return fm->word_stencil (str).smobbed_copy ();
}
%% Prepare TextSpanner for \episem{Initium|Finis} use.
%%
- %% N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will
- %% always produce dashed lines, regardless of the style property.
- %%
%% FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is
%% required to force the articulation signs being placed vertically
%% tightly to the correpsonding note heads.
%%
- \override TextSpanner #'dash-fraction = #'()
\override TextSpanner #'style = #'line
\override TextSpanner #'padding = #-0.1
}
improvisationOn = {
\set squashedPosition = #0
\override NoteHead #'style = #'slash
+ \override Accidental #'stencil = ##f
}
improvisationOff = {
\unset squashedPosition
\revert NoteHead #'style
+ \revert Accidental #'stencil
}
textSpannerUp = \override TextSpanner #'direction = #UP
LINKED_PNGS = henle-flat-gray.png baer-flat-gray.png lily-flat-bw.png
-# makeinfo is broken, it MUST have PNGs in output dir
+# makeinfo MUST have PNGs in cwd for info images to work
# symlinking PNGs...
# lilypond-book -I flag seems broken too, and texi2pdf -I flag confuses
# pdfetex with .aux and other files from English manual
CONVERT_LY = $(script-dir)/convert-ly.py
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-## ugh : fix me, input/new/pitch
-LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/ -I $(input-dir)/new/pitch
+## ugh : fix me, input/new/pitches
+LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/ -I $(input-dir)/new/pitches
## override from cmd line to speed up.
ANTI_ALIAS_FACTOR=2
((end 1 32 3 2) . ,(ly:make-moment 1 2))
((end 1 32 3 2) . ,(ly:make-moment 5 8))
((end 1 32 3 2) . ,(ly:make-moment 3 4))
+ ((end 1 32 3 2) . ,(ly:make-moment 7 8))
((end 1 32 3 2) . ,(ly:make-moment 9 8))
((end 1 32 3 2) . ,(ly:make-moment 5 4))
((end 1 32 3 2) . ,(ly:make-moment 11 8))
(avoid-slur . around)
(slur-padding . 0.5)
(script-priority . 200)
+ (cross-staff . ,ly:script-interface::calc-cross-staff)
;; todo: add X self alignment?
(meta . ((class . Item)
(interfaces . (text-script-interface
(stacking-dir . -1)
(padding . 0.5)
(vertical-skylines . ,ly:axis-group-interface::combine-skylines)
- (max-stretch . ,ly:align-interface::calc-max-stretch)
+ (max-stretch . 0)
(meta . ((class . Spanner)
(object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)))
(interfaces . (align-interface
(define-builtin-markup-list-command (justified-lines layout props args) (markup-list?)
"Like @code{\\justify}, but return a list of lines instead of a single markup.
-Use @code{\\override #'(line-width . @var{X})} to set the line width;
+Use @code{\\override-lines #'(line-width . @var{X})} to set the line width;
@var{X}@tie{}is the number of staff spaces."
(space-lines (chain-assoc-get 'baseline-skip props)
(wordwrap-markups layout props args #t)))
(define-builtin-markup-list-command (wordwrap-lines layout props args) (markup-list?)
"Like @code{\\wordwrap}, but return a list of lines instead of a single markup.
-Use @code{\\override #'(line-width . @var{X})} to set the line width,
+Use @code{\\override-lines #'(line-width . @var{X})} to set the line width,
where @var{X} is the number of staff spaces."
(space-lines (chain-assoc-get 'baseline-skip props)
(wordwrap-markups layout props args #f)))
.SUFFIXES: .html .info .texi .texinfo
$(outdir)/%.info: $(outdir)/%.texi
- $(MAKEINFO) -I $(outdir) --output=$@ $<
+# makeinfo MUST have PNGs in cwd for info images to work
+ cd $(outdir) && $(MAKEINFO) -I$(srcdir) --output=$(@F) $(<F)
$(outdir)/%-big-page.html: $(outdir)/%.texi
$(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<