# compilation during install, which is a bad thing (tm).
$(outdir)/internals.texi: $(LILYPOND_BINARY)
- cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
-
+ cd $(outdir) && $(buildscript-dir)/run-and-check "$(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation" "generate-documentation.log"
###############################################
# Documentation and translations maintenance #
@item
Get the patchy scripts from
@example
-https://github.com/gperciva/lilypond-extra/
+@uref{https://github.com/gperciva/lilypond-extra/}
@end example
Patchy is in the @file{patches/} directory.
tests as a proof that the fix works. If someone will accidentally break
breve width again, we will notice this in the output of that regression test.
-We are asking you to help us by checking a regtest or two from time to time.
+@subheading How can I help?
+
+We ask you to help us by checking one or two regtests from time to time.
You don't need programming skills to do this, not even LilyPond skills -
just basic music notation knowledge; checking one regtest takes less than
a minute. Simply go here:
@example
-@uref{http://www.holmessoft.co.uk/homepage/private/regtests/}
+@uref{http://www.philholmes.net/lilypond/regtests/}
@end example
@subheading Some tips on checking regtests
Vague descriptions (like "behaves well", "looks reasonable") shouldn't be used.
@ignore
+this may be useful for advanced regtest checking
@subsubheading Is regtest straightforward and systematic?
Unfortunately some regtests are written poorly. A good regtest should be
@lilypond[verbatim]
traLaLa = { c'4 d'4 }
-%% dummy action to deal with parser lookahead
-#(display "this needs to be here, sorry!")
-
#(define newLa (map ly:music-deep-copy
(list traLaLa traLaLa)))
#(define twice
Bug reporting: help users create proper @rweb{Bug reports}, and/or
join the Bug Squad to organize @rcontrib{Issues}.
+@item
+@rcontrib{Grand Regression Test Checking}: verify that LilyPond works correctly
+by examining output of test snippets. Checking one snippet takes less
+than a minute!
+
@item
Documentation: small changes can be proposed by following the
guidelines for @rcontrib{Documentation suggestions}.
separators.
The Voice contexts bear the names @code{"1"}, @code{"2"}, etc.
-In each of these contexts, the vertical direction of slurs,
-stems, ties, dynamics etc., is set appropriately.
+The first contexts set the @emph{outer} voices, the highest
+voice in context @code{"1"} and the lowest voice in context
+@code{"2"}. The inner voices go in contexts @code{"3"} and
+@code{"4"}. In each of these contexts, the vertical direction
+of slurs, stems, ties, dynamics etc., is set appropriately.
@lilypond[quote,verbatim]
\new Staff \relative c' {
<< % Voice one
{ c2 aes4. bes8 }
\\ % Voice two
- { aes2 f4 fes }
- \\ % No voice three
- \\ % Voice four
{
% Ignore these for now - they are explained in Ch 4
- \once \override NoteColumn #'force-hshift = #0
- <ees c>2
+ \once \override NoteColumn #'ignore-collision = ##t
+ <ees, c>2
\once \override NoteColumn #'force-hshift = #0.5
des2
}
+ \\ % No voice three
+ \\ % Voice four
+ {
+ \override NoteColumn #'force-hshift = #0
+ aes'2 f4 fes
+ }
>> |
<c ees aes c>1 |
}
}
\\ % Voice two
{ \voiceTwoStyle
- aes2 f4 fes
+ % Ignore these for now - they are explained in Ch 4
+ \once \override NoteColumn #'ignore-collision = ##t
+ <ees, c>2
+ \once \override NoteColumn #'force-hshift = #0.5
+ des2
}
\\ % No Voice three (we want stems down)
\\ % Voice four
{ \voiceThreeStyle
- % Ignore these for now - they are explained in Ch 4
- \once \override NoteColumn #'force-hshift = #0
- <ees c>2
- \once \override NoteColumn #'force-hshift = #0.5
- des2
+ \override NoteColumn #'force-hshift = #0
+ aes'2 f4 fes
}
>> |
<c ees aes c>1 |
\new Staff \relative c'' {
\key aes \major
<<
- { c2 aes4. bes8 } \\ { aes2 f4 fes } \\ { <ees c>2 des }
+ { c2 aes4. bes8 } \\ { <ees, c>2 des } \\ { aes'2 f4 fes }
>> |
<c ees aes c>1 |
}
<< % Voice one
{ c2 aes4. bes8 }
\\ % Voice two
- { aes2 f4 fes }
+ { <ees, c>2 des }
\\ % Omit Voice three
\\ % Voice four
- { <ees c>2 des }
+ { aes'2 f4 fes }
>> |
<c ees aes c>1 |
}
@end lilypond
@noindent
-We see that this fixes the stem direction, but exposes a problem
-sometimes encountered with multiple voices -- the stems of the notes
-in one voice can collide with the note heads in other voices. In
-laying out the notes, LilyPond allows the notes or chords from two
-voices to occupy the same vertical note column provided the stems are
-in opposite directions, but the notes from the third and fourth voices
-are displaced, if necessary, to avoid the note heads colliding. This
-usually works well, but in this example the notes of the lowest voice
-are clearly not well placed by default. LilyPond provides several ways
-to adjust the horizontal placing of notes. We are not quite ready yet
-to see how to correct this, so we shall leave this problem until a
+We see that this fixes the stem direction, but the horizontal
+placement of notes is not what we want. LilyPond shifts the
+inner notes when they or their stems would collide with outer
+voices, but this is not appropriate for piano music. In other
+situations, the shifts LilyPond applies might fail to clear
+the collisions. LilyPond provides several ways to adjust the
+horizontal placing of notes. We are not quite ready yet to see
+how to correct this, so we shall leave this problem until a
later section --- see the @code{force-hshift} property in
@ref{Fixing overlapping notation}.
<<
{ c2 aes4. bes8 }
\\
- { aes2 f4 fes }
+ { <ees, c>2 des }
\\
- {
- \voiceFour
- <ees c>2 des
- }
+ \\
+ { aes'2 f4 fes }
>> |
<c ees aes c>1 |
}
@end lilypond
@noindent
-The lower two notes of the first chord (i.e, those in the third voice)
-should not be shifted away from the note column of the higher two
-notes. To correct this we set @code{force-hshift}, which is a
-property of @code{NoteColumn}, of these notes to zero. The lower note
-of the second chord is best placed just to the right of the higher
-notes. We achieve this by setting @code{force-hshift} of this note to
-0.5, ie half a note head's width to the right of the note column of
-the higher notes.
+The inner note of the first chord (i.e. the A-flat in the fourth
+Voice) need not be shifted away from the note column of the higher
+note. To correct this we set @code{force-hshift}, which is a property
+of @code{NoteColumn}, of this note to zero.
+
+In the second chord we prefer the F to line up with the A and the
+lowest note to be positioned slightly right to avoid a collision of
+stems. We achieve this by setting @code{force-hshift} in the
+@code{NoteColumn} of the low D-flat to move it to the right by half
+a staff-space.
Here's the final result:
<<
{ c2 aes4. bes8 }
\\
- { aes2 f4 fes }
- \\
{
- \voiceFour
- \once \override NoteColumn #'force-hshift = #0
- <ees c>2
+ <ees, c>2
\once \override NoteColumn #'force-hshift = #0.5
des2
}
+ \\
+ \\
+ {
+ \override NoteColumn #'force-hshift = #0
+ aes'2 f4 fes
+ }
>> |
<c ees aes c>1 |
}
$href = &$default_external_href($node, $node_id, $node_xhtml_id, lc_last($file));
$href = remove_unneeded_anchor($href);
- # TODO: very yucky, but will be fixed in issue 1004
if ($web_manual) {
- my $only_web = $ENV{ONLY_WEB};
- if ($only_web) {
- $href = "../../doc/v2.13/Documentation/web/".$href;
+ my $only_web_version = $ENV{ONLY_WEB_VERSION};
+ if ($only_web_version) {
+ $href = "../../doc/".$only_web_version."/Documentation/web/".$href;
}
}
@node Overview of the supported styles
@subsection Overview of the supported styles
-
Three styles are available for typesetting Gregorian chant:
@itemize
Music Glossary:
@rglos{custos}.
-Internals Reference:
-@rinternals{Custos}.
-
Snippets:
@rlsr{Ancient notation}.
+Internals Reference:
+@rinternals{Custos}.
+
@node Figured bass support
@unnumberedsubsubsec Figured bass support
}
@end lilypond
-
@seealso
Music Glossary:
@rglos{mensural notation}.
Notation Reference:
@ref{Clef}.
-
@knownissues
The mensural g clef is mapped to the Petrucci g clef.
@c music, the default flag style should be used.
There are no flags in Gregorian chant notation.
-
@seealso
Music Glossary:
@rglos{mensural notation},
@rglos{flag}.
-
@knownissues
The attachment of ancient flags to stems is slightly off.
@c due to a change in early 2.3.x.
Snippets:
@rlsr{Ancient notation}.
-
@knownissues
The glyph for the maxima rest in mensural style is actually a perfect
longa rest; use two (or three) longa rests to print a maxima rest.
}
@end lilypond
-
@seealso
Internals Reference:
@rinternals{Accidental_engraver},
Horizontal spacing of ligatures is poor.
Accidentals may collide with previous notes.
+
@node Typesetting Gregorian chant
@subsection Typesetting Gregorian chant
@ref{White mensural ligatures},
@ref{Ligatures}.
+
@node Gregorian chant contexts
@unnumberedsubsubsec Gregorian chant contexts
@end lilypond
@end multitable
-
@seealso
Music Glossary:
@rglos{clef}.
@code{\override Staff.Accidental #'glyph-name-alist =
#alteration-mensural-glyph-name-alist}
-
@seealso
Music Glossary:
@rglos{accidental},
@ref{Breath marks}.
Installed Files:
-@file{gregorian.ly}.
+@file{ly/gregorian.ly}.
@node Gregorian articulation signs
}
@end lilypond
-
@seealso
Notation Reference:
@ref{Articulations and ornamentations}.
@rinternals{ScriptEvent},
@rinternals{Script_engraver}.
-
@knownissues
Some articulations are vertically placed too closely to the
corresponding note heads.
}
@end lilypond
-
@seealso
Notation Reference:
@ref{Breath marks}.
@ref{White mensural ligatures},
@ref{Ligatures}.
-
@knownissues
When an @code{\augmentum} dot appears at the end of the last staff
within a ligature, it is sometimes vertically placed wrong. As a
@c use snippet Transcription-of-ancient-music-with-incipit
TBC
-
@c @seealso
@c ... and reference to other sections ...
@c from lsr and -user
@c TBC
-
@c @seealso
@c ... and reference to other sections ...
@c @seealso
@c ... and reference to other sections ...
-
* Context layout order::
@end menu
-
@seealso
Learning Manual:
@rlearning{Contexts and engravers}.
@c TODO Should this be Modifying engravers or Modifying contexts?
-Notation contexts (like @code{Score} and @code{Staff}) not only
-store properties,
-they also contain plug-ins called @q{engravers} that create notation
-elements. For example, the @code{Voice} context contains a
+Notation contexts (like @code{Score} and @code{Staff}) not only store
+properties, they also contain plug-ins called @q{engravers} that create
+notation elements. For example, the @code{Voice} context contains a
@code{Note_heads_engraver} and the @code{Staff} context contains a
-@code{Key_signature_engraver}.
+@code{Key_engraver}.
For a full a description of each plug-in, see
@ifhtml
contain it. This can give rise to unexpected new staves or scores.
@seealso
-Usage Manual:
+Application Usage:
@rprogram{An extra staff appears}.
Installed Files:
@file{ly/engraver-init.ly}.
-
@node Explaining the Internals Reference
@section Explaining the Internals Reference
-
@menu
* Navigating the program reference::
* Layout interfaces::
@end ignore
@seealso
-Internals:
+Internals Reference:
@rinternals{Backend},
@rinternals{All layout objects},
@rinternals{OverrideProperty},
@rinternals{RevertProperty},
@rinternals{PropertySet}.
-
@knownissues
-
The back-end is not very strict in type-checking object properties.
Cyclic references in Scheme values for properties can cause hangs
or crashes, or both.
-
@node The set command
@subsection The @code{@bs{}set} command
@end ifnothtml
@seealso
-
Internals Reference:
-
@rinternals{Tunable context properties}.
-
@cindex grob properties
@cindex properties, grob
@funindex \override
@end ignore
@seealso
-
Internals Reference:
@rinternals{Backend}
+
@node The tweak command
@subsection The @code{\tweak} command
in determining how to adjust the input to make a @code{\tweak}
apply.
-
@seealso
Learning Manual:
@rlearning{Tweaking methods}.
-Extending:
+Extending LilyPond:
@rextend{Displaying music expressions}.
-
@knownissues
-
@cindex tweaks in a variable
+
The @code{\tweak} command cannot be used inside a variable.
@cindex tweaks in lyrics
The @code{\tweak} command will apply to only the first of several
generated ties in a chord.
+
@node set versus override
@subsection @code{\set} vs. @code{\override}
@strong{The direction property}
-The position or direction of many layout objects is controlled
-by the @code{direction} property.
+The position or direction of many layout objects is controlled by the
+@code{direction} property.
-The value of the @code{direction} property may be
-set to @code{1}, meaning @qq{up} or @qq{above}, or to @w{@code{-1}},
-meaning @qq{down} or @qq{below}. The symbols @code{UP} and
-@code{DOWN} may be used instead of @code{1} and @w{@code{-1}}
-respectively. The default direction may be specified by setting
-@code{direction} to @code{0} or @code{CENTER}. Alternatively,
-in many cases predefined commands
-exist to specify the direction. These are all of the form
+The value of the @code{direction} property may be set to @code{1},
+meaning @qq{up} or @qq{above}, or to @w{@code{-1}}, meaning @qq{down} or
+@qq{below}. The symbols @code{UP} and @code{DOWN} may be used instead
+of @code{1} and @w{@code{-1}} respectively. The default direction may
+be specified by setting @code{direction} to @code{0} or @code{CENTER}.
+Alternatively, in many cases predefined commands exist to specify the
+direction. These are of the form
-@noindent
-@code{\xxxUp}, @code{xxxDown}, @code{xxxNeutral}
+@example
+@code{\xxxUp}, @code{\xxxDown} or @code{\xxxNeutral}
+@end example
@noindent
-where @code{xxxNeutral} means @qq{use the default direction}.
+where @code{\xxxNeutral} means @qq{use the default} direction.
See @rlearning{Within-staff objects}.
-In a few cases, arpeggio being the only common example, the value
-of the @code{direction} property specifies whether the object
-is to be placed to the right or left of the parent object. In
-this case @w{@code{-1}} or @code{LEFT} means @qq{to the left} and
-@code{1} or @code{RIGHT} means @qq{to the right}. @code{0}
-or @code{CENTER} means @qq{use the default} direction, as before.
+In a few cases, arpeggio for example, the value of the @code{direction}
+property can specify whether the object is to be placed to the right or
+left of the parent. In this case @w{@code{-1}} or @code{LEFT} means
+@qq{to the left} and @code{1} or @code{RIGHT} means @qq{to the right}.
+@code{0} or @code{CENTER} means @qq{use the default} direction.
@ignore
These all have side-axis set to #X
c2( c)
@end lilypond
+In polyphonic music, it is generally better to specify an explicit
+@code{voice} than change an object's direction. For more information.
+See @ref{Multiple voices}.
+
+@seealso
+Learning Manual:
+@rlearning{Within-staff objects}.
+
+Notation Reference:
+@ref{Multiple voices}.
+
@node Distances and measurements
@subsection Distances and measurements
@code{staff-space}. For an explanation and an example of its use,
see @rlearning{Length and thickness of objects}.
-
@seealso
Learning Manual:
@rlearning{Length and thickness of objects}.
\startTextSpan with \stopTextSpan, nor is it necessary to close
hairpins with @code{\!}.
-
@seealso
Internals Reference:
@rinternals{TextSpanner},
property controls both the clef symbol and any octavation symbol
associated with it.
-
@seealso
Learning Manual:
-@rlearning{Visibility and color of objects}
+@rlearning{Visibility and color of objects}.
@node Line styles
* Unpure-pure containers::
@end menu
-
@seealso
Learning Manual:
@rlearning{Tweaking output},
@ref{Explaining the Internals Reference},
@ref{Modifying properties}.
+Extending LilyPond:
+@rextend{Interfaces for programmers}.
+
Installed Files:
@file{scm/define-grobs.scm}.
Snippets:
@rlsr{Tweaks and overrides}.
-Extending:
-@rextend{Interfaces for programmers}.
-
Internals Reference:
@rinternals{All layout objects}.
for positioning rehearsal marks on such objects.
@seealso
-@ref{Using the break-alignable-interface},
+Notation Reference:
+@ref{Using the break-alignable-interface}.
+
+Extending LilyPond:
@rextend{Callback functions}.
@menu
@c TODO Add inserting Postscript or ref to later
-
@seealso
Notation Reference:
@ref{Graphic notation inside markup},
@cindex unpure containers, Scheme
@cindex horizontal spacing, overriding
+
@node Unpure-pure containers
@subsection Unpure-pure containers
@ref{Predefined type predicates}. User-defined type predicates
are also allowed.
-
@seealso
-
Notation Reference:
@ref{Predefined type predicates}.
-Extending:
+Extending Lilypond:
@rextend{Music functions}.
Installed Files:
\chordmode { f2 g }
@end lilypond
-
@seealso
Music Glossary:
@rglos{chord}.
Snippets:
@rlsr{Chords}.
-
@knownissues
-
Predefined shorthands for articulations and ornaments cannot be used
on notes in chord mode, see @ref{Articulations and ornamentations}.
}
@end lilypond
+
@node Common chords
@unnumberedsubsubsec Common chords
@end multitable
-
@seealso
Notation Reference:
@ref{Common chord modifiers},
Snippets:
@rlsr{Chords}.
-
@knownissues
Only one quality modifier should be used per chord, typically on the
highest step present in the chord. Chords with more than quality
standard chords are shown in
@ref{Common chord modifiers}.
-
@seealso
Notation Reference:
@ref{Common chord modifiers}.
Snippets:
@rlsr{Chords}.
-
@knownissues
-
Each step can only be present in a chord once. The following
simply produces the augmented chord, since @code{5+} is
interpreted last.
}
@end lilypond
+
@node Displaying chords
@subsection Displaying chords
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{simple-lead-sheet.ly}
-
@seealso
Music Glossary:
@rglos{chord}.
@rinternals{Volta_engraver},
@rinternals{Bar_engraver}.
-
@knownissues
-
Chords containing inversions or altered bass notes are not named
properly if entered using simultaneous music.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing-chord-separator.ly}
-
@seealso
Notation Reference:
@ref{Chord name chart},
Snippets:
@rlsr{Chords}.
-@c Internals Reference:
-@c @r internals{}.
-
-
@knownissues
-
Chord names are determined from both the pitches that are present
in the chord and the information on the chord structure that may
have been entered in @code{\chordmode}. If the simultaneous pitches
@code{baseline-skip}.
@end ignore
-
@seealso
Music Glossary:
@rglos{figured bass}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing-the-positions-of-figured-bass-alterations.ly}
-
@seealso
-@c Music Glossary:
-@c @rglos{}.
-@c
-@c Learning Manual:
-@c @rlearning{}.
-@c
-@c Notation Reference:
-@c @ref{}.
-@c
-@c Application Usage:
-@c @rprogram{}.
-@c
-@c Installed Files:
-@c @file{}.
-@c
Snippets:
@rlsr{Chords}.
@rinternals{FiguredBass}.
-@c @knownissues
-
-
@node Displaying figured bass
@unnumberedsubsubsec Displaying figured bass
>>
@end lilypond
-
@predefined
@cindex figured bass alignment
@code{\bassFigureStaffAlignmentDown},
@code{\bassFigureStaffAlignmentNeutral}.
@endpredefined
-
-@c @snippets
-
-
@seealso
-@c Music Glossary:
-@c @rglos{}.
-@c
-@c Learning Manual:
-@c @rlearning{}.
-@c
-@c Notation Reference:
-@c @ref{}.
-@c
-@c Application Usage:
-@c @rprogram{}.
-@c
-@c Installed Files:
-@c @file{}.
-@c
Snippets:
@rlsr{Chords}.
@rinternals{BassFigureContinuation},
@rinternals{FiguredBass}.
-
@knownissues
-
To ensure that continuation lines work properly, it is
safest to use the same rhythm in the figure line as in
the bass line.
}
>>
@end lilypond
-
@code{\huge}.
@endpredefined
-
@seealso
Snippets:
@rlsr{Editorial annotations}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{avoiding-collisions-with-chord-fingerings.ly}
-
@seealso
Notation Reference:
@ref{Direction and placement}.
c
@end lilypond
-Notation objects which are attached to invisible notes are still
-visible.
+Note heads, stems, and flags, and rests are invisible. Beams
+are invisible if they start on a hidden note. Objects that are
+attached to invisible notes are still visible.
@lilypond[verbatim,quote,relative=2]
-c4( d)
+e8(\p f g a)--
\hideNotes
-e4(\p f)--
+e8(\p f g a)--
@end lilypond
@code{\unHideNotes}.
@endpredefined
-
@seealso
Learning Manual:
@rlearning{Visibility and color of objects}.
gis4 a
@end lilypond
-
@seealso
Notation Reference:
@ref{List of colors}, @ref{The
Snippets:
@rlsr{Editorial annotations}.
-
@cindex x11 color
@cindex colored notes in chords
@cindex notes, colored in chords
and @code{ForestGreen}. For web use normal colors are recommended
(i.e., @code{blue}, @code{green}, @code{red}).
-
Notes in a chord cannot be colored with @code{\override}; use
@code{\tweak} instead, see @ref{The tweak command}.
c2 \parenthesize r
@end lilypond
-
@seealso
Snippets:
@rlsr{Editorial annotations}.
@rinternals{ParenthesesItem},
@rinternals{parentheses-interface}.
-
@knownissues
-
Parenthesizing a chord prints parentheses around each individual
note, instead of a single large parenthesis around the entire
chord.
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{default-direction-of-stems-on-the-center-line-of-the-staff.ly}
-
@seealso
Notation Reference:
@ref{Direction and placement}.
}
@end lilypond
-
@predefined
@code{\balloonLengthOn},
@code{\balloonLengthOff}.
@endpredefined
-
@seealso
Snippets:
@rlsr{Editorial annotations}.
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{grid-lines--changing-their-appearance.ly}
-
@seealso
Snippets:
@rlsr{Editorial annotations}.
}
@end lilypond
-
@seealso
Snippets:
@rlsr{Editorial annotations}.
@rinternals{HorizontalBracket},
@rinternals{horizontal-bracket-interface},
@rinternals{Staff}.
-
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing-text-and-spanner-styles-for-text-dynamics.ly}
-
@seealso
Music Glossary:
@rglos{al niente},
Font settings in markup mode are described in
@ref{Selecting font and font size}.
-
@seealso
Notation Reference:
@ref{Formatting text},
@ref{What goes into the MIDI output?},
@ref{Controlling MIDI dynamics}.
-Snippets:
-@rlsr{Expressive marks}.
-
-Extend:
+Extending LilyPond:
@rextend{Markup construction in Scheme}.
+Snippets:
+@rlsr{Expressive marks}.
@node Expressive marks as curves
@lilypondfile[verbatim,quote,texidoc,doctitle]
{making-slurs-with-complex-dash-structure.ly}
-
@seealso
Music Glossary:
@rglos{slur}.
@code{\phrasingSlurSolid}.
@endpredefined
-
@seealso
Learning Manual:
@rlearning{On the un-nestedness of brackets and ties}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{inserting-a-caesura.ly}
-
@seealso
Music Glossary:
@rglos{caesura}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{adjusting-the-shape-of-falls-and-doits.ly}
-
@seealso
Music Glossary:
@rglos{fall},
@lilypondfile[verbatim,quote,texidoc,doctitle]
{contemporary-glissando.ly}
-
@seealso
Music Glossary:
@rglos{glissando}.
Internals Reference:
@rinternals{Glissando}.
-
@knownissues
-
Printing text over the line (such as @notation{gliss.}) is not
supported.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{creating-arpeggios-across-notes-in-different-voices.ly}
-
@seealso
Music Glossary:
@rglos{arpeggio}.
@rinternals{Slur},
@rinternals{PianoStaff}.
-
@knownissues
-
@cindex cross-staff parenthesis-style arpeggio
@cindex arpeggio, parenthesis-style, cross-staff
@cindex arpeggio, cross-staff parenthesis-style
eis4\stopTrillSpan
@end lilypond
-
@predefined
@code{\startTrillSpan},
@code{\stopTrillSpan}.
Internals Reference:
@rinternals{TrillSpanner}.
-
@end itemize
-
@seealso
Notation Reference:
@ref{Fingering instructions},
@lilypondfile[verbatim,quote,texidoc,doctitle]
{allowing-fingerings-to-be-printed-inside-the-staff.ly}
-
@seealso
Notation Reference:
@ref{Fingering instructions}.
Guitar special effects are limited to harmonics and slides.
+
@node Custom tablatures
@unnumberedsubsubsec Custom tablatures
@ref{Scheme functions}.
Installed Files:
-@file{ly/string-tuning-init.ly}
+@file{ly/string-tuning-init.ly},
@file{scm/tablature.scm}.
Snippets:
cases for instruments where string pitches do not vary
monotonically with string number, such as ukuleles.
+
@node Fret diagram markups
@unnumberedsubsubsec Fret diagram markups
@node Predefined fret diagrams
@unnumberedsubsubsec Predefined fret diagrams
-
@cindex fret diagrams
@cindex fret diagrams, ukulele
@cindex fret diagrams, mandolin
@lilypondfile[verbatim,quote,texidoc,doctitle]
{fretboards-alternate-tables.ly}
-
@seealso
Notation Reference:
@ref{Custom tablatures},
@code{\predefinedFretboardsOn}.
@endpredefined
-
@seealso
Notation Reference:
@ref{Custom tablatures}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{fingerings,-string-indications,-and-right-hand-fingerings.ly}
-
@seealso
Snippets:
@rlsr{Fretted strings}.
e16 b g d
@end lilypond
-
@seealso
Notation Reference:
@ref{Text spanners}.
@end example
@seealso
+Installed Files:
+@file{ly/string-tunings-init.ly}.
+
Snippets:
@rlsr{Fretted strings}.
-
-Installed Files:
-@file{ly/string-tunings-init.ly}
@end itemize
-
@seealso
Learning Manual:
@rlearning{How LilyPond input files work}.
Installed Files:
@file{ly/titling-init.ly}.
+
@node Default layout of headers and footers
@unnumberedsubsubsec Default layout of headers and footers
@ref{Title blocks explained},
@ref{Default layout of book and score title blocks}.
+
@node Creating footnotes
@subsection Creating footnotes
}
@end lilypond
-
@seealso
-Init files: @file{../ly/toc-init.ly}.
-
+Installed Files:
+@file{ly/toc-init.ly}.
@predefined
@funindex \table-of-contents
@ref{Automatic part combining},
@ref{Including LilyPond files}.
-
@ignore
@c This warning is more general than this placement implies.
@c Rests are not merged whether or not they come from tagged sections.
@c Should be deleted? -td
@knownissues
-
Multiple rests are not merged if you create a score with more
than one tagged section at the same place.
@end ignore
+
@node Using global settings
@unnumberedsubsubsec Using global settings
Notation Reference:
@ref{Including LilyPond files}.
+
@node Special characters
@subsection Special characters
@file{ly/text-replacements.ly}.
-
@node Controlling output
@section Controlling output
reverse the process.
@seealso
-Learning Manual: @rlearning{Other sources of information}.
+Learning Manual:
+@rlearning{Other sources of information}.
@knownissues
Gonville cannot be used to typeset @q{Ancient Music} notation and it is
Snippets:
@rlsr{Keyboards}.
+
@node Changing staff manually
@unnumberedsubsubsec Changing staff manually
>>
@end lilypond
-
@seealso
Notation Reference:
@ref{Changing staff manually}.
@knownissues
-
@cindex chords, splitting across staves with \autochange
The staff switches may not end up in optimal places. For high
Chords will not be split across the staves; they will be assigned to a
staff based on the first note named in the chord construct.
+
@node Staff-change lines
@unnumberedsubsubsec Staff-change lines
@code{\hideStaffSwitch}.
@endpredefined
-
@seealso
Snippets:
@rlsr{Keyboards}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{indicating-cross-staff-chords-with-arpeggio-bracket.ly}
-
@seealso
Snippets:
@rlsr{Keyboards}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{accordion-discant-symbols.ly}
-
@seealso
Snippets:
@rlsr{Keyboards}.
@ref{Arpeggio},
@ref{Harmonics}.
+
@node Harp pedals
@unnumberedsubsubsec Harp pedals
A set of glyphs with a single style and shape comprise a font, and
a set of fonts covering several styles and sizes comprise a typeface.
-
@seealso
Notation Reference:
@ref{Fonts},
Notation Reference:
@ref{mutable}.
+
@node interface
@unnumberedsubsec interface
Notation Reference:
@ref{immutable}.
+
@node output-def
@unnumberedsubsec output-def
@end itemize
-
@seealso
Notation Reference:
@ref{Showing melody rhythms},
There are a few issues concerning MIDI support for percussion
instruments; for details please see @ref{Percussion in MIDI}.
-
@seealso
Notation Reference:
@ref{Percussion in MIDI},
@ref{Percussion notes}.
-File:
-@file{ly/drumpitch-init.ly}
+Installed Files:
+@file{ly/drumpitch-init.ly}.
Snippets:
@rlsr{Percussion}.
}
@end lilypond
-
@seealso
-
Notation Reference:
@ref{Tremolo repeats}.
vibraphone, and timpani) are written using normal staves.
This is covered in other sections of the manual.
-
@seealso
@c TODO: possibly link to an alternate section of NR 3.5, if
@c "percussion in MIDI" gets a separate subsubsection for
}
@end lilypond
-
@seealso
Snippets:
@rlsr{Percussion}.
Also note that you must add chords (@code{< >} brackets)
around each @code{\parenthesize} statement.
-
@seealso
Snippets:
@rlsr{Percussion}.
}
@end lilypond
-
@seealso
Music Glossary:
@rglos{Pitch names}.
Internals Reference:
@rinternals{RelativeOctaveMusic}.
-
@cindex relative octave entry and transposition
@cindex transposition and relative octave entry
@funindex \relative
@funindex relative
-
@c DEPRECATED
If no @code{@var{startpitch}} is specified for @code{\relative},
then@tie{}@code{c'} is assumed. However, this is a deprecated
discouraged.
-
@node Accidentals
@unnumberedsubsubsec Accidentals
@rinternals{AccidentalCautionary},
@rinternals{accidental-interface}.
-
@cindex accidental, quarter-tone
@cindex quarter-tone accidental
@knownissues
-
There are no generally accepted standards for denoting
quarter-tone accidentals, so LilyPond's symbol does not conform to
any standard.
-
@node Note names in other languages
@unnumberedsubsubsec Note names in other languages
pitches and tuning systems are also supported: see
@ref{Common notation for non-Western music}.
-
@seealso
Music Glossary:
@rglos{Pitch names},
}
@end lilypond
-
@seealso
Snippets:
@rlsr{Pitches}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
-
@seealso
Notation Reference:
@ref{Instrument transpositions},
Internals Reference:
@rinternals{TransposedMusic}.
-
@funindex \transpose
@funindex transpose
@funindex \chordmode
@funindex relative
@knownissues
-
The relative conversion will not affect @code{\transpose},
@code{\chordmode} or @code{\relative} sections in its argument. To use
relative mode within transposed music, an additional @code{\relative}
@lilypondfile[verbatim,quote,texidoc,doctitle]
{non-traditional-key-signatures.ly}
-
@seealso
Music Glossary:
@rglos{church mode},
@lilypondfile[verbatim,quote,texidoc,doctitle]
{ottava-text.ly}
-
@seealso
Music Glossary:
@rglos{octavation}.
c2 g
@end lilypond
-
@seealso
Music Glossary:
@rglos{concert pitch},
@rinternals{AccidentalPlacement},
@rinternals{accidental-suggestion-interface}.
-
@cindex accidentals and simultaneous notes
@cindex simultaneous notes and accidentals
@cindex accidentals in chords
@cindex chords, accidentals in
@knownissues
-
Simultaneous notes are not considered in the automatic
determination of accidentals; only previous notes and the key
signature are considered. Forcing accidentals with@tie{}@code{!}
}
@end lilypond
+
@node Ambitus
@unnumberedsubsubsec Ambitus
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing-the-ambitus-gap.ly}
-
@seealso
Music Glossary:
@rglos{ambitus}.
@rinternals{AmbitusNoteHead},
@rinternals{ambitus-interface}.
-
@knownissues
-
There is no collision handling in the case of multiple per-voice
ambitus.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{numbers-as-easy-note-heads.ly}
-
@seealso
Notation Reference:
@ref{Setting the staff size}.
To see all note head styles, see @ref{Note head styles}.
-
@seealso
Snippets:
@rlsr{Pitches}.
}
@end lilypond
-
@predefined
@code{\improvisationOn},
@code{\improvisationOff}.
@endpredefined
-
@seealso
Snippets:
@rlsr{Pitches}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
-
@seealso
Notation Reference:
@ref{Bar lines},
@rinternals{RepeatedMusic},
@rinternals{UnfoldedRepeatedMusic}.
+
@node Short repeats
@subsection Short repeats
@lilypondfile[verbatim,quote,texidoc,doctitle]
{cross-staff-tremolos.ly}
-
@seealso
Snippets:
@rlsr{Repeats}.
@cindex tremolo, cross-staff
@cindex cross-staff tremolo
-
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{changing-the-number-of-augmentation-dots-per-note.ly}
-
@seealso
Music Glossary:
@rglos{breve},
@rinternals{Dots},
@rinternals{DotColumn}.
-
@knownissues
-
@c Deliberately duplicated in Durations and Rests. -gp
There is no fundamental limit to rest durations (both in terms of
longest and shortest), but the number of glyphs is limited:
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{permitting-line-breaks-within-beamed-tuplets.ly}
-
@seealso
Music Glossary:
@rglos{triplet},
@rinternals{TupletNumber},
@rinternals{TimeScaledMusic}.
-
@cindex grace notes within tuplet brackets
@knownissues
One application of this command is in polymetric
notation, see @ref{Polymetric notation}.
-
@seealso
Notation Reference:
@ref{Tuplets},
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{rest-styles.ly}
-
@seealso
Music Glossary:
@rglos{breve},
Internals Reference:
@rinternals{Rest}.
-
@knownissues
-
@c Deliberately duplicated in Durations and Rests. -gp
There is no fundamental limit to rest durations (both in terms of
longest and shortest), but the number of glyphs is limited: there
\skip 1 \skip1 \skip 1
@end lilypond
-
@seealso
Learning Manual:
@rlearning{Visibility and color of objects}.
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{multi-measure-rest-markup.ly}
-
@seealso
Music Glossary:
@rglos{multi-measure rest}.
@rinternals{MultiMeasureRestNumber},
@rinternals{MultiMeasureRestText}.
-
@cindex fingerings and multi-measure rests
@cindex multi-measure rests and fingerings
Multi-measure rests do not take part in rest collisions.
+
@node Displaying rhythms
@subsection Displaying rhythms
@lilypondfile[verbatim,quote,texidoc,doctitle]
{time-signature-printing-only-the-numerator-as-a-number-instead-of-the-fraction.ly}
-
@seealso
Music Glossary:
@rglos{time signature}
@rinternals{TimeSignature},
@rinternals{Timing_translator}.
+
@node Metronome marks
@unnumberedsubsubsec Metronome marks
For more details, see @ref{Formatting text}.
-
@seealso
Music Glossary:
@rglos{metronome},
r8 e,8 | a4 c8 b[ c b] |
@end lilypond
+
@node Unmetered music
@unnumberedsubsubsec Unmetered music
@code{\cadenzaOff}.
@endpredefined
-
@seealso
Music Glossary:
@rglos{cadenza}.
Snippets:
@rlsr{Rhythms}.
-
@cindex cadenza line breaks
@cindex cadenza page breaks
@cindex unmetered music, line breaks
@cindex page breaks in unmetered music
@knownissues
-
LilyPond will insert line breaks and page breaks only at a
bar line. Unless the unmetered music ends before the end of the
staff line, you will need to insert invisible bar lines with
@rinternals{Default_bar_line_engraver},
@rinternals{Staff}.
-
@knownissues
When using different time signatures in parallel, notes at the same
moment will be placed at the same horizontal location. However, the bar
regular in each of the individual staves than would be normal without
the different time signatures.
+
@node Automatic note splitting
@unnumberedsubsubsec Automatic note splitting
the measures are not entirely filled, then the ties show exactly how
much each measure is off.
-
@seealso
Music Glossary:
@rglos{tie}
@rinternals{Completion_rest_engraver},
@rinternals{Forbid_line_break_engraver}.
-
@knownissues
-
Not all durations (especially those containing tuplets) can be
represented exactly with normal notes and dots, but the
@code{Completion_heads_engraver} will not insert tuplets.
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{guitar-strum-rhythms.ly}
-
@seealso
Snippets:
@rlsr{Rhythms}.
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{beam-endings-in-score-context.ly}
-
@seealso
Installed Files:
@file{scm/beam-settings.scm}.
@rinternals{BeamForbidEvent},
@rinternals{beam-interface}.
-
@knownissues
If a score ends while an automatic beam has not been ended and is
still accepting notes, this last beam will not be typeset at all.
>>
@end lilypond
+
@node Manual beams
@unnumberedsubsubsec Manual beams
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{flat-flags-and-beam-nibs.ly}
-
@seealso
Notation Reference:
@ref{Direction and placement},
The spacing in the printed output represents the
note durations only approximately, but the MIDI output is exact.
-
@predefined
@code{\featherDurations}.
@endpredefined
Snippets:
@rlsr{Rhythms}.
-
@knownissues
-
The @code{\featherDurations} command only works with very short
music snippets, and when numbers in the fraction are small.
@node Bars
@subsection Bars
-
@menu
* Bar lines::
* Bar numbers::
@code{"|"}. This may be changed at any time with
@samp{\set Timing.defaultBarType = @var{bartype}}.
-
@seealso
Notation Reference:
@ref{Line breaking},
will print a warning if the @code{currentBarNumber} is not 123
when it is processed.
-
@seealso
Snippets:
@rlsr{Rhythms}.
@ref{Formatting text}. For more precise control, see
@code{break-alignable-interface} in @ref{Aligning objects}.
+The file @file{scm/translation-functions.scm} contains
+the definitions of @code{format-mark-numbers} and
+@code{format-mark-letters}. They can be used as inspiration for
+other formatting functions.
@seealso
Notation Reference:
@ref{Aligning objects}.
Installed Files:
-@file{scm/translation-functions.scm} contains
-the definitions of @code{format-mark-numbers} and
-@code{format-mark-letters}. They can be used as inspiration for
-other formatting functions.
+@file{scm/translation-functions.scm}.
Snippets:
@rlsr{Rhythms}.
@lilypondfile[verbatim,quote,texidoc,doctitle]
{positioning-grace-notes-with-floating-space.ly}
-
@seealso
Music Glossary:
@rglos{grace notes},
@rglos{appoggiatura}.
Notation Reference:
+@ref{Scaling durations},
@ref{Manual beams}.
Installed Files:
@knownissues
-
@cindex acciaccatura, multi-note
@cindex multi-note acciaccatura
@cindex grace-note synchronization
>>
@end lilypond
-
@seealso
Music Glossary:
@rglos{cadenza}.
@code{ly:make-moment 7 16} is the duration of seven sixteenths
notes.
-
@seealso
Notation Reference:
@ref{Bar numbers},
Internals Reference:
@rinternals{Timing_translator},
@rinternals{Score}.
-
@end itemize
+
@node Chord repetition
@unnumberedsubsubsec Chord repetition
even simultaneously. In such a case no attempt is made to
automatically avoid collisions between ordinary notes and clusters.
-
@seealso
Music Glossary:
@rglos{cluster}.
@rinternals{ClusterSpannerBeacon},
@rinternals{Cluster_spanner_engraver}.
-
@knownissues
-
Clusters look good only if they span at least two chords; otherwise
they appear too narrow.
Clusters do not produce MIDI output.
+
@node Multiple voices
@subsection Multiple voices
@code{\oneVoice}.
@endpredefined
-Snippets:
-@rlsr{Simultaneous notes}.
-
@seealso
Learning Manual:
@rlearning{Voices contain music},
@ref{Invisible rests},
@ref{Stems}.
+Snippets:
+@rlsr{Simultaneous notes}.
+
@node Voice styles
@unnumberedsubsubsec Voice styles
@code{\voiceNeutralStyle}.
@endpredefined
-
@seealso
Learning Manual:
@rlearning{I'm hearing Voices},
are at the same time differently dotted are not clear.
@end ignore
+
@node Automatic part combining
@unnumberedsubsubsec Automatic part combining
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing-partcombine-texts.ly}
-
@seealso
Music Glossary:
@rglos{a due},
@rinternals{Voice}.
@knownissues
-
All @code{\partcombine...} functions can only accept two voices and are
not designed to work with lyrics; such that when one of the voices is
explicitly named in order to attach lyrics to it, the partcombiner will
}
@end lilypond
-
@seealso
Learning Manual:
@rlearning{Organizing pieces with variables}.
@rlsr{Spacing}.
@knownissues
-
The titles (from the @code{\header} block) are treated as a
system, so @code{ragged-bottom} and @code{ragged-last-bottom} will
add space between the titles and the first system of the score.
@file{ly/paper-defaults-init.ly}.
@knownissues
-
Explicitly defined paper-sizes will override any user-defined left or
right margin settings.
@end table
-
@seealso
Installed Files:
@file{ly/titling-init.ly}.
Snippets:
@rlsr{Spacing}.
-
@knownissues
-
The default page header puts the page number and the @code{instrument}
field from the @code{\header} block on a line.
@}
@end example
-
@seealso
Notation Reference:
@ref{Changing context default settings}.
@rinternals{StaffSymbol}) can be used to tune the size for individual
staves. The sizes of individual staves are relative to the global size.
-
@seealso
Notation Reference:
@ref{Selecting notation font size}.
Snippets:
@rlsr{Spacing}.
-
@knownissues
-
@code{layout-set-staff-size} does not change the distance between the
staff lines.
@code{\noBreak}.
@endpredefined
-
@seealso
Notation Reference:
@ref{\paper variables for line breaking}.
@code{\noPageBreak}.
@endpredefined
-
@seealso
Notation Reference:
@ref{\paper variables for page breaking}.
cramping and stretching, both horizontally and vertically. Unlike
@code{ly:page-turn-breaking}, it has no concept of page turns.
-
@seealso
Snippets:
@rlsr{Spacing}.
@code{\allowPageTurn}, may also be used at top-level, between scores and
top-level markups.
-
@predefined
@funindex \pageTurn
@code{\pageTurn},
@code{\allowPageTurn}.
@endpredefined
-
@seealso
Snippets:
@rlsr{Spacing}.
-
@knownissues
-
There should only be one @code{Page_turn_engraver} in a score. If there is more
than one, they will interfere with each other.
@}
@end example
-
@seealso
Snippets:
@rlsr{Spacing}.
}
@end lilypond
-
@seealso
Snippets:
@rlsr{Spacing}.
}
@end lilypond
-
@seealso
Notation Reference:
@ref{Vertical spacing}.
@ref{Flexible vertical spacing \paper variables},
@ref{Modifying alists}.
+Installed Files:
+@file{ly/engraver-init.ly},
+@file{scm/define-grobs.scm}.
+
Internals Reference:
@rinternals{Contexts},
@rinternals{VerticalAxisGroup},
@rinternals{StaffGrouper}.
-Installed Files:
-@file{ly/engraver-init.ly},
-@file{scm/define-grobs.scm}.
-
@node Spacing of ungrouped staves
@unnumberedsubsubsec Spacing of ungrouped staves
>>
@end lilypond
-
@seealso
Installed Files:
@file{ly/engraver-init.ly},
passed to these different settings will avoid this.
@end itemize
-
@seealso
Snippets:
@rlsr{Spacing}.
c''2
@end lilypond
-
@seealso
Snippets:
@rlsr{Spacing}.
Proportional notation is supported; see @ref{Proportional notation}.
-
@seealso
+Essay on automated music engraving:
+@ressay{Optical spacing}.
+
Snippets:
@rlsr{Spacing}.
@rinternals{StaffSpacing},
@rinternals{NonMusicalPaperColumn}.
-Essay on automated music engraving:
-@ressay{Optical spacing}.
-
-
@knownissues
-
There is no convenient mechanism to manually override spacing. The
following work-around may be used to insert extra space into a score,
adjusting the padding value as necessary.
+
@example
\override Score.NonMusicalPaperColumn #'padding = #10
@end example
@code{SpacingSpanner} object, and hence new @code{\override}s
may be used in that location.
-
@seealso
Snippets:
@rlsr{Spacing}.
\new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c32] }
@end lilypond
-
@seealso
Snippets:
@rlsr{Spacing}.
@}
@end example
-
@seealso
Snippets:
@rlsr{Spacing}.
to break across systems and pages. See the respective parts of the manual
for these related settings.
-
@seealso
Notation Reference:
@ref{New spacing area}.
(@var{a},@var{b}) are intervals, where @var{a} is the lower
edge and @var{b} the upper edge of the interval.
-
@seealso
Notation Reference:
@ref{Setting the staff size}.
@}
@end example
+@item
+Force the number of pages. For example, the following
+assignment will force a layout with 2 pages.
+
+@example
+\paper @{
+ page-count = #2
+@}
+@end example
+
@item
Avoid (or reduce) objects that increase the vertical size of a
system. For example, volta repeats (or alternate repeats) require
@end itemize
-
@seealso
Notation Reference:
@ref{Page layout},
New single staff contexts may be defined. For details, see
@ref{Defining new contexts}.
-
@seealso
Music Glossary:
@rglos{staff},
@lilypondfile[verbatim,quote,texidoc,doctitle]
{mensurstriche-layout-bar-lines-between-the-staves.ly}
-
@seealso
Music Glossary:
@rglos{brace},
@lilypondfile[verbatim,quote,texidoc,doctitle]
{nesting-staves.ly}
-
@seealso
Notation Reference:
@ref{Grouping staves},
@rinternals{SystemStartBracket},
@rinternals{SystemStartSquare}.
+
@node Separating systems
@unnumberedsubsubsec Separating systems
@lilypondfile[verbatim,quote,texidoc,doctitle]
{vertically-aligning-ossias-and-lyrics.ly}
-
@seealso
Music Glossary:
@rglos{ossia},
@lilypondfile[verbatim,quote,texidoc,doctitle]
{removing-the-first-empty-line.ly}
-
@seealso
Music Glossary:
@rglos{Frenched staff}.
@rinternals{VerticalAxisGroup},
@rinternals{Staff_symbol_engraver}.
-
@knownissues
-
Removing @code{Staff_symbol_engraver} also hides bar lines. If
bar line visibility is forced, formatting errors may occur. In
this case, use the following overrides instead of removing the
@code{\Staff \RemoveEmptyStaves} see
@ref{Changing context default settings}.
+
@node Writing parts
@subsection Writing parts
}
@end lilypond
-
@seealso
Notation Reference:
@ref{\paper variables for shifts and indents},
@ref{Instrument transpositions},
@ref{Using tags}.
+Installed Files:
+@file{scm/define-event-classes.scm}.
+
Snippets:
@rlsr{Staff notation}.
@rinternals{QuoteMusic},
@rinternals{Voice}.
-Installed Files:
-@file{scm/define-event-classes.scm}.
-
-
@knownissues
Only the contents of the first @code{Voice} occurring in an
@code{\addQuote} command will be considered for quotation, so if the music
collected into an instrument definition for repeated use, using
@code{\addInstrumentDefinition} described in @ref{Instrument names}.
-
@seealso
Notation Reference:
@ref{Quoting other voices},
@rinternals{CueVoice},
@rinternals{Voice}.
-
@knownissues
-
Collisions can occur with rests, when using @code{\cueDuring},
between @code{Voice} and @code{CueVoice} contexts. When using
@code{\cueDuringWithClef} or @code{\transposedCueDuring} the extra
@code{\textLengthOff}.
@endpredefined
-
@seealso
Learning Manual:
@rlearning{Placement of objects}.
Internals Reference:
@rinternals{TextScript}.
-
@cindex text outside margin
@cindex margin, text running over
@cindex text, keeping inside margin
@cindex lyrics, keeping inside margin
-
@knownissues
Checking to make sure that text scripts and lyrics are within the
margins requires additonal calculations. In cases where slightly faster
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-on-every-staff.ly}
-
@seealso
Notation Reference:
@ref{Rehearsal marks},
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{stand-alone-two-column-markup.ly}
-
@seealso
Notation Reference:
@ref{Formatting text},
An exhaustive list of @code{\markup}-specific commands can be found in
@ref{Text markup commands}.
-
@seealso
Notation Reference:
@ref{Text markup commands}.
Installed Files:
@file{scm/markup.scm}.
-
@knownissues
Syntax errors for markup mode can be confusing.
@code{\larger}.
@endpredefined
-
@seealso
Notation Reference:
@ref{Font},
@ref{Manual repeat marks},
@ref{Fonts}.
+Installed Files:
+@file{scm/define-markup-commands.scm}.
+
Snippets:
@rlsr{Text}.
Internals Reference:
@rinternals{TextScript}.
-Installed Files:
-@file{scm/define-markup-commands.scm}.
-
@knownissues
Using the font sizing commands @code{\teeny}, @code{\tiny},
@code{\small}, @code{\normalsize}, @code{\large}, and
An exhaustive list of text alignment commands can be found in
@ref{Align}.
-
@seealso
Learning Manual:
@rlearning{Moving objects}.
@ref{Align},
@ref{Text marks}.
+Installed Files:
+@file{scm/define-markup-commands.scm}.
+
Snippets:
@rlsr{Text}.
Internals Reference:
@rinternals{TextScript}.
-Installed Files:
-@file{scm/define-markup-commands.scm}.
-
@node Graphic notation inside markup
@unnumberedsubsubsec Graphic notation inside markup
An exhaustive list of graphics-specific commands can be found in
@ref{Graphic}.
-
@seealso
Notation Reference:
@ref{Graphic},
@ref{Editorial annotations},
@ref{Align}.
+Installed Files:
+@file{scm/define-markup-commands.scm},
+@file{scm/stencil.scm}.
+
Snippets:
@rlsr{Text}.
Internals Reference:
@rinternals{TextScript}.
-Installed Files:
-@file{scm/define-markup-commands.scm},
-@file{scm/stencil.scm}.
-
@node Music notation inside markup
@unnumberedsubsubsec Music notation inside markup
An exhaustive list of music notation related commands can be found in
@ref{Music}.
-
@seealso
Notation Reference:
@ref{Music},
@ref{The Feta font},
@ref{Fonts explained}.
+Installed Files:
+@file{scm/define-markup-commands.scm},
+@file{scm/fret-diagrams.scm},
+@file{scm/harp-pedals.scm}.
+
Snippets:
@rlsr{Text}.
Internals Reference:
@rinternals{TextScript}.
-Installed Files:
-@file{scm/define-markup-commands.scm},
-@file{scm/fret-diagrams.scm},
-@file{scm/harp-pedals.scm}.
-
@node Multi-page markup
@unnumberedsubsubsec Multi-page markup
An exhaustive list of markup list commands can be found in
@ref{Text markup list commands}.
-
@seealso
Notation Reference:
-@ref{Text markup list commands},
-
-Snippets:
-@rlsr{Text}.
+@ref{Text markup list commands}.
-Extending:
+Extending LilyPond:
@rextend{New markup list command definition}.
-Internals Reference:
-@rinternals{TextScript}.
-
Installed Files:
@file{scm/define-markup-commands.scm}.
+Snippets:
+@rlsr{Text}.
+
+Internals Reference:
+@rinternals{TextScript}.
@funindex \markuplist
@funindex markuplist
possible to use other fonts, as explained in the following sections:
@ref{Single entry fonts} and @ref{Entire document fonts}.
-
@seealso
Notation Reference:
@ref{The Feta font},
lilypond -dshow-available-fonts x
@end example
-
@seealso
Notation Reference:
@ref{Fonts explained},
@c we don't do Helvetica / Courier, since GS incorrectly loads
@c Apple TTF fonts
-
@seealso
Notation Reference:
@ref{Fonts explained},
@end itemize
-
@seealso
Learning Manual:
@rlearning{String quartet}.
@code{\open}.
@endpredefined
-
@seealso
Notation Reference:
@ref{Articulations and ornamentations},
chord construct even if there is only a single note. Normally
@code{@bs{}harmonicsOn} would be used in this situation.}
-
@seealso
Music Glossary:
@rglos{harmonics}.
Snippets:
@rlsr{Vocal music}.
+
@node Entering lyrics
@unnumberedsubsubsec Entering lyrics
@rinternals{LyricText}.
Snippets:
-@rlsr{Text}
+@rlsr{Text}.
+
@node Aligning lyrics to a melody
@unnumberedsubsubsec Aligning lyrics to a melody
Notation Reference:
@ref{Contexts explained},
-@ref{Automatic syllable durations}.
+@ref{Automatic syllable durations},
@ref{Stanzas},
@ref{Manual syllable durations},
@ref{Dialogue over music},
Internals Reference:
@rinternals{Lyrics}.
+
@node Automatic syllable durations
@unnumberedsubsubsec Automatic syllable durations
@ref{Keeping contexts alive},
@ref{Placing lyrics vertically}.
+
@node Manual syllable durations
@unnumberedsubsubsec Manual syllable durations
}
@end lilypond
-
@seealso
Internals Reference:
@rinternals{LyricCombineMusic}.
@rinternals{Tunable context properties}.
@knownissues
-
Extender lines under melismata are not created automatically; they
must be inserted manually with a double underscore.
(threshold below which hyphens are removed) properties of
@code{LyricHyphen}.
-
@seealso
Internals Reference:
@rinternals{LyricExtender},
}
@end lilypond
-
@seealso
Notation Reference:
@ref{Placing lyrics vertically}.
@ref{Context layout order},
@ref{Creating contexts}.
+
@node Placing syllables horizontally
@unnumberedsubsubsec Placing syllables horizontally
Snippets:
@rlsr{Vocal music}.
+
@node Lead sheets
@unnumberedsubsubsec Lead sheets
@rinternals{Lyrics},
@rinternals{PianoStaff}.
+
@node Score layouts for choral
@unnumberedsubsubsec Score layouts for choral
Extending LilyPond:
@rextend{Markup construction in Scheme}.
+
@node Musical cues
@unnumberedsubsubsec Musical cues
@lilypondfile[verbatim,quote,texidoc,doctitle]
{changing--flageolet-mark-size.ly}
-
@seealso
Notation Reference:
@ref{Breath marks},
{recorder-fingering-chart.ly}
@seealso
-
Notation Reference:
@ref{Woodwind diagrams}.
piobaireachd high g can be written @code{gflat} when it occurs in light
music.
-
@seealso
+Snippets:
@rlsr{Winds}.
}
@end lilypond
-
@seealso
+Snippets:
@rlsr{Winds}.
+
@node Woodwinds
@subsection Woodwinds
{woodwind-diagrams-key-lists.ly}
@seealso
-
Installed Files:
@file{scm/define-woodwind-diagrams.scm},
@file{scm/display-woodwind-diagrams.scm}.
-Snippets: @rlsr{Winds}.
+Snippets:
+@rlsr{Winds}.
Internals Reference:
@rinternals{TextScript},
development to become more involved, and - last but not least - write some
great code for the benefit of all!
-In addition to getting paid for your work, you'll gain experience in
-software development, which many of previous GSoC students describe as
-@emph{invaluable} (and you'll get a t-shirt, too!).
-
-If you have any questions, read
-@uref{http://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2012/faqs, GSoC FAQ}
-or contact us at @code{lilypond-devel@@gnu.org}.
+We are participating in GSoC as a part of GNU Project. See
+@uref{http://www.gnu.org/software/soc-projects/guidelines.html, GNU GSoC webpage}
+for information on how to participate.
@divEnd
@subheading Our Ideas List
Below is a list of projects suggested for GSoC students. If you don't
-see a project that suits you, feel free to contact us and suggest your own!
+see a project that suits you, feel free to suggest your own!
It's also possible to scale down a project if you feel it's too big.
We require that every student has basic @code{git} knowledge, and
WEB_ROOT_FILES = $(WEB_TARGETS:%=$(outdir)/%-root/index.html)
-WEB_EXAMPLE_FILES = $(wildcard input/$(outdir)/*.ly) \
- $(wildcard input/*/$(outdir)/*.ly) \
- $(wildcard input/*/*/$(outdir)/*.ly)
-
WEB_TRACKED_FILES = $(filter-out $(outdir)/index.html, \
$(shell bash -O nullglob -c "echo $(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}")) \
$(shell bash -O nullglob -c "echo input/$(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}") \
--- /dev/null
+\version "2.15.34"
+
+\header {
+
+ doctitle = "Beam subdivide tuplets"
+
+ texidoc = "
+Tuplets that span more than one beat should be
+subdivided if subdivideBeams is #t. In this example,
+the beams should be subdivided every 1/8.
+"
+
+}
+
+\relative c' {
+ \set tupletSpannerDuration = #(ly:make-moment 1 4)
+ \set baseMoment = #(ly:make-moment 1 8)
+ \set subdivideBeams = ##t
+ \times 4/6 { \repeat unfold 24 { c16 } }
+}
--- /dev/null
+\version "2.15.33"
+
+\header {
+
+ texidoc = "
+ Open strings are part of a chord in tablature, even when @code{minimumFret} is set.
+ This can be changed via @code{restrainOpenStrings}."
+
+}
+
+\score {
+ \new TabStaff {
+ \set TabStaff.minimumFret = #3
+ < g, d >1
+ \set TabStaff.restrainOpenStrings = ##t
+ < g, d >1
+ }
+}
\header {
texidoc = "The whiteout command underlays a white box under a
-markup. The whitening effect only is only guaranteed for staff lines,
-since staff lines are in a lower layer than most other grobs. "
+markup. "
}
\version "2.14.0"
}
\relative c'' {
+ \override TextScript #'layer = #'2
\override TextScript #'extra-offset = #'(2 . 4)
c4-\markup { \whiteout \pad-markup #0.5 foo } c
-}
+}
Moment tuplet_moment (tuplet);
Moment tuplet_dt = infos_[i].start_moment_ - tuplet_start_moment;
tuplet_number = tuplet.den ();
- // set the beat end (if not in a tuplet) and increment the next beat
+ // set the beat end and increment the next beat
if (infos_[i].start_moment_ == next_beat_pos)
{
- if (tuplet_number == 1)
- {
- infos_[i].rhythmic_importance_ = -1;
- next_beat_pos += options.base_moment_;
- }
- if (infos_[i].tuplet_start_)
- infos_[i].rhythmic_importance_ = -1;
+ infos_[i].rhythmic_importance_ = -1;
+ next_beat_pos += options.base_moment_;
}
// The rhythmic importance of a stem between beats depends on its fraction
// of a beat: those stems with a lower denominator are deemed more
else if (ly_symbol2scm ("pop") == tag
|| ly_symbol2scm ("push") == tag
|| ly_symbol2scm ("assign") == tag
- || ly_symbol2scm ("unset") == tag)
+ || ly_symbol2scm ("unset") == tag
+ || ly_symbol2scm ("apply") == tag)
property_ops_ = scm_cons (mod, property_ops_);
else if (ly_symbol2scm ("alias") == tag)
context_aliases_ = scm_cons (sym, context_aliases_);
void
Context_def::apply_default_property_operations (Context *tg)
{
- apply_property_operations (tg, property_ops_);
+ apply_property_operations (tg, scm_reverse (property_ops_));
}
SCM
return SCM_UNDEFINED;
}
+bool
+Context_def::is_alias (SCM sym) const
+{
+ if (scm_is_eq (sym, ly_symbol2scm ("Bottom")))
+ return !scm_is_pair (get_accepted (SCM_EOL));
+
+ if (scm_is_eq (sym, get_context_name ()))
+ return true;
+
+ return scm_is_true (scm_c_memq (sym, context_aliases_));
+}
+
LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup",
2, 1, 0, (SCM def, SCM sym, SCM val),
"Return the value of @var{sym} in output definition @var{def}"
Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
scm_puts ("#<Context_mod ", port);
- scm_display (me->mods_, port);
+ scm_display (me->get_mods (), port);
scm_puts (">", port);
return 1;
}
Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
- scm_gc_mark (me->mods_);
return me->mods_;
}
void
apply_property_operations (Context *tg, SCM pre_init_ops)
{
- SCM correct_order = scm_reverse (pre_init_ops);
- for (SCM s = correct_order; scm_is_pair (s); s = scm_cdr (s))
+ for (SCM s = pre_init_ops; scm_is_pair (s); s = scm_cdr (s))
{
SCM entry = scm_car (s);
SCM type = scm_car (entry);
entry = scm_cdr (entry);
+ if (!scm_is_pair (entry))
+ continue;
+ SCM context_prop = scm_car (entry);
+ if (scm_is_pair (context_prop)) {
+ if (tg->is_alias (scm_car (context_prop)))
+ context_prop = scm_cdr (context_prop);
+ else
+ continue;
+ }
if (type == ly_symbol2scm ("push"))
{
- SCM context_prop = scm_car (entry);
SCM val = scm_cadr (entry);
SCM grob_prop_path = scm_cddr (entry);
sloppy_general_pushpop_property (tg, context_prop, grob_prop_path, val);
}
else if (type == ly_symbol2scm ("pop"))
{
- SCM context_prop = scm_car (entry);
SCM val = SCM_UNDEFINED;
SCM grob_prop_path = scm_cdr (entry);
sloppy_general_pushpop_property (tg, context_prop, grob_prop_path, val);
}
else if (type == ly_symbol2scm ("assign"))
- tg->set_property (scm_car (entry), scm_cadr (entry));
+ tg->set_property (context_prop, scm_cadr (entry));
+ else if (type == ly_symbol2scm ("apply"))
+ scm_apply_1 (context_prop, tg->self_scm (), scm_cdr (entry));
}
}
// The 'accepts elements in definition_mods_ is a list of ('accepts string),
// but the Context_def expects to see elements of the form ('accepts symbol).
SCM accepts = SCM_EOL;
- for (SCM s = scm_reverse (definition_mods_); scm_is_pair (s); s = scm_cdr (s))
+ for (SCM s = definition_mods_; scm_is_pair (s); s = scm_cdr (s))
if (scm_caar (s) == ly_symbol2scm ("accepts"))
{
SCM elt = scm_list_2 (scm_caar (s), scm_string_to_symbol (scm_cadar (s)));
return unsmob_context_def (definition_)->path_to_acceptable_context (name,
get_output_def (),
- accepts);
+ scm_reverse_x (accepts, SCM_EOL));
}
SCM get_translator_group_type () const { return translator_group_type_; }
void set_acceptor (SCM accepts, bool add);
SCM lookup (SCM sym) const;
+ bool is_alias (SCM sym) const;
VIRTUAL_COPY_CONSTRUCTOR (Context_def, Context_def);
#include "simple-spacer.hh"
#include "skyline.hh"
+#include "stencil.hh"
class Page_layout_problem
{
static vsize get_footnote_count (SCM lines);
static SCM get_footnotes_from_lines (SCM lines);
static void add_footnotes_to_lines (SCM lines, int counter, Paper_book *pb);
- static Stencil *get_footnote_separator_stencil (Output_def *paper);
+ static Stencil get_footnote_separator_stencil (Output_def *paper);
static SCM get_spacing_spec (Grob *before, Grob *after, bool pure, int start, int end);
static Real get_fixed_spacing (Grob *before, Grob *after, int spaceable_index, bool pure, int start, int end);
- static void add_footnotes_to_footer (SCM footnotes, Stencil *foot, Paper_book *pb);
+ static Stencil add_footnotes_to_footer (SCM footnotes, Stencil foot, Paper_book *pb);
protected:
void append_system (System *, Spring const &, Real indent, Real padding);
return s;
}
- Real staff_space = Staff_symbol_referencer::staff_space (me);
-
Font_metric *musfont = Font_interface::get_default_font (me);
int mdl = calc_measure_duration_log (me, true);
if (measure_count == 1)
{
- Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true));
if (mdl == 0 && me->get_property ("staff-position") == SCM_EOL)
- s.translate_axis (staff_space, Y_AXIS);
+ {
+ if (Staff_symbol_referencer::on_staff_line (me, 2))
+ me->set_property ("staff-position", scm_from_int (2));
+ else if (Staff_symbol_referencer::on_staff_line (me, 3))
+ me->set_property ("staff-position", scm_from_int (3));
+ }
+
+ Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true));
s.translate_axis ((space - s.extent (X_AXIS).length ()) / 2, X_AXIS);
return s;
1, 0, 0, (SCM output_def),
"Return the description of translators in @var{output-def}.")
{
+ LY_ASSERT_SMOB (Output_def, output_def, 1);
+
Output_def *id = unsmob_output_def (output_def);
SCM al = ly_module_2_alist (id->scope_);
return ell;
}
+LY_DEFINE (ly_output_find_context_def, "ly:output-find-context-def",
+ 1, 1, 0, (SCM output_def, SCM context_name),
+ "Return an alist of all context defs (matching @var{context-name}"
+ "if given) in @var{output-def}.")
+{
+ LY_ASSERT_SMOB (Output_def, output_def, 1);
+ if (!SCM_UNBNDP (context_name))
+ LY_ASSERT_TYPE (ly_is_symbol, context_name, 2);
+
+ Output_def *id = unsmob_output_def (output_def);
+
+ SCM al = ly_module_2_alist (id->scope_);
+ SCM ell = SCM_EOL;
+ for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
+ {
+ SCM p = scm_car (s);
+ Context_def *td = unsmob_context_def (scm_cdr (p));
+ if (td && scm_is_eq (scm_car (p), td->get_context_name ())
+ && (SCM_UNBNDP (context_name) || td->is_alias (context_name)))
+ ell = scm_cons (p, ell);
+ }
+ return ell;
+}
+
+
LY_DEFINE (ly_output_def_p, "ly:output-def?",
1, 0, 0, (SCM def),
"Is @var{def} an output definition?")
min_systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("min-systems-per-page"), 0));
orphan_penalty_ = robust_scm2int (pb->paper_->c_variable ("orphan-penalty"), 100000);
- Stencil *footnote_separator = Page_layout_problem::get_footnote_separator_stencil (pb->paper_);
+ Stencil footnote_separator = Page_layout_problem::get_footnote_separator_stencil (pb->paper_);
- if (footnote_separator)
+ if (!footnote_separator.is_empty ())
{
- Interval separator_extent = footnote_separator->extent (Y_AXIS);
+ Interval separator_extent = footnote_separator.extent (Y_AXIS);
Real separator_span = separator_extent.length ();
footnote_separator_stencil_height_ = separator_span;
p->set_property ("lines", paper_systems);
p->set_property ("configuration", configuration);
- Stencil *foot = unsmob_stencil (p->get_property ("foot-stencil"));
+ Stencil *foot_p = unsmob_stencil (p->get_property ("foot-stencil"));
+ Stencil foot = foot_p ? *foot_p : Stencil ();
SCM footnotes = Page_layout_problem::get_footnotes_from_lines (systems);
- Page_layout_problem::add_footnotes_to_footer (footnotes, foot, book_);
+ foot = Page_layout_problem::add_footnotes_to_footer (footnotes, foot, book_);
- if (foot)
- p->set_property ("foot-stencil", foot->smobbed_copy ());
+ p->set_property ("foot-stencil", foot.smobbed_copy ());
scm_apply_1 (page_stencil, page, SCM_EOL);
return page;
by passing its results downstream.
*/
vector<SCM> footnote_number_markups; // Holds the numbering markups.
- vector<Stencil *> footnote_number_stencils; // Holds translated versions of the stencilized numbering markups.
+ vector<Stencil> footnote_number_stencils; // Holds translated versions of the stencilized numbering markups.
for (vsize i = 0; i < fn_count; i++)
{
if (fn_grobs[i])
if (!s)
{
programming_error ("Your numbering function needs to return a stencil.");
- markup = SCM_EOL;
- s = new Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL);
+ footnote_number_markups.push_back (SCM_EOL);
+ footnote_number_stencils.push_back (Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL));
}
- footnote_number_markups.push_back (markup);
- footnote_number_stencils.push_back (s);
+ else
+ {
+ footnote_number_markups.push_back (markup);
+ footnote_number_stencils.push_back (*s);
+ }
counter++;
}
// find the maximum X_AXIS length
Real max_length = -infinity_f;
for (vsize i = 0; i < fn_count; i++)
- max_length = max (max_length, footnote_number_stencils[i]->extent (X_AXIS).length ());
+ max_length = max (max_length, footnote_number_stencils[i].extent (X_AXIS).length ());
/*
translate each stencil such that it attains the correct maximum length and bundle the
footnotes into a scheme object.
*/
- SCM *tail = &numbers;
- SCM *in_text_tail = &in_text_numbers;
for (vsize i = 0; i < fn_count; i++)
{
- *in_text_tail = scm_cons (footnote_number_markups[i], SCM_EOL);
- in_text_tail = SCM_CDRLOC (*in_text_tail);
- footnote_number_stencils[i]->translate_axis ((max_length
- - footnote_number_stencils[i]->extent (X_AXIS).length ()),
+ in_text_numbers = scm_cons (footnote_number_markups[i], in_text_numbers);
+ footnote_number_stencils[i].translate_axis ((max_length
+ - footnote_number_stencils[i].extent (X_AXIS).length ()),
X_AXIS);
- *tail = scm_cons (footnote_number_stencils[i]->smobbed_copy (), SCM_EOL);
- tail = SCM_CDRLOC (*tail);
+ numbers = scm_cons (footnote_number_stencils[i].smobbed_copy (), numbers);
}
+
+ in_text_numbers = scm_reverse_x (in_text_numbers, SCM_EOL);
+ numbers = scm_reverse_x (numbers, SCM_EOL);
+
// build the footnotes
for (SCM s = lines; scm_is_pair (s); s = scm_cdr (s))
SCM footnote_stl = Text_interface::interpret_markup (paper->self_scm (),
props, footnote_markup);
- Stencil *footnote_stencil = unsmob_stencil (footnote_stl);
+ Stencil footnote_stencil = *unsmob_stencil (footnote_stl);
bool do_numbering = to_boolean (footnote->get_property ("automatically-numbered"));
if (Spanner *orig = dynamic_cast<Spanner *>(footnote))
{
orig->broken_intos_[i]->set_property ("text", annotation_scm);
}
- Stencil *annotation = unsmob_stencil (scm_car (numbers));
- annotation->translate_axis ((footnote_stencil->extent (Y_AXIS)[UP]
- + number_raise
- - annotation->extent (Y_AXIS)[UP]),
+ Stencil annotation = *unsmob_stencil (scm_car (numbers));
+ annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
+ + number_raise
+ - annotation.extent (Y_AXIS)[UP]),
Y_AXIS);
- footnote_stencil->add_at_edge (X_AXIS, LEFT, *annotation, 0.0);
+ footnote_stencil.add_at_edge (X_AXIS, LEFT, annotation, 0.0);
numbers = scm_cdr (numbers);
in_text_numbers = scm_cdr (in_text_numbers);
}
- if (!footnote_stencil->is_empty ())
+ if (!footnote_stencil.is_empty ())
{
if (to_boolean (footnote->get_property ("footnote")))
- mol.add_at_edge (Y_AXIS, DOWN, *footnote_stencil, padding);
+ mol.add_at_edge (Y_AXIS, DOWN, footnote_stencil, padding);
else
- in_note_mol.add_at_edge (Y_AXIS, DOWN, *footnote_stencil, padding);
+ in_note_mol.add_at_edge (Y_AXIS, DOWN, footnote_stencil, padding);
}
}
sys->set_property ("in-note-stencil", in_note_mol.smobbed_copy ());
for (SCM st = stencils; scm_is_pair (st); st = scm_cdr (st))
{
- Stencil footnote_stencil;
- Stencil *footnote = unsmob_stencil (scm_caddar (st));
- footnote_stencil.add_stencil (*footnote);
+ Stencil footnote_stencil = *unsmob_stencil (scm_caddar (st));
bool do_numbering = to_boolean (scm_cadar (st));
SCM in_text_stencil = Stencil ().smobbed_copy ();
if (do_numbering)
{
- Stencil *annotation = unsmob_stencil (scm_car (numbers));
+ Stencil annotation = *unsmob_stencil (scm_car (numbers));
SCM in_text_annotation = scm_car (in_text_numbers);
in_text_stencil = Text_interface::interpret_markup (layout,
props,
in_text_annotation);
if (!unsmob_stencil (in_text_stencil))
in_text_stencil = SCM_EOL;
- annotation->translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
- + number_raise
- - annotation->extent (Y_AXIS)[UP]),
- Y_AXIS);
- footnote_stencil.add_at_edge (X_AXIS, LEFT, *annotation, 0.0);
+ annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
+ + number_raise
+ - annotation.extent (Y_AXIS)[UP]),
+ Y_AXIS);
+ footnote_stencil.add_at_edge (X_AXIS, LEFT, annotation, 0.0);
numbers = scm_cdr (numbers);
in_text_numbers = scm_cdr (in_text_numbers);
}
pb->top_paper ()->set_variable (ly_symbol2scm ("number-footnote-table"), number_footnote_table);
}
-Stencil *
+Stencil
Page_layout_problem::get_footnote_separator_stencil (Output_def *paper)
{
SCM props = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
SCM markup = paper->c_variable ("footnote-separator-markup");
if (!Text_interface::is_markup (markup))
- return NULL;
+ return Stencil ();
SCM footnote_stencil = Text_interface::interpret_markup (paper->self_scm (),
props, markup);
Stencil *footnote_separator = unsmob_stencil (footnote_stencil);
- return footnote_separator;
+ return footnote_separator ? *footnote_separator : Stencil ();
}
-void
-Page_layout_problem::add_footnotes_to_footer (SCM footnotes, Stencil *foot, Paper_book *pb)
+Stencil
+Page_layout_problem::add_footnotes_to_footer (SCM footnotes, Stencil foot, Paper_book *pb)
{
- if (!foot && scm_is_pair (footnotes))
- {
- warning ("Must have a footer to add footnotes.");
- return;
- }
+
bool footnotes_found = false;
Real footnote_padding = robust_scm2double (pb->paper_->c_variable ("footnote-padding"), 0.0);
Real footnote_footer_padding = robust_scm2double (pb->paper_->c_variable ("footnote-footer-padding"), 0.0);
if (!stencil->is_empty ())
{
- foot->add_at_edge (Y_AXIS, UP, *stencil, (!footnotes_found ? footnote_footer_padding : footnote_padding));
+ foot.add_at_edge (Y_AXIS, UP, *stencil, (!footnotes_found ? footnote_footer_padding : footnote_padding));
footnotes_found = true;
}
}
if (footnotes_found)
{
- Stencil *separator = get_footnote_separator_stencil (pb->paper_);
- if (separator)
- foot->add_at_edge (Y_AXIS, UP, *separator, footnote_padding);
+ Stencil separator = get_footnote_separator_stencil (pb->paper_);
+ if (!separator.is_empty ())
+ foot.add_at_edge (Y_AXIS, UP, separator, footnote_padding);
}
+
+ return foot;
}
Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM systems)
Stencil *head = unsmob_stencil (page->get_property ("head-stencil"));
Stencil *foot = unsmob_stencil (page->get_property ("foot-stencil"));
+ Stencil foot_stencil = foot ? *foot : Stencil ();
+
if (pb && pb->paper_)
{
SCM footnotes = get_footnotes_from_lines (systems);
- add_footnotes_to_footer (footnotes, foot, pb);
+ foot_stencil = add_footnotes_to_footer (footnotes, foot_stencil, pb);
}
else
warning ("A page layout problem has been initiated that cannot accommodate footnotes.");
header_height_ = head ? head->extent (Y_AXIS).length () : 0;
- footer_height_ = foot ? foot->extent (Y_AXIS).length () : 0;
+ footer_height_ = foot_stencil.extent (Y_AXIS).length ();
page_height_ = robust_scm2double (page->get_property ("paper-height"), 100);
}
%type <scm> context_def_spec_block
%type <scm> context_def_spec_body
%type <scm> context_mod
+%type <scm> context_mod_arg
+%type <scm> context_mod_embedded
%type <scm> context_mod_list
%type <scm> context_prop_spec
%type <scm> direction_less_char
}
;
+context_mod_arg:
+ embedded_scm
+ | composite_music
+ ;
+
+context_mod_embedded:
+ context_mod_arg
+ {
+ if (unsmob_music ($1)) {
+ SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
+ $1 = scm_call_2 (proc, parser->self_scm (), $1);
+ }
+ if (unsmob_context_mod ($1))
+ $$ = $1;
+ else {
+ parser->parser_error (@1, _ ("not a context mod"));
+ }
+ }
+ ;
+
+
context_def_spec_body:
/**/ {
$$ = Context_def::make_scm ();
$$ = $1;
unsmob_context_def ($$)->origin ()->set_spot (@$);
}
- | context_def_spec_body embedded_scm {
- if (Context_mod *cm = unsmob_context_mod ($2)) {
- SCM p = cm->get_mods ();
- Context_def*td = unsmob_context_def ($$);
-
- for (; scm_is_pair (p); p = scm_cdr (p)) {
- td->add_context_mod (scm_car (p));
- }
- } else {
- parser->parser_error (@2, _ ("not a context mod"));
- }
- }
| context_def_spec_body context_mod {
unsmob_context_def ($$)->add_context_mod ($2);
}
td->add_context_mod (scm_car (m));
}
}
+ | context_def_spec_body context_mod_embedded {
+ Context_def *td = unsmob_context_def ($$);
+ SCM new_mods = unsmob_context_mod ($2)->get_mods ();
+ for (SCM m = new_mods; scm_is_pair (m); m = scm_cdr (m)) {
+ td->add_context_mod (scm_car (m));
+ }
+ }
;
if (md)
unsmob_context_mod ($1)->add_context_mods (md->get_mods ());
}
- | context_mod_list embedded_scm {
- Context_mod *md = unsmob_context_mod ($2);
- if (md)
- unsmob_context_mod ($1)->add_context_mods (md->get_mods ());
- else
- parser->parser_error (@2, _ ("not a context mod"));
+ | context_mod_list context_mod_embedded {
+ unsmob_context_mod ($1)->add_context_mods
+ (unsmob_context_mod ($2)->get_mods ());
}
;
void
Timing_translator::initialize ()
{
- context ()->add_alias (ly_symbol2scm ("Timing"));
- context ()->set_property ("currentBarNumber", scm_from_int (1));
- context ()->set_property ("internalBarNumber", scm_from_int (1));
+ Context *timing = unsmob_context (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
+ context ()->self_scm (),
+ ly_symbol2scm ("Timing")));
+ if (timing != context ())
+ {
+ context ()->add_alias (ly_symbol2scm ("Timing"));
+
+ if (!timing) {
+ programming_error ("Can't find Timing context template");
+ timing = context ();
+ }
+ }
+
+ SCM barnumber = timing->get_property ("currentBarNumber");
+ if (!scm_is_integer (barnumber))
+ barnumber = scm_from_int (1);
+ context ()->set_property ("currentBarNumber", barnumber);
+ context ()->set_property ("internalBarNumber", barnumber);
context ()->set_property ("timeSignatureFraction",
- scm_cons (scm_from_int (4), scm_from_int (4)));
+ timing->get_property ("timeSignatureFraction"));
/*
Do not init measurePosition; this should be done from global
context.
*/
context ()->set_property ("measureLength",
- Moment (Rational (1)).smobbed_copy ());
+ timing->get_property ("measureLength"));
context ()->set_property ("baseMoment",
- Moment (Rational (1, 4)).smobbed_copy ());
+ timing->get_property ("baseMoment"));
}
Rational
"",
/* read */
- "internalBarNumber "
+ "baseMoment "
"currentBarNumber "
+ "internalBarNumber "
"measureLength "
- "measurePosition ",
+ "measurePosition "
+ "timeSignatureFraction ",
/* write */
"baseMoment "
#(define bookpart-text-handler ly:book-add-score!)
#(define bookpart-music-handler collect-book-music-for-book)
#(define output-def-music-handler context-defs-from-music)
+#(define context-mod-music-handler context-mod-from-music)
\include "predefined-fretboards-init.ly"
\include "string-tunings-init.ly"
predefinedDiagramTable = #default-fret-table
handleNegativeFrets = #'recalculate
+ restrainOpenStrings = ##f
}
\context {
\consists "Repeat_acknowledge_engraver"
\consists "Staff_collecting_engraver"
- %% move the alias along with the engraver.
+ \alias "Timing"
+
+ %% An alias for Timing is established by the Timing_translator in
+ %% whatever context it is initialized, and the timing variables are
+ %% then copied from wherever Timing had been previously established.
+ %% The alias at Score level provides a target for initializing
+ %% Timing variables in layout definitions before any
+ %% Timing_translator has been run.
% timing translator must come BEFORE bar number engraver
\consists "Timing_translator"
clefPosition = #0
%% Change string if note results in negative fret number
handleNegativeFrets = #'recalculate
+ %% Allow open strings even if minimumFret is set
+ restrainOpenStrings = ##f
}
\context {
(list 'unset
(ly:music-property m 'symbol)))
((OverrideProperty)
- (list 'push
- (ly:music-property m 'symbol)
- (ly:music-property m 'grob-value)
- (ly:music-property m 'grob-property-path)))
+ (cons* 'push
+ (ly:music-property m 'symbol)
+ (ly:music-property m 'grob-value)
+ (ly:music-property m 'grob-property-path)))
((RevertProperty)
- (list 'pop
- (ly:music-property m 'symbol)
- (ly:music-property m 'grob-property-path)))))
+ (cons* 'pop
+ (ly:music-property m 'symbol)
+ (ly:music-property m 'grob-property-path)))))
(case (ly:music-property m 'name)
- ((SequentialMusic SimultaneousMusic)
- (for-each musicop (ly:music-property m 'elements)))
+ ((ApplyContext)
+ (ly:add-context-mod mods
+ (list 'apply
+ (ly:music-property m 'procedure))))
((ContextSpeccedMusic)
(if (or (not ctx)
(eq? ctx (ly:music-property m 'context-type)))
- (musicop (ly:music-property m 'element)))))))
+ (musicop (ly:music-property m 'element))))
+ (else
+ (let ((callback (ly:music-property m 'elements-callback)))
+ (if (procedure? callback)
+ (for-each musicop (callback m))))))))
(musicop music)
mods))
\consists "Time_signature_performer"
\consists "Control_track_performer"
\consists "Tempo_performer"
+
+ \alias "Timing"
+
+ %% An alias for Timing is established by the Timing_translator in
+ %% whatever context it is initialized, and the timing variables are
+ %% then copied from wherever Timing had been previously established.
+ %% The alias at Score level provides a target for initializing
+ %% Timing variables in layout definitions before any
+ %% Timing_translator has been run.
+
+ timeSignatureFraction = #'(4 . 4)
+
+%% These defaults should be the same as the rules established in
+%% scm/time-signature-settings.scm for 4/4 time
+ measureLength = #(ly:make-moment 4 4)
+ baseMoment = #(ly:make-moment 1 4)
+
\consists "Timing_translator"
\defaultchild "Staff"
.SUFFIXES: .abc
$(outdir)/%.ly: %.abc
- $(PYTHON) $(ABC2LY) -o $@ $<
+ $(PYTHON) $(ABC2LY) --quiet -o $@ $<
# Add the tex => pdf rule only if we have pdflatex
ifeq (,$(findstring pdflatex,$(MISSING_OPTIONAL)))
$(outdir)/%.pdf: $(outdir)/%.tex
- cd $(outdir) && $(PDFLATEX) $(notdir $<)
+ cd $(outdir) && $(buildscript-dir)/run-and-check "$(PDFLATEX) -halt-on-error $(notdir $<)" "$*.pdflatex.log"
endif
############## Texinfo ######################
# Split it up into 10 300-element chunks, and one chunk containing the rest
# if we have more than 3000 elements.
$(outdir)/collated-files.list: $(COLLATED_FILES)
- echo "(Re-)Generating $@"
@echo $(wordlist 1, 299,$^)>$@
@echo $(wordlist 300, 599,$^)>>$@
@echo $(wordlist 600, 899,$^)>>$@
.SUFFIXES: .midi
$(outdir)/%.ly: %.midi
- $(PYTHON) $(MIDI2LY) -o $(outdir) $<
+ $(PYTHON) $(MIDI2LY) --quiet -o $(outdir) $<
$(outdir)/%.midi: %.ly $(LILYPOND_BINARY)
touch $(foreach f, $(HEADER_FIELDS), $(outdir)/$*.$f)
$(outdir)/%-midi.ly: $(outdir)/%.midi $(MIDI2LY)
(echo '\header {'; for f in $(HEADER_FIELDS); do echo -n $$f'="'; cat $(outdir)/$*.$$f; echo '"'; done; echo '}') > $(outdir)/$*.header
- $(PYTHON) $(MIDI2LY) $(shell cat $(outdir)/$*.options) --include-header=$(outdir)/$*.header -o $(outdir) $<
+ $(PYTHON) $(MIDI2LY) $(shell cat $(outdir)/$*.options) --quiet --include-header=$(outdir)/$*.header -o $(outdir) $<
$(outdir)/%.diff: %.ly $(outdir)/%-midi.ly
$(DIFF) -puN $(MIDI2LY_IGNORE_RES) $^ > $@ || cat $@
include $(config_make)
endif
+include $(top-src-dir)/VERSION
+
################################################################
#The 4 lines below present an option to force make website to run
# quietly only when it is run as make -s website. However, we've
WEB_LANGS := $(shell MAKEWEB=1 $(PYTHON) $(top-src-dir)/python/langdefs.py)
-TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD \
+TEXI2HTML=ONLY_WEB_VERSION=v$(MAJOR_VERSION).$(MINOR_VERSION) TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD \
$(TEXI2HTML_PROGRAM) -D web_version --prefix=index --split=section \
--init-file=$(texi2html-init-file) \
--I=$(dir $<) \
(restCompletionBusy ,boolean? "Signal whether a completion-rest is active.")
(restNumberThreshold ,number? "If a multimeasure rest has more
measures than this, a number is printed.")
+ (restrainOpenStrings ,boolean? "Exclude open strings from the
+automatic fret calculator.")
(searchForVoice ,boolean? "Signal whether a search should be made
of all contexts in the context hierarchy for a voice to provide rhythms
parser
music))
+(define-public (context-mod-from-music parser music)
+ (let ((warn #t) (mods (ly:make-context-mod)))
+ (let loop ((m music) (context #f))
+ (if (music-is-of-type? m 'layout-instruction-event)
+ (let ((symbol (cons context (ly:music-property m 'symbol))))
+ (ly:add-context-mod
+ mods
+ (case (ly:music-property m 'name)
+ ((PropertySet)
+ (list 'assign
+ symbol
+ (ly:music-property m 'value)))
+ ((PropertyUnset)
+ (list 'unset symbol))
+ ((OverrideProperty)
+ (cons* 'push
+ symbol
+ (ly:music-property m 'grob-value)
+ (ly:music-property m 'grob-property-path)))
+ ((RevertProperty)
+ (cons* 'pop
+ symbol
+ (ly:music-property m 'grob-property-path))))))
+ (case (ly:music-property m 'name)
+ ((ApplyContext)
+ (ly:add-context-mod mods
+ (list 'apply
+ (ly:music-property m 'procedure))))
+ ((ContextSpeccedMusic)
+ (loop (ly:music-property m 'element)
+ (ly:music-property m 'context-type)))
+ (else
+ (let ((callback (ly:music-property m 'elements-callback)))
+ (if (procedure? callback)
+ (fold loop context (callback m))
+ (if (and warn (ly:duration? (ly:music-property m 'duration)))
+ (begin
+ (ly:music-warning
+ music
+ (_ "Music unsuitable for context-mod"))
+ (set! warn #f))))))))
+ context)
+ mods))
+
(define-public (context-defs-from-music parser output-def music)
- (let ((bottom 'Voice) (warn #t))
- (define (get-bottom sym)
- (or
- (let ((def (ly:output-def-lookup output-def sym #f)))
- (and def
- (let ((def-child (ly:context-def-lookup def 'default-child #f)))
- (and def-child
- (get-bottom def-child)))))
- sym))
+ (let ((warn #t))
(let loop ((m music) (mods #f))
;; The parser turns all sets, overrides etc into something
;; wrapped in ContextSpeccedMusic. If we ever get a set,
(list 'unset
(ly:music-property m 'symbol)))
((OverrideProperty)
- (list 'push
- (ly:music-property m 'symbol)
- (ly:music-property m 'grob-value)
- (ly:music-property m 'grob-property-path)))
+ (cons* 'push
+ (ly:music-property m 'symbol)
+ (ly:music-property m 'grob-value)
+ (ly:music-property m 'grob-property-path)))
((RevertProperty)
- (list 'pop
- (ly:music-property m 'symbol)
- (ly:music-property m 'grob-property-path)))))
+ (cons* 'pop
+ (ly:music-property m 'symbol)
+ (ly:music-property m 'grob-property-path)))))
(case (ly:music-property m 'name)
- ((SequentialMusic SimultaneousMusic)
- (fold loop mods (ly:music-property m 'elements)))
+ ((ApplyContext)
+ (ly:add-context-mod mods
+ (list 'apply
+ (ly:music-property m 'procedure))))
((ContextSpeccedMusic)
- (let ((sym (ly:music-property m 'context-type)))
- (if (eq? sym 'Bottom)
- (set! sym bottom)
- (set! bottom (get-bottom sym)))
- (let ((def (ly:output-def-lookup output-def sym)))
- (if (ly:context-def? def)
- (ly:output-def-set-variable!
- output-def sym
- (ly:context-def-modify
- def
- (loop (ly:music-property m 'element)
- (ly:make-context-mod))))
- (ly:music-warning
- music
- (ly:format (_ "Cannot find context-def \\~a") sym))))))
- (else (if (and warn (ly:duration? (ly:music-property m 'duration)))
- (begin
- (ly:music-warning
- music
- (_ "Music unsuitable for output-def"))
- (set! warn #f))))))
+ ;; Use let* here to let defs catch up with modifications
+ ;; to the context defs made in the recursion
+ (let* ((mods (loop (ly:music-property m 'element)
+ (ly:make-context-mod)))
+ (defs (ly:output-find-context-def
+ output-def (ly:music-property m 'context-type))))
+ (if (null? defs)
+ (ly:music-warning
+ music
+ (ly:format (_ "Cannot find context-def \\~a")
+ (ly:music-property m 'context-type)))
+ (for-each
+ (lambda (entry)
+ (ly:output-def-set-variable!
+ output-def (car entry)
+ (ly:context-def-modify (cdr entry) mods)))
+ defs))))
+ (else
+ (let ((callback (ly:music-property m 'elements-callback)))
+ (if (procedure? callback)
+ (fold loop mods (callback m))
+ (if (and warn (ly:duration? (ly:music-property m 'duration)))
+ (begin
+ (ly:music-warning
+ music
+ (_ "Music unsuitable for output-def"))
+ (set! warn #f))))))))
mods)))
("c1" . (cons (* 648 mm) (* 917 mm)))
("c0" . (cons (* 917 mm) (* 1297 mm)))
;; Below are North American paper sizes
+ ("junior-legal" . (cons (* 8.0 in) (* 5.0 in)))
("legal" . (cons (* 8.5 in) (* 14.0 in)))
("letter" . (cons (* 8.5 in) (* 11.0 in)))
;; Ledger (17x11) is a 90 degree rotation of Tabloid
+ ("17x11" . (cons (* 17.0 in) (* 11.0 in)))
+ ("ledger" . (cons (* 17.0 in) (* 11.0 in)))
+ ;; Tabloid (11x17)
("11x17" . (cons (* 11.0 in) (* 17.0 in)))
+ ("tabloid" . (cons (* 11.0 in) (* 17.0 in)))
;; government-letter by IEEE Printer Working Group, for children's writing
("government-letter" . (cons (* 8 in) (* 10.5 in)))
("government-legal" . (cons (* 8.5 in) (* 13.0 in)))
along with @var{minimum-fret}, @var{maximum-stretch}, and
@var{tuning}. Returns a list of @code{(string fret finger) lists."
+
+ (define restrain-open-strings (ly:context-property context
+ 'restrainOpenStrings
+ #f))
(define specified-frets '())
(define free-strings (iota (length tuning) 1))
#t
(map (lambda (specced-fret)
(or (eq? 0 specced-fret)
- (eq? 0 fret)
+ (and (not restrain-open-strings)
+ (eq? 0 fret))
(>= maximum-stretch (abs (- fret specced-fret)))))
specified-frets))))
"Can @var{pitch} be played on @var{string}, given already placed
notes?"
(let* ((fret (calc-fret pitch string tuning)))
- (and (or (eq? fret 0) (>= fret minimum-fret))
+ (and (or (and (not restrain-open-strings)
+ (eq? fret 0))
+ (>= fret minimum-fret))
(close-enough fret))))
(define (open-string string pitch)
select_voice('default', '')
global lineno
lineno = 0
- sys.stderr.write ("Line ... ")
- sys.stderr.flush ()
+ if not global_options.quiet:
+ sys.stderr.write ("Line ... ")
+ sys.stderr.flush ()
__main__.state = state_list[current_voice_idx]
for ln in ls:
def identify():
- sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))
+ if not global_options.quiet:
+ sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))
authors = """
Written by Han-Wen Nienhuys <hanwen@xs4all.nl>, Laura Conrad
p.add_option("--version",
action="version",
help=_ ("show version number and exit"))
-
p.add_option("-h", "--help",
action="help",
help=_ ("show this help and exit"))
- p.add_option ('-o', '--output', metavar='FILE',
- help=_ ("write output to FILE"),
- action='store')
- p.add_option ('-s', '--strict', help=_ ("be strict about success"),
- action='store_true')
- p.add_option ('-b', '--beams', help=_ ("preserve ABC's notion of beams"), action="store_true")
+ p.add_option ("-o", "--output", metavar='FILE',
+ action="store",
+ help=_ ("write output to FILE"))
+ p.add_option ("-s", "--strict",
+ action="store_true",
+ help=_ ("be strict about success"))
+ p.add_option ('-b', '--beams',
+ action="store_true",
+ help=_ ("preserve ABC's notion of beams"))
+ p.add_option ('-q', '--quiet',
+ action="store_true",
+ help=_ ("suppress progress messages"))
p.add_option_group ('',
description=(
_ ('Report bugs via %s')
if f == '-':
f = ''
- sys.stderr.write ('Parsing `%s\'...\n' % f)
+ if not global_options.quiet:
+ sys.stderr.write ('Parsing `%s\'...\n' % f)
parse_file (f)
if not global_options.output:
global_options.output = os.path.basename (os.path.splitext (f)[0]) + ".ly"
- sys.stderr.write ('lilypond output to: `%s\'...' % global_options.output)
+ if not global_options.quiet:
+ sys.stderr.write ('lilypond output to: `%s\'...' % global_options.output)
outf = open (global_options.output, 'w')
# don't substitute @VERSION@. We want this to reflect
dump_voices (outf)
dump_score (outf)
dump_lyrics (outf)
- sys.stderr.write ('\n')
+ if not global_options.quiet:
+ sys.stderr.write ('\n')
usage () {
cat <<EOF >&2
-Usage: $0 MANUAL SECTION
+Usage: $0 MANUAL SECTION
e.g. $0 notation rhythms
+
EOF
exit "$1"
}
-if [ "$1" == '-h' ] || [ "$1" == '--help' ]; then
+if [ "$1" = '-h' ] || [ "$1" = '--help' ]; then
usage 0
fi
echo "\$LILYPOND_GIT was not set; auto-detected source tree at $LILYPOND_GIT"
fi
+if [ -n "$BROWSER" ]; then
+ echo "Using browser from \$BROWSER: $BROWSER"
+else
+ echo "\$BROWSER not set; using firefox as default"
+ BROWSER="firefox"
+fi
+
if test ! -e "$LILYPOND_GIT/DEDICATION"; then
echo "Error: $LILYPOND_GIT did not look like a LilyPond source tree; aborting." >&2
exit 1
cp "$LILYPOND_GIT/Documentation/common-macros.itexi" "$OUTPUT_DIR/common-macros.itexi"
cp "$LILYPOND_GIT/Documentation/macros.itexi" "$DOC_DIR/macros.itexi"
cp "$DOC_DIR/version.itexi" "$OUTPUT_DIR/version.itexi"
+cp -r "$LILYPOND_GIT/Documentation/pictures/" "$OUTPUT_DIR/out/pictures"
if test -e "$OUTPUT_DIR/$SECTION.html"; then
rm "$OUTPUT_DIR/$SECTION.html"
"$OUTPUT_DIR/$SECTION.texi"
fi
-cat <<EOF
+echo "Displaying output in $BROWSER; close browser window when done."
-The $SECTION section of the $MANUAL manual should now be viewable at
+$BROWSER $OUTPUT_DIR/out/$SECTION.html
- $OUTPUT_DIR/out/$SECTION.html
+cat <<EOF
-If you want to keep the generated docs around for a while, answer
-'n' to the next question. If you only needed them to quickly check
-something, view them now and then answer 'y' when you're done.
+If you want to avoid recompiling the snippets on the next
+invocation with '$MANUAL $SECTION', answer 'n' to the next question.
EOF
-read -p "rm -rf $OUTPUT_DIR ? (y/n): "
+echo "Delete temp files? [y/n]"
+read REPLY;
if [ "$REPLY" = "y" ]; then
echo "deleting files"
rm -rf "$OUTPUT_DIR"
s = "\n".join (map (name2line, files))
s = template.replace (include_snippets, s, 1)
f = "%s/%s" % (dir, name)
- sys.stderr.write ("%s: writing %s..." % (program_name, f))
h = open (f, "w")
h.write (s)
h.close ()
- sys.stderr.write ('\n')
else:
# not Unix philosophy, but hey, at least we notice when
# we don't distribute any .ly files.
if vl:
s += ' \\voice' + vl + '\n'
else:
- warning (_ ('found more than 5 voices on a staff, expect bad output'))
+ if not global_options.quiet:
+ warning (_ ('found more than 5 voices on a staff, expect bad output'))
s += ' ' + dump_voice (voice, skip)
s += '}\n\n'
v += 1
}
'''
- progress (_ ("%s output to `%s'...") % ('LY', out_file))
+ if not global_options.quiet:
+ progress (_ ("%s output to `%s'...") % ('LY', out_file))
if out_file == '-':
handle = sys.stdout
metavar=_ ('DUR'),
help=_ ('quantise note durations on DUR'))
p.add_option ('-D', '--debug',
- action='store_true',
- help=_ ('debug printing'))
+ action='store_true',
+ help=_ ('debug printing'))
p.add_option ('-e', '--explicit-durations',
action='store_true',
help=_ ('print explicit durations'))
p.add_option('-h', '--help',
- action='help',
- help=_ ('show this help and exit'))
+ action='help',
+ help=_ ('show this help and exit'))
p.add_option('-i', '--include-header',
- help=_ ('prepend FILE to output'),
- action='append',
- default=[],
- metavar=_ ('FILE'))
+ help=_ ('prepend FILE to output'),
+ action='append',
+ default=[],
+ metavar=_ ('FILE'))
p.add_option('-k', '--key', help=_ ('set key: ALT=+sharps|-flats; MINOR=1'),
- metavar=_ ('ALT[:MINOR]'),
- default=None),
+ metavar=_ ('ALT[:MINOR]'),
+ default=None),
p.add_option ('-o', '--output', help=_ ('write output to FILE'),
metavar=_ ('FILE'),
action='store')
p.add_option ('-p', '--preview', help=_ ('preview of first 4 bars'),
action='store_true')
+ p.add_option ('-q', '--quiet',
+ action="store_true",
+ help=_ ("suppress progress messages and warnings about excess voices"))
p.add_option ('-s', '--start-quant',help= _ ('quantise note starts on DUR'),
metavar=_ ('DUR'))
p.add_option ('-S', '--skip',
help=_ ('allow tuplet durations DUR*NUM/DEN'),
default=[])
p.add_option ('-V', '--verbose', help=_ ('be verbose'),
- action='store_true'
- ),
+ action='store_true')
p.version = 'midi2ly (LilyPond) @TOPLEVEL_VERSION@'
p.add_option ('--version',
action='version',
help=_ ('show version number and exit'))
p.add_option ('-w', '--warranty', help=_ ('show warranty and copyright'),
- action='store_true',
- ),
+ action='store_true',)
p.add_option ('-x', '--text-lyrics', help=_ ('treat every text as a lyric'),
action='store_true')