#############
### Variables
+OUT_DIST_FILES = $(outdir)/ly-grammar.txt
+
NAME = documentation
LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
SUBDIRS = logo pictures misc po css topdocs \
@end example
@itemize
+@item
+Level 4 headings and menus must be preceded by level 3 headings and
+menus, and so on for level 3 and level 2. If this is not what is
+wanted, please use:
+
+@example
+@@subsubsubheading Foo
+@end example
+
@item
Please leave two blank lines above a @code{@@node}; this makes it
easier to find sections in texinfo.
@end example
@item
-With the exception of @code{@@} commands, the section name must
-match the node name exactly.
-
-@item
-No commas may be used in the node names.
-
-@item
-If a heading is desired without creating a @code{@@node}, please use:
+No punctuation may be used in the node names. If the heading text
+uses punctuation (in particular, colons and commas) simply leave
+this out of the node name and menu.
@example
-@@subsubsubheading Foo
+@@menu
+* Foo Bar::
+@@end menu
+
+@@node Foo Bar
+@@subsection Foo: Bar
@end example
+@item
+With the exception of @code{@@} commands and punctuation, the
+section name should match the node name exactly.
+
@item
Sectioning commands (@code{@@node} and @code{@@section}) must not appear
inside an @code{@@ignore}. Separate those commands with a space, ie
@end example
@noindent
-construct. These are easily constructed with automatic tools; see
-@ref{Scripts to ease doc work}.
+construct. These can be constructed with scripts:
+see @ref{Stripping whitespace and generating menus}.
@node LilyPond formatting
@node Scripts to ease doc work
@section Scripts to ease doc work
-@subheading Building only one section of the documentation
+@menu
+* Scripts to test the documentation::
+* Scripts to create documentation::
+@end menu
+
+@node Scripts to test the documentation
+@subsection Scripts to test the documentation
+
+@menu
+* Building only one section of the documentation::
+@end menu
+
+@node Building only one section of the documentation
+@unnumberedsubsubsec Building only one section of the documentation
In order to save build time, a script is available to build only
one section of the documentation in English with a default html
@code{cg-section.sh} uses the same environment variables and
corresponding default values as @code{doc-section.sh}.
-@subheading Stripping whitespace and generating menus
+@node Scripts to create documentation
+@subsection Scripts to create documentation
+
+@menu
+* Stripping whitespace and generating menus::
+* Stripping whitespace only::
+* Updating doc with convert-ly::
+@end menu
+
+@node Stripping whitespace and generating menus
+@unnumberedsubsubsec Stripping whitespace and generating menus
@warning{This script assumes that the file conforms to our doc
-policy; a few files still need work in this regard.}
+policy, in particular with regard to @ref{Sectioning commands};
+a few files still need work in this regard.}
To automatically regenerate @code{@@menu} portions and strip
whitespace, use:
scripts/auxiliar/node-menuify.py @var{FILENAME}
@end example
+If you are adding documentation that requires new menus,
+you will need to add a blank @code{@@menu} section:
+
+@example
+@@menu
+@@end menu
+@end example
-@subheading Stripping whitespace only
+@node Stripping whitespace only
+@unnumberedsubsubsec Stripping whitespace only
@c TODO: should this be documented elsewhere? It's useful for
@c more than just docs.
To remove extra whitespace from the ends of lines, run
@example
-scripts/auxiliar/strip-whitespace.py Documentation/FILENAME
+scripts/auxiliar/strip-whitespace.py @var{FILENAME}
@end example
-@subheading Updating doc with @command{convert-ly}
+@node Updating doc with convert-ly
+@unnumberedsubsubsec Updating doc with @command{convert-ly}
Don't. This should be done by programmers when they add new
features. If you notice that it hasn't been done, complain to
There are special formatting rules for METAFONT files.
-Tabs are used for indentation.
+Tabs are used for the indentation of commands.
When a path contains more than two points, put each point on a
-separate line, with the operator at the beginning of the line:
+separate line, with the operator at the beginning of the line.
+The operators are indented to the same depth as the initial point
+on the path using spaces. The indentation mechanism is illustrated
+below, with @samp{------->} indicating a tab character and any other
+indentation created using spaces.
@example
-fill z1
- -- z2
- -- z3
- .. cycle;
+def draw_something (test) =
+------->if test:
+------->------->fill z1
+------->-------> -- z2
+------->-------> -- z3
+------->-------> .. cycle;
+------->fi;
+enddef;
@end example
@subheading Main requirements
-This is the current official guidelines.
+These are the current official guidelines.
@itemize
@item
@end example
@item
-Check for altered regtests, and document as necessary. (update
-numbers in the following command as appropriate)
+Check for altered regtests, and document as necessary:
@example
-git diff -u -r release/2.12.0-1 -r release/2.13.13-1 input/regression/
+git diff -u -r release/2.@var{FIRST-CURRENT-STABLE} \
+ -r release/2.@var{LAST-CURRENT-DEVELOPMENT} input/regression/
@end example
@end itemize
Make directories on lilypond.org:
@example
-~/web/download/sources/v2.14
-~/web/download/sources/v2.15
+~/download/sources/v2.@var{NEW-STABLE}
+~/download/sources/v2.@var{NEW-DEVELOPMENT}
@end example
@item
Shortly after the release, move all current contributors to
-previous contributors in:
+previous contributors in
+@file{Documentation/included/authors.itexi}.
-@example
-Documentation/included/authors.itexi
-@end example
-
-Also, delete old material in:
+@item
+Delete old material in @file{Documentation/changes.tely}, but
+don't forget to check it still compiles! Also update the version
+numbers:
@example
-Documentation/changes.tely
+@@node Top
+@@top New features in 2.@var{NEW-STABLE} since 2.@var{OLD-STABLE}
@end example
-but don't forget to check it still compiles! also update the
-version numbers.
-
@item
Website:
@itemize
@item
make a link from the old unstable to the next stable in
-lilypond.org's /doc/ dir. Keep all previous unstable->stable doc
-symlinks.
+lilypond.org's @file{/doc/} dir. Keep all previous unstable->stable
+doc symlinks.
Also, make the old docs self-contained -- if there's a redirect in
-/doc/v2.12/Documentation/index.html , replace it with the
-index.html.old-2.12 files.
+@file{/doc/v2.@var{OLD-STABLE}/Documentation/index.html} , replace it with the
+@file{index.html.old-2.@var{OLD-STABLE}} files.
The post-2.13 docs will need another way of handling the
self-containment. It won't be hard to whip up a python script
-that changes the link to ../../../../manuals.html to
-../website/manuals.html , but it's still a 30-minute task that
+that changes the link to @file{../../../../manuals.html} to
+@file{../website/manuals.html}, but it's still a 30-minute task that
needs to be done before 2.16.
@item
-doc auto redirects to v2.LATEST-STABLE
+doc auto redirects to @code{v2.@var{NEW-STABLE}}
@item
-add these two lines to http://www.lilypond.org/robots.txt:
+add these two lines to @file{Documentation/web/server/robots.txt}:
@example
-Disallow: /doc/v2.PREVIOUS-STABLE/
-Disallow: /doc/v2.CURRENT-DEVELOPMENT/
+Disallow: /doc/v2.@var{OLD-STABLE}/
+Disallow: /doc/v2.@var{NEW-DEVELOPMENT}/
@end example
@end itemize
@itemize
@item
submit po template for translation: send url of tarball to
-coordinator@@translationproject.org, mentioning lilypond-VERSION.pot
+@email{coordinator@@translationproject.org}, mentioning
+lilypond-VERSION.pot
@item
update links to distros providing lilypond packages? link in:
@file{Documentation/web/download.itexi}
-This has nothing to do with the release, but it's a "periodic
-maintenance" task that might make sense to include with releases.
+This has nothing to do with the release, but it's a @qq{periodic
+maintenance} task that might make sense to include with releases.
@item
Send announcements to...
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-at-the-end-of-a-line.ly}
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-on-every-staff.ly}
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-at-the-end-of-a-line.ly}
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-on-every-staff.ly}
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-at-the-end-of-a-line.ly}
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-on-every-staff.ly}
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-at-the-end-of-a-line.ly}
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-on-every-staff.ly}
@ref{Advanced tweaks with Scheme}.
@lilypond[quote,verbatim,ragged-right]
-mpdolce =
-#(make-dynamic-script
- #{ \markup { \hspace #0
- \translate #'(5 . 0)
- \line { \dynamic "mp"
- \text \italic "dolce" } }
- #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
@example
%%% save this to a file called "definitions.ily"
-mpdolce =
-#(make-dynamic-script
- #@{ \markup @{ \hspace #0
- \translate #'(5 . 0)
- \line @{ \dynamic "mp"
- \text \italic "dolce" @} @}
- #@})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
@end example
@lilypond[quote,ragged-right]
-mpdolce =
-#(make-dynamic-script
- #{ \markup { \hspace #0
- \translate #'(5 . 0)
- \line { \dynamic "mp"
- \text \italic "dolce" } }
- #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
@example
%%% definitions.ily
-mpdolce =
-#(make-dynamic-script
- #@{ \markup @{ \hspace #0
- \translate #'(5 . 0)
- \line @{ \dynamic "mp"
- \text \italic "dolce" @} @}
- #@})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
@end example
@lilypond[quote,ragged-right]
-mpdolce =
-#(make-dynamic-script
- #{ \markup { \hspace #0
- \translate #'(5 . 0)
- \line { \dynamic "mp"
- \text \italic "dolce" } }
- #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
@example
%%% web-publish.ily
-mpdolce =
-#(make-dynamic-script
- #@{ \markup @{ \hspace #0
- \translate #'(5 . 0)
- \line @{ \dynamic "mp"
- \text \italic "dolce" @} @}
- #@})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
@end example
@lilypond[quote,ragged-right]
-mpdolce =
-#(make-dynamic-script
- #{ \markup { \hspace #0
- \translate #'(5 . 0)
- \line { \dynamic "mp"
- \text \italic "dolce" } }
- #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+ (make-dynamic-script
+ (markup #:dynamic "mp"
+ #:normal-text #:italic "dolce" ))
inst =
#(define-music-function
%opus="BWV 610"
footer = "Mutopia-2006/03/27-706"
- tagline = \markup { \override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box \center-column { \small \line { Sheet music from \with-url #"http://www.MutopiaProject.org" \line { \teeny www. \hspace #-1.0 MutopiaProject \hspace #-1.0 \teeny .org \hspace #0.5 } • \hspace #0.5 \italic Free to download, with the \italic freedom to distribute, modify and perform. } \line { \small \line { Typeset using \with-url #"http://www.LilyPond.org" \line { \teeny www. \hspace #-1.0 LilyPond \hspace #-1.0 \teeny .org } by \maintainer \hspace #-1.0 . \hspace #0.5 Reference: \footer } } \line { \teeny \line { This sheet music has been placed in the public domain by the typesetter, for details see: \hspace #-0.5 \with-url #"http://creativecommons.org/licenses/publicdomain" http://creativecommons.org/licenses/publicdomain } } } }
-
+ tagline = \markup {
+ \override #'(baseline-skip . 2.2)
+ \center-column {
+ \abs-fontsize #8 \sans \bold
+ \with-url #"http://www.MutopiaProject.org" {
+ "Mutopia"
+ "Project"
+ }
+ }
+ \override #'(baseline-skip . 0)
+ \column {
+ \with-color #grey
+ \filled-box #'( 0 . 1) #'(-2.5 . 1.4) #0
+ }
+ \override #'(baseline-skip . 2.2)
+ \column {
+ \abs-fontsize #8 \sans
+ \concat{"Typeset using " \with-url #"http://www.lilypond.org" "LilyPond" " ©2006 by " \maintainer "." }
+ \abs-fontsize #8 \sans
+ \concat {"This work is licensed under a " \with-url #"http://creativecommons.org/about/pdm" \copyright " license."}
+ }
+ }
}
\include "deutsch.ly"
}
}
+\midi {
+ \context {
+ \Score
+ autoBeaming = ##f % synchronize lyrics the same way as \layout does
+ }
+}
+
\paper {
oddHeaderMarkup = \markup \fill-line { " " }
evenHeaderMarkup = \markup \fill-line { " " }
select ancient flags. Besides the @code{default} flag style,
only the @code{mensural} style is supported.
-@lilypond[quote,fragment,ragged-right,verbatim]
+@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
\override Flag.style = #'mensural
\override Stem.thickness = #1.0
\override NoteHead.style = #'mensural
\autoBeamOff
-c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
-c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
+c8 d e f c16 d e f c32 d e f s8
+c'8 d e f c16 d e f c32 d e f
@end lilypond
-Note that the innermost flare of each mensural flag always is
+Note that the innermost flare of each mensural flag is
vertically aligned with a staff line.
There is no particular flag style for neo-mensural or Petrucci notation.
-@c Hence,
-@c when typesetting the incipit of a transcribed piece of mensural
-@c music, the default flag style should be used.
There are no flags in Gregorian chant notation.
@seealso
@rglos{flag}.
@knownissues
-The attachment of ancient flags to stems is slightly off.
-@c due to a change in early 2.3.x.
-
Vertically aligning each flag with a staff line assumes that stems
-always end either exactly on or exactly in the middle between two
+always end either exactly on or exactly in the middle of two
staff lines. This may not always be true when using advanced layout
features of classical notation (which however are typically out of
scope for mensural notation).
Contexts are arranged hierarchically:
@menu
+* Output definitions - blueprints for contexts::
* Score - the master of all contexts::
* Top-level contexts - staff containers::
* Intermediate-level contexts - staves::
* Bottom-level contexts - voices::
@end menu
+@node Output definitions - blueprints for contexts
+@unnumberedsubsubsec Output definitions - blueprints for contexts
+
+This section explains the relevance of output definitions when
+working with contexts. Examples for actual output definitions are
+given later (see @ref{Changing all contexts of the same type}).
+
+@cindex output definitions
+@funindex \layout
+While music written in a file may refer to context types and
+names, contexts are created only when the music is actually being
+interpreted. LilyPond interprets music under control of an
+@q{output definition} and may do so for several different output
+definitions, resulting in different output. The output definition
+relevant for printing music is specified using @code{\layout}.
+
+@funindex \midi
+A much simpler output definition used for producing Midi output is
+specified using @code{\midi}. Several other output definitions
+are used by LilyPond internally, like when using the part combiner
+(@ref{Automatic part combining}) or creating music quotes
+(@ref{Quoting other voices}).
+
+Output definitions define the relation between contexts as well as
+their respective default settings. While most changes will
+usually be made inside of a @code{\layout} block, Midi-related
+settings will only have an effect when made within a @code{\midi}
+block.
+
+@funindex autoBeaming
+Some settings affect several outputs: for example, if
+@code{autoBeaming} is turned off in some context, beams count as
+melismata for the purpose of matching music to lyrics as described
+in @ref{Automatic syllable durations}. This matching is done both
+for printed output as well as for Midi. If changes made to
+@code{autoBeaming} within a context definition of a @code{\layout}
+block are not repeated in the corresponding @code{\midi} block,
+lyrics and music will get out of sync in Midi.
+
+@seealso
+Installed Files:
+@file{ly/engraver-init.ly}.
+@file{ly/performer-init.ly}.
+
@node Score - the master of all contexts
@unnumberedsubsubsec Score - the master of all contexts
across staves.
A Score context is instantiated implicitly when a
-@code{\score @{@dots{}@}} or @code{\layout @{@dots{}@}} block is
-processed.
+@code{\score @{@dots{}@}} block is processed.
@node Top-level contexts - staff containers
@unnumberedsubsubsec Top-level contexts - staff containers
@funindex \context
@funindex \layout
-The context settings which are to be used by default in
+The default context settings which are to be used for typesetting in
@code{Score}, @code{Staff}, @code{Voice} and other contexts may be
-specified in a @code{\context} block within any @code{\layout} block.
+specified in a @code{\context} block within any @code{\layout}
+block.
+
+Settings for Midi output as opposed to typesetting will have to be
+separately specified in @code{\midi} blocks (see @ref{Output
+definitions - blueprints for contexts}).
+
The @code{\layout} block should be placed within the @code{\score}
block to which it is to apply, after the music.
@}
@end example
+Since such a @q{context modification} is specified inside of
+music, it will affect @emph{all} outputs (typesetting @emph{and}
+Midi) as opposed to changes within an output definition.
+
The following types of settings may be specified:
@itemize
@item
otherwise the default value taken from the most recent appropriate
-@code{\context} block in the @code{\layout} blocks is used,
+@code{\context} block in the @code{\layout} or @code{\midi} blocks
+is used,
@item
otherwise the LilyPond built-in default is used.
\override Stem.transparent = ##t
@end example
-All these plug-ins have to cooperate, and this is achieved with a
-special plug-in, which must be marked with the keyword @code{\type}.
-This should always be @code{Engraver_group}.
+All these plug-ins have to communicate under the control of the
+context. The mechanisms with which contexts communicate are
+established by declaring the context @code{\type}. Within a
+@code{\layout} block, most contexts will be of type
+@code{Engraver_group}. Some special contexts and contexts in
+@code{\midi} blocks use other context types. Copying and
+modifying an existing context definition will also fill in the
+type. Since this example creates a definition from scratch, it
+needs to be specified explicitly.
@example
\type "Engraver_group"
@}
@end example
+To complete this example, changes affecting the context hierarchy
+should be repeated in a @code{\midi} block so that Midi output
+depends on the same context relations.
+
@seealso
Internals Reference:
@code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
be used. The term @notation{dead note} is commonly used by guitarists.
-There is also a shorthand for diamond shapes which can be used
-only inside chords:
+There is also a similar shorthand for diamond shapes:
@lilypond[verbatim,quote,relative=2]
-<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
+<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
@end lilypond
@predefined
@end lilypond
+@subsubsubheading Using \partcombine with lyrics
+
+@cindex \partcombine and lyrics
+
+The @code{\partcombine} command is not designed to work with
+lyrics; if one of the voices is explicitly named in order to
+attach lyrics to it, the partcombiner will stop working. However,
+this effect can be achieved using a @code{NullVoice} context. See
+@ref{Polyphony with shared lyrics}.
+
+
@snippets
@lilypondfile[verbatim,quote,texidoc,doctitle]
@rinternals{Voice}.
@knownissues
-All @code{\partcombine@dots{}} 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
-stop working.
+All @code{\partcombine@dots{}} functions can only accept two voices.
@code{\partcombine@dots{}} functions cannot be placed inside a @code{\tuplet}
or @code{\relative} block.
c4_"Text"\pp % now they will collide
@end lilypond
-The vertical padding between an outside-staff object and the
-previously-positioned grobs can be controlled with
-@code{outside-staff-padding}.
+The vertical padding around outside-staff objects
+can be controlled with @code{outside-staff-padding}.
@lilypond[quote,ragged-right,relative=2,verbatim,staffsize=18]
\once \override TextScript.outside-staff-padding = #0
-a'^"This text is placed very close to the note"
+a4-"outside-staff-padding = #0"
\once \override TextScript.outside-staff-padding = #3
-c^"This text is padded away from the previous text"
-c^"This text is placed close to the previous text"
+d-"outside-staff-padding = #3"
+c-"default outside-staff-padding"
+b-"default outside-staff-padding"
+R1
@end lilypond
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-at-the-end-of-a-line.ly}
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
{printing-marks-on-every-staff.ly}
* Placing syllables horizontally::
* Lyrics and repeats::
* Divisi lyrics::
+* Polyphony with shared lyrics::
@end menu
@emph{Temporary polyphonic passages} in @ref{Single-staff polyphony}.
+@node Polyphony with shared lyrics
+@unnumberedsubsubsec Polyphony with shared lyrics
+
+@cindex NullVoice
+@cindex polyphony, shared lyrics
+@cindex lyrics, shared among voices
+@cindex \partcombine and lyrics
+@funindex \partcombine
+
+When two voices with different rhythms share the same lyrics,
+aligning the lyrics to one of the voices may lead to problems in
+the other voice. For example, the second lyric extender below is
+too short, since the lyrics are aligned only to the top voice:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+alto = \relative { g'2 b8( a g a) }
+words = \lyricmode { la __ la __ }
+
+\new Staff <<
+ \new Voice = "sopranoVoice" { \voiceOne \soprano }
+ \new Voice { \voiceTwo \alto }
+ \new Lyrics \lyricsto "sopranoVoice" \words
+>>
+@end lilypond
+
+To get the desired result, align the lyrics to a new
+@code{NullVoice} context containing a suitable combination of the
+two voices. The notes of the @code{NullVoice} context do not
+appear on the printed page, but can be used to align the lyrics
+appropriately:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+alto = \relative { g'2 b8( a g a) }
+aligner = \relative { b'8( c d c) b( a g a) }
+words = \lyricmode { la __ la __ }
+
+\new Staff <<
+ \new Voice { \voiceOne \soprano }
+ \new Voice { \voiceTwo \alto }
+ \new NullVoice = "aligner" \aligner
+ \new Lyrics \lyricsto "aligner" \words
+>>
+@end lilypond
+
+The @code{NullVoice} context must be inside a @code{Staff}
+context, and should only contain notes that are already being
+displayed in that staff, and in the same octave. Otherwise the
+@code{NullVoice} may interact with the printed voices in
+unexpected ways. For example, arbitrary notes in the
+@code{NullVoice} may cause accidentals to appear (or disappear) on
+the staff.
+
+This method also can be used with the @code{\partcombine}
+function, which does not allow lyrics on its own:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+alto = \relative { g'2 b8( a g a) }
+aligner = \relative { b'8( c d c) b( a g a) }
+words = \lyricmode { la __ la __ }
+
+\new Staff <<
+ \new Voice \partcombine \soprano \alto
+ \new NullVoice = "aligner" \aligner
+ \new Lyrics \lyricsto "aligner" \words
+>>
+@end lilypond
+
+@noindent
+The @code{\partcombine} function is described in
+@ref{Automatic part combining}.
+
+Lastly, this method can be used even when the voices are in
+different staves, and is not limited to only two voices:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+altoOne = \relative { g'2 b8( a b4) }
+altoTwo = \relative { d'2 g4( fis8 g) }
+aligner = \relative { b'8( c d c) d( d d d) }
+words = \lyricmode { la __ la __ }
+
+\new ChoirStaff <<
+ \new Staff <<
+ \soprano
+ \new NullVoice = "aligner" \aligner
+ >>
+ \new Lyrics \lyricsto "aligner" \words
+ \new Staff \partcombine \altoOne \altoTwo
+>>
+@end lilypond
+
+However, note that in the second half of the measure above, the
+notes in the @code{NullVoice} context reflect the rhythm of the
+lower staff, but they do not deviate from the single pitch being
+displayed in the staff to which the @code{NullVoice} belongs.
+While not actually required in this particular example, it is a
+good idea in general to enter the notes in this way.
+
+
@node Stanzas
@subsection Stanzas
+++ /dev/null
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.17.25"
-
-\header {
- lsrtags = "text"
-
- texidoc = "
-If specified, text marks may be aligned with notation objects other
-than bar lines. These objects include @code{ambitus},
-@code{breathing-sign}, @code{clef}, @code{custos}, @code{staff-bar},
-@code{left-edge}, @code{key-cancellation}, @code{key-signature}, and
-@code{time-signature}.
-
-
-
-In such cases, text marks will be horizontally centered above the
-object. However this can be changed, as demonstrated on the second line
-of this example (in a score with multiple staves, this setting should
-be done for all the staves).
-
-
-
-"
- doctitle = "Aligning marks with various notation objects"
-} % begin verbatim
-
-\relative c' {
- e1
-
- % the RehearsalMark will be centered above the Clef
- \override Score.RehearsalMark.break-align-symbols = #'(clef)
- \key a \major
- \clef treble
- \mark \markup { \char ##x2193 }
- e1
-
- % the RehearsalMark will be centered above the TimeSignature
- \override Score.RehearsalMark.break-align-symbols = #'(time-signature)
- \key a \major
- \clef treble
- \time 3/4
- \mark \markup { \char ##x2193 }
- e2.
-
- % the RehearsalMark will be centered above the KeySignature
- \override Score.RehearsalMark.break-align-symbols = #'(key-signature)
- \key a \major
- \clef treble
- \time 4/4
- \mark \markup { \char ##x2193 }
- e1
-
- \break
- e1
-
- % the RehearsalMark will be aligned with the left edge of the KeySignature
- \once \override Score.KeySignature.break-align-anchor-alignment = #LEFT
- \mark \markup { \char ##x2193 }
- \key a \major
- e1
-
- % the RehearsalMark will be aligned with the right edge of the KeySignature
- \once \override Score.KeySignature.break-align-anchor-alignment = #RIGHT
- \key a \major
- \mark \markup { \char ##x2193 }
- e1
-
- % the RehearsalMark will be aligned with the left edge of the KeySignature
- % and then shifted right by one unit.
- \once \override Score.KeySignature.break-align-anchor = #1
- \key a \major
- \mark \markup { \char ##x2193 }
- e1
-}
adding-the-current-date-to-a-score.ly
adjusting-lyrics-vertical-spacing.ly
aligning-and-centering-instrument-names.ly
-aligning-marks-with-various-notation-objects.ly
aligning-objects-created-with-the--mark-command.ly
aligning-syllables-with-melisma.ly
blanking-staff-lines-using-the--whiteout-command.ly
The LilyPond input syntax is routinely changed to simplify it or improve
it in different ways. As a side effect of this, the LilyPond interpreter
often is no longer compatible with older input files. To remedy this,
-the program @command{convert-ly} can be used to deal with most of the
-syntax changes between LilyPond versions.
+the program @command{convert-ly} can be used for upgrading files
+to newer versions of LilyPond.
@menu
* Why does the syntax change?::
name to @code{print-all-headers}. Fortunately, this change can be
automated with our @command{convert-ly} tool.
-Unfortunately, @code{convert-ly} cannot handle all input changes.
+Unfortunately, @command{convert-ly} cannot handle all input changes.
For example, in LilyPond 2.4 and earlier, accents and non-English
letters were entered using LaTeX -- displaying the French word for
Christmas was entered as @code{No\"el}. But in LilyPond
@c keep "-matching straight in fancy editors
2.6 and above, the special @code{ë} must be entered directly into
-the LilyPond file as an UTF-8 character. @code{convert-ly} cannot
+the LilyPond file as an UTF-8 character. @command{convert-ly} cannot
change all the LaTeX special characters into UTF-8 characters; you
must manually update your old LilyPond input files.
+The conversion rules of @command{convert-ly} work using text pattern
+matching and replacement rather than a thorough understanding of
+LilyPond. This has several consequences:
+@itemize @bullet
+@item
+The reliability of the conversion depends on the quality of each
+applied rule set and on the complexity of the respective change.
+Sometimes conversions may require manual fixes, so the old version
+should be kept available for comparison.
+@item
+Only conversions to newer formats are possible: there are no rule
+sets for downgrading. So the main working copy of a LilyPond file
+should only be upgraded when older versions of LilyPond no longer
+need to be supported. Version control systems such as Git might
+help with maintaining multiple versions.
+@item
+LilyPond and Scheme themselves are quite robust against creatively
+placed and omitted spaces, but the rules used by
+@command{convert-ly} tend to make some stylistic assumptions.
+Following the style used in the manuals is the safest bet for
+painless upgrades, particularly as the manuals themselves are
+upgraded using @command{convert-ly}.
+@end itemize
+
@node Invoking convert-ly
@section Invoking @command{convert-ly}
@table @code
@item -d,--diff-version-update
-update the @code{\version} to the latest or, if this is greater, do
-nothing.
+increase the @code{\version} string only if the file has actually
+been changed. Without this option (or when any conversion has
+changed the file), the version header reflects the last considered
+conversion rule.
@item -e,--edit
Apply the conversions direct to the input file, modifying it
@item -t, --to=@var{to-patchlevel}
Explicitly set which @code{\version} to convert to, otherwise the
-default is the most current value.
+default is the most current value. It must be higher than the
+starting version.
@example
convert-ly --to=2.14.1 myfile.ly
@c used for news about the upcoming release; see CG 10.2
@newsItem
-@subsubheading LilyPond 2.17.25 released! @emph{August 25, 2013}
+@subsubheading LilyPond 2.17.26 released! @emph{September 8, 2013}
-We are happy to announce the release of LilyPond 2.17.25. This
+We are happy to announce the release of LilyPond 2.17.26. This
release contains the usual number of bugfixes and enhancements, and contains
some work in progress. You will have access to the very latest features, but
some may be incomplete, and you may encounter bugs and crashes. If you require
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subsubheading LilyPond 2.17.25 released! @emph{August 25, 2013}
+
+We are happy to announce the release of LilyPond 2.17.25. This
+release contains the usual number of bugfixes and enhancements, and contains
+some work in progress. You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes. If you require
+a stable version of Lilypond, we recommend using the 2.16 version.
+
+@newsEnd
+
@newsItem
@subsubheading LilyPond 2.17.24 released! @emph{August 11, 2013}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=17
-PATCH_LEVEL=26
+PATCH_LEVEL=27
MY_PATCH_LEVEL=
VERSION_STABLE=2.16.2
-VERSION_DEVEL=2.17.25
+VERSION_DEVEL=2.17.26
STEPMAKE_COMPILE
AC_CHECK_PROG(FCLIST, fc-list, fc-list)
-AC_MSG_CHECKING([New Century Schoolbook PFB files])
+AC_MSG_CHECKING([for New Century Schoolbook PFB files])
AC_SUBST(NCSB_SOURCE_FILES)
AC_SUBST(NCSB_DIR)
-UNCHECKED_NCSB_SOURCE_FILES=""
-if test "$NCSB_DIR" != "" ; then
- for f in c059013l c059016l c059033l c059036l; do
- if test ! -f "$NCSB_DIR/$f.pfb"; then
- STEPMAKE_WARN($NCSB_DIR does not contain $f.pfb.)
- else
- UNCHECKED_NCSB_SOURCE_FILES="$NCSB_DIR/$f.pfb $UNCHECKED_NCSB_SOURCE_FILES"
- fi
- done
-else
+if test "$NCSB_DIR" = ""; then
if test "$FCLIST" != ""; then
- for style in Roman Italic "Bold Italic" Bold; do
- NCSB_FILE=`$FCLIST "Century Schoolbook L:style=$style:foundry=urw:fontformat=Type 1" file \
- | head -n 1`
+ NCSB_FILE=`$FCLIST "Century Schoolbook L:foundry=urw:fontformat=Type 1:lang=ru" file \
+ | head -n 1`
+ if test "$NCSB_FILE" != ""; then
NCSB_FILE=`echo $NCSB_FILE | sed 's/\(:.*\)$//g'`
NCSB_FILE=`$PYTHON "$srcdir/scripts/auxiliar/readlink.py" $NCSB_FILE`
- UNCHECKED_NCSB_SOURCE_FILES="$NCSB_FILE $UNCHECKED_NCSB_SOURCE_FILES"
- done
- NCSB_DIR=`AS_DIRNAME($NCSB_FILE)`
- else
- AC_MSG_RESULT(not found)
- echo "Can't find Century Schoolbook files. Install FontConfig's fc-list,"
- echo "or use --with-ncsb-dir"
- STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
+ NCSB_DIR=`AS_DIRNAME($NCSB_FILE)`
+ fi
fi
fi
-NCSB_SOURCE_FILES=""
-for f in $UNCHECKED_NCSB_SOURCE_FILES; do
- if test "`grep Cyrillic "$f"`" = ""; then
- STEPMAKE_WARN($f does not have Cyrillic characters.)
- STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
- else
- NCSB_SOURCE_FILES="$f $NCSB_SOURCE_FILES"
+if test "$NCSB_DIR" != "" ; then
+ for f in c059013l.pfb c059016l.pfb c059033l.pfb c059036l.pfb; do
+ if test ! -f "$NCSB_DIR/$f"; then
+ MISSING_NCSB_SOURCE_FILES="$f $MISSING_NCSB_SOURCE_FILES"
+ else
+ if test "`grep Cyrillic "$NCSB_DIR/$f"`" = ""; then
+ INCOMPLETE_NCSB_SOURCE_FILES="$f $INCOMPLETE_NCSB_SOURCE_FILES"
+ else
+ NCSB_SOURCE_FILES="$NCSB_DIR/$f $NCSB_SOURCE_FILES"
+ fi
+ fi
+ done
+fi
+if test "$NCSB_DIR" = "" -o "$MISSING_NCSB_SOURCE_FILES" != "$INCOMPLETE_NCSB_SOURCE_FILES"; then
+ AC_MSG_RESULT(no)
+ STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
+ if test "$NCSB_DIR" = ""; then
+ if test "$FCLIST" = ""; then
+ STEPMAKE_ADD_ENTRY(REQUIRED,'(install the fc-list utility from FontConfig, or use --with-ncsb-dir)')
+ else
+ STEPMAKE_ADD_ENTRY(REQUIRED,'(make sure the fc-list utility can see them, or use --with-ncsb-dir)')
+ fi
fi
-done
-AC_MSG_RESULT($NCSB_SOURCE_FILES)
+ if test "$MISSING_NCSB_SOURCE_FILES" != ""; then
+ STEPMAKE_ADD_ENTRY(REQUIRED,'(these files are missing: $MISSING_NCSB_SOURCE_FILES)')
+ fi
+ if test "$INCOMPLETE_NCSB_SOURCE_FILES" != ""; then
+ STEPMAKE_ADD_ENTRY(REQUIRED,'(these files do not contain Cyrillic characters: $INCOMPLETE_NCSB_SOURCE_FILES)')
+ fi
+else
+ AC_MSG_RESULT(yes)
+fi
AC_LANG([C++])
#ifdef __CYGWIN__
static string
-dos_to_posix (string file_name)
+dos_to_posix (const string &file_name)
{
char buf[PATH_MAX] = "";
char s[PATH_MAX] = {0};
}
string
-dir_name (string const file_name)
+dir_name (const string &file_name)
{
string s = file_name;
s = slashify (s);
#include <algorithm>
void
-File_path::parse_path (string p)
+File_path::parse_path (const string &p)
{
concat (dirs_, string_split (p, PATHSEP));
}
bool
-is_file (string file_name)
+is_file (const string &file_name)
{
#if !STAT_MACROS_BROKEN
struct stat sbuf;
The file name if found, or empty string if not found. */
string
-File_path::find (string name) const
+File_path::find (const string &name) const
{
if (!name.length () || (name == "-"))
return name;
where EXT is from EXTENSIONS.
*/
string
-File_path::find (string name, char const *extensions[])
+File_path::find (const string &name, char const *extensions[])
{
if (name.empty () || name == "-")
return name;
}
void
-File_path::append (string str)
+File_path::append (const string &str)
{
dirs_.push_back (str);
}
void
-File_path::prepend (string str)
+File_path::prepend (const string &str)
{
dirs_.insert (dirs_.begin (), str);
}
#include "std-vector.hh"
#include "std-string.hh"
-std::string dir_name (std::string file_name);
+std::string dir_name (const std::string &file_name);
std::string get_working_directory ();
class File_name
public:
vector<string> directories () const;
- string find (string name) const;
- string find (string name, char const *extensions[]);
+ string find (const string &name) const;
+ string find (const string &name, char const *extensions[]);
string to_string () const;
bool try_append (string str);
- void append (string str);
- void parse_path (string);
- void prepend (string str);
+ void append (const string&);
+ void parse_path (const string&);
+ void prepend (const string&);
};
-bool is_file (string file_name);
+bool is_file (const string &file_name);
bool is_dir (string file_name);
#endif /* FILE_PATH */
*/
string _f (char const *format, ...)
__attribute__ ((format (printf, 1, 2)));
-string _f (char const *format, string s, string s2 = "", string s3 = "");
+string _f (char const *format, const string &s, const string &s2 = "", const string &s3 = "");
/**
va_list version of _f
*/
typedef size_t ssize;
#define NPOS string::npos
-string to_string (string s);
+string to_string (const string&);
string to_string (char c, int n = 1);
string to_string (int i, char const *format = 0);
string to_string (double f, char const *format = 0);
string &replace_all (string *str, string const &find, string const &replace);
string &replace_all (string *str, char find, char replace);
-char *string_copy (string s);
+char *string_copy (const string &s);
int string_compare (string const &, string const &);
}
vector<string> string_split (string str, char c);
-string string_join (vector<string> const &strs, string infix);
+string string_join (vector<string> const &strs, const string &infix);
#define iterof(i,s) typeof((s).begin()) i((s).begin())
static int hex2nibble (Byte byte);
static Byte nibble2hex_byte (Byte byte);
public:
- static string pad_to (string s, size_t length);
+ static string pad_to (const string &s, size_t length);
static string bool_string (bool b);
- static string bin2dec (string bin_string);
static string bin2hex (Byte bin_char);
- static string bin2hex (string bin_string);
- static string dec2bin (string str);
- static int bin2int (string bin_string);
- static unsigned bin2unsigned (string bin_string);
+ static string bin2hex (const string &bin_string);
+ static int bin2int (const string &bin_string);
+ static unsigned bin2unsigned (const string &bin_string);
static string char_string (char c, int n);
- static int dec2int (string dec_string);
- static double dec2double (string dec_string);
+ static int dec2int (const string &dec_string);
+ static double dec2double (const string &dec_string);
static string double_string (double f, char const *fmt = 0);
static string form_string (char const *format, ...) __attribute__ ((format (printf, 1, 2)));
static string vform_string (char const *format, va_list args);
- static int hex2int (string str);
- static unsigned hex2unsigned (string str);
- static string hex2bin (string str);
+ static string hex2bin (const string &str);
static string int_string (int i, char const *fmt = 0);
static string unsigned_string (unsigned);
static string unsigned_long_string (unsigned long);
static string rational_string (Rational);
static string pointer_string (void const *);
static string precision_string (double x, int n);
- // static vector<string> split (string str, char c);
static string i64_string (I64, char const *fmt = 0);
static string to_lower (string s);
static string to_upper (string s);
extern bool warning_as_error;
/* output messages, in decreasing order of importance */
-void error (string s, string location = ""); // Fatal error, exits lilypond!
-void programming_error (string s, string location = "");
-void non_fatal_error (string, string location = "");
-void warning (string s, string location = "");
-void basic_progress (string s, string location = "");
+void error (string s, const string &location = ""); // Fatal error, exits lilypond!
+void programming_error (const string &s, const string &location = "");
+void non_fatal_error (const string&, const string &location = "");
+void warning (const string &s, const string &location = "");
+void basic_progress (const string &s, const string &location = "");
/* progress_indication does by default *NOT* start on a new line */
-void progress_indication (string s, bool newline = false, string location = "");
-void message (string s, bool newline = true, string location = "");
-void debug_output (string s, bool newline = true, string location = "");
+void progress_indication (const string &s, bool newline = false, const string &location = "");
+void message (const string &s, bool newline = true, const string &location = "");
+void debug_output (const string &s, bool newline = true, const string &location = "");
/* Helper functions that always print out the message. Callers should ensure
that the loglevel is obeyed */
-void print_message (int level, string location, string s, bool newline = true);
+void print_message (int level, const string &location, string s, bool newline = true);
bool is_loglevel (int level);
void set_loglevel (int level);
void set_loglevel (string level);
-void expect_warning (string msg);
+void expect_warning (const string &msg);
void check_expected_warnings ();
#endif /* WARN_HH */
}
string
-_f (char const *format, string s, string s2, string s3)
+_f (char const *format, const string &s, const string &s2, const string &s3)
{
return String_convert::form_string (gettext (format), s.c_str (), s2.c_str (),
s3.c_str ());
#include "string-convert.hh"
string
-to_string (string s)
+to_string (const string &s)
{
return s;
}
}
char *
-string_copy (string s)
+string_copy (const string &s)
{
ssize len = s.length ();
char *dest = new char[len + 1];
}
string
-string_join (vector<string> const &strs, string infix)
+string_join (vector<string> const &strs, const string &infix)
{
string result;
for (vsize i = 0; i < strs.size (); i++)
}
string
-String_convert::bin2hex (string bin_string)
+String_convert::bin2hex (const string &bin_string)
{
string str;
Byte const *byte = (Byte const *)bin_string.data ();
}
int
-String_convert::bin2int (string bin_string)
+String_convert::bin2int (const string &bin_string)
{
return bin2unsigned (bin_string);
}
unsigned
-String_convert::bin2unsigned (string bin_string)
+String_convert::bin2unsigned (const string &bin_string)
{
assert (bin_string.length () <= (int)sizeof (unsigned));
}
int
-String_convert::dec2int (string dec_string)
+String_convert::dec2int (const string &dec_string)
{
if (!dec_string.length ())
return 0;
}
// breendet imp from string
double
-String_convert::dec2double (string dec_string)
+String_convert::dec2double (const string &dec_string)
{
if (!dec_string.length ())
return 0;
}
string
-String_convert::hex2bin (string hex_string)
+String_convert::hex2bin (const string &hex_string)
{
string str;
}
string
-String_convert::pad_to (string s, size_t n)
+String_convert::pad_to (const string &s, size_t n)
{
return s + string (max (int (n - s.length ()), 0), ' ');
}
string
String_convert::to_upper (string s)
{
- return strnupr ((char *)s.c_str (), s.length ());
+ return strnupr (const_cast<char*>(s.c_str ()), s.length ());
}
string
String_convert::to_lower (string s)
{
- return strnlwr ((char *)s.c_str (), s.length ());
+ return strnlwr (const_cast<char*>(s.c_str ()), s.length ());
}
string
* expected warnings again.
*/
vector<string> expected_warnings;
-void expect_warning (string msg)
+void expect_warning (const string &msg)
{
expected_warnings.push_back (msg);
}
expected_warnings.clear ();
}
-bool is_expected (string s)
+bool is_expected (const string &s)
{
bool expected = false;
for (vsize i = 0; i < expected_warnings.size (); i++)
if newline is true, start the message on a new line.
*/
void
-print_message (int level, string location, string s, bool newline)
+print_message (int level, const string &location, string s, bool newline)
{
/* Only print the message if the current loglevel allows it: */
if (!is_loglevel (level))
/* Display a fatal error message. Also exits lilypond. */
void
-error (string s, string location)
+error (string s, const string &location)
{
print_message (LOG_ERROR, location, _f ("fatal error: %s", s) + "\n");
exit (1);
/* Display a severe programming error message, but don't exit. */
void
-programming_error (string s, string location)
+programming_error (const string &s, const string &location)
{
if (is_expected (s))
print_message (LOG_DEBUG, location, _f ("suppressed programming error: %s", s) + "\n");
/* Display a non-fatal error message, don't exit. */
void
-non_fatal_error (string s, string location)
+non_fatal_error (const string &s, const string &location)
{
if (is_expected (s))
print_message (LOG_DEBUG, location, _f ("suppressed error: %s", s) + "\n");
/* Display a warning message. */
void
-warning (string s, string location)
+warning (const string &s, const string &location)
{
if (is_expected (s))
print_message (LOG_DEBUG, location, _f ("suppressed warning: %s", s) + "\n");
/* Display a success message. */
void
-basic_progress (string s, string location)
+basic_progress (const string &s, const string &location)
{
print_message (LOG_BASIC, location, s + "\n", true);
}
/* Display information about the progress. */
void
-progress_indication (string s, bool newline, string location)
+progress_indication (const string &s, bool newline, const string &location)
{
print_message (LOG_PROGRESS, location, s, newline);
}
/* Display a single info message. */
void
-message (string s, bool newline, string location)
+message (const string &s, bool newline, const string &location)
{
// Use the progress loglevel for all normal messages (including progress msg)
print_message (LOG_INFO, location, s, newline);
/* Display a debug information, not necessarily on a new line. */
void
-debug_output (string s, bool newline, string location)
+debug_output (const string &s, bool newline, const string &location)
{
print_message (LOG_DEBUG, location, s, newline);
}
\header {
texidoc = "The gaps between an @code{AmbitusLine} and its
-note heads are set by the @code{gap} property."
+note heads are set by the @code{gap} property. By default,
+@code{gap} is a function that reduces the gap for small intervals
+(e.g. a fourth), so that the line remains visible."
}
\layout {
c'4 g''
}
+\new Staff <<
+ \time 2/4
+ { d'' g'' }
+ \\
+ { c' g' }
+>>
\version "2.17.6"
\relative c' {
- c4 -\parenthesize -.
+ c2 -\parenthesize -.
+
+ \parenthesize \breathe
\override ParenthesesItem.padding = #0.1
<d \parenthesize fis a>
--- /dev/null
+\version "2.17.6"
+
+\header {
+ texidoc = "
+The positioning of multimeasure rests in @code{\\partcombineApart}
+passages corresponds with @code{\\voiceOne} and @code{\\voiceTwo} even
+when using non-standard staves.
+"
+}
+
+\layout {
+ indent = 4\cm
+ raggedright = ##t
+}
+
+\new StaffGroup
+<<
+ \new Staff \with
+ { \override StaffSymbol.line-count = #4
+ instrumentName = \markup \typewriter "\\partcombine"
+ }
+ {
+ \partcombine { R1^"R1" r1^"r1" \time 2/4 R2^"R2" r2^"r2" }
+ { \partcombineApart R1 r1 \time 2/4 R2 r2 }
+
+ }
+ \new Staff \with
+ { \override StaffSymbol.line-count = #4
+ instrumentName = \markup \typewriter "<< ... \\\\ ... >>"
+ }
+ <<
+ { R1 r1 \time 2/4 R2 r2 } \\
+ { R1 r1 \time 2/4 R2 r2 }
+ >>
+>>
-\version "2.16.0"
+\version "2.17.21"
\header {
- texidoc = "By default, @code{TextScript} vertical skylines allow
-for stack @code{TextScript} grobs to fit snugly over each other instead
-of moving the entire distance of the bounding box.
-"
+ texidoc = "@code{TextScript}s are spaced closely, following outlines of
+the stencil. When markup commands like @code{pad-around} and
+@code{with-dimensions} change the extent of a stencil, these changed
+extents have effect in the stencil outline used to place the resulting
+@code{TextScript}."
}
-\relative c' {
- a^\markup { \filled-box #'(0 . 2) #'(0 . 20) #0 hello}
- a^\markup { world }
-}
\ No newline at end of file
+{
+ g'2^\markup { g \line {. . . .} }
+ e'^\markup { e }
+
+ g'2^\markup { g \transparent \line {. . . .} }
+ e'^\markup { e }
+
+ g'2^\markup { g \pad-around #0.5 \line{. . . .} }
+ e'^\markup { e }
+
+ g'2^\markup { g \with-dimensions #'(-0 . 0) #'(-0 . 0) \line {. . . .} }
+ e'^\markup { e }
+}
{
Accidental_placement_entry *ape = apes[i];
- Real offset = -ape->horizontal_skylines_[RIGHT].distance (left_skyline);
+ Real offset = -ape->horizontal_skylines_[RIGHT]
+ .distance (left_skyline, 0.1);
if (isinf (offset))
offset = last_offset;
else
#include "warn.hh"
Index_to_charcode_map const *
-All_font_metrics::get_index_to_charcode_map (string filename,
+All_font_metrics::get_index_to_charcode_map (const string &filename,
int face_index,
FT_Face face)
{
return &filename_charcode_maps_map_[key];
}
-All_font_metrics::All_font_metrics (string path)
+All_font_metrics::All_font_metrics (const string &path)
{
otf_dict_ = new Scheme_hash_table;
#endif
Open_type_font *
-All_font_metrics::find_otf (string name)
+All_font_metrics::find_otf (const string &name)
{
SCM sname = ly_symbol2scm (name.c_str ());
SCM val;
}
Font_metric *
-All_font_metrics::find_font (string name)
+All_font_metrics::find_font (const string &name)
{
Font_metric *f = find_otf (name);
one_beat_ = one_beat;
}
-Audio_text::Audio_text (Audio_text::Type type, string text_string)
+Audio_text::Audio_text (Audio_text::Type type, const string &text_string)
{
text_string_ = text_string;
type_ = type;
private:
SCM split_list_;
Direction where_dir_;
- void change_to (Music_iterator *, SCM, string);
+ void change_to (Music_iterator *, SCM, const string&);
Moment start_moment_;
Context_handle up_;
void
Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
- string to_id)
+ const string &to_id)
{
Context *current = it->get_outlet ();
Context *last = 0;
}
SCM
-Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, string grob_set_name)
+Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, const string &grob_set_name)
{
extract_grob_set (me, grob_set_name.c_str (), elts);
for (vsize j = 0; j < other_v_skylines.size (); j++)
{
Skyline_pair const &v_other = other_v_skylines[j];
- Real pad = (padding + other_padding[j]);
- Real horizon_pad = (horizon_padding + other_horizon_padding[j]);
+ Real pad = max (padding, other_padding[j]);
+ Real horizon_pad = max (horizon_padding, other_horizon_padding[j]);
// We need to push elt up by at least this much to be above v_other.
Real up = (*v_skyline)[DOWN].distance (v_other[UP], horizon_pad) + pad;
{
Grob *elt = elements[i];
Real padding
- = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25);
+ = robust_scm2double (elt->get_property ("outside-staff-padding"),
+ Axis_group_interface
+ ::get_default_outside_staff_padding ());
Real horizon_padding
= robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
Interval x_extent = elt->extent (x_common, X_AXIS);
{
public:
TRANSLATOR_DECLARATIONS (Bar_engraver);
- void request_bar (string type_string);
protected:
void stop_translation_timestep ();
#include "warn.hh"
void
-Change_iterator::error (string reason)
+Change_iterator::error (const string &reason)
{
string to_type = ly_symbol2string (get_music ()->get_property ("change-to-type"));
string to_id = ly_scm2string (get_music ()->get_property ("change-to-id"));
/* TODO: this shares code with find_create_context (). */
Context *
-Context::create_unique_context (SCM name, string id, SCM operations)
+Context::create_unique_context (SCM name, const string &id, SCM operations)
{
/*
Don't create multiple score contexts.
}
Context *
-Context::find_create_context (SCM n, string id, SCM operations)
+Context::find_create_context (SCM n, const string &id, SCM operations)
{
/*
Don't create multiple score contexts.
Context *
Context::create_context (Context_def *cdef,
- string id,
+ const string &id,
SCM ops)
{
infant_event_ = 0;
}
Context *
-Context::get_default_interpreter (string context_id)
+Context::get_default_interpreter (const string &context_id)
{
if (!is_bottom_context ())
{
*/
Context *
find_context_below (Context *where,
- SCM type, string id)
+ SCM type, const string &id)
{
if (where->is_alias (type))
{
{
Audio_staff *control_track_;
- void add_text (Audio_text::Type, string);
+ void add_text (Audio_text::Type, const string&);
TRANSLATOR_DECLARATIONS (Control_track_performer);
protected:
}
void
-Control_track_performer::add_text (Audio_text::Type text_type, string str)
+Control_track_performer::add_text (Audio_text::Type text_type, const string &str)
{
Audio_item *text = new Audio_text (text_type, str);
control_track_->add_audio_item (text);
map<string, string> file_name_map_global;
string
-map_file_name (string s)
+map_file_name (const string &s)
{
if (file_name_map_global.find (s) != file_name_map_global.end ())
- s = file_name_map_global[s];
+ return file_name_map_global[s];
return s;
}
return Box (Interval (0, 0), Interval (0, 0));
}
-size_t
-Font_metric::name_to_index (string) const
-{
- return (size_t) - 1;
-}
-
Offset
Font_metric::get_indexed_wxwy (size_t) const
{
}
Offset
-Font_metric::attachment_point (string) const
+Font_metric::attachment_point (const string&) const
{
return Offset (0, 0);
}
Stencil
Font_metric::text_stencil (Output_def *state,
- string, bool) const
+ const string&, bool) const
{
(void) state;
SCM out = SCM_EOL;
Offset lastpos;
Offset firstpos;
- ssize j = 0;
+ int j = 0;
while (j < outline->n_points)
{
if (j == 0)
static SCM doc_hash_table;
void
-ly_check_name (string cxx, string scm_name)
+ly_check_name (const string &cxx, const string &scm_name)
{
string mangle = mangle_cxx_identifier (cxx);
if (mangle != scm_name)
void
ly_add_function_documentation (SCM func,
- string fname,
- string varlist,
- string doc)
+ const string &fname,
+ const string &varlist,
+ const string &doc)
{
if (doc == "")
return;
void
ly_add_type_predicate (void *ptr,
- string name)
+ const string &name)
{
type_names[ptr] = name;
}
}
Context *
-Global_context::get_default_interpreter (string /* context_id */)
+Global_context::get_default_interpreter (const string &/* context_id */)
{
if (get_score_context ())
return get_score_context ()->get_default_interpreter ();
#include "grob.hh"
-void check_prefix (string name, int mask, int prefix_set, string *str)
+void check_prefix (const string &name, int mask, int prefix_set, string *str)
{
if (prefix_set & mask)
{
MESSAGES
****************************************************************/
void
-Grob::programming_error (string s) const
+Grob::programming_error (const string &s) const
{
SCM cause = self_scm ();
while (Grob *g = unsmob_grob (cause))
}
void
-Grob::warning (string s) const
+Grob::warning (const string &s) const
{
SCM cause = self_scm ();
while (Grob *g = unsmob_grob (cause))
/** Set the new input file to NAME, remember old file. */
void
-Includable_lexer::new_input (string name, Sources *sources)
+Includable_lexer::new_input (const string &name, Sources *sources)
{
string current_dir = dir_name (main_input_name_);
if (relative_includes)
}
void
-Includable_lexer::new_input (string name, string data, Sources *sources)
+Includable_lexer::new_input (const string &name, string data, Sources *sources)
{
Source_file *file = new Source_file (name, data);
sources->add (file);
DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
DECLARE_GROB_INTERFACE ();
- static string get_fontcharname (string style, int alteration);
static SCM get_stencil (Grob *me);
};
All_font_metrics (All_font_metrics const &);
public:
- Index_to_charcode_map const *get_index_to_charcode_map (string filename,
+ Index_to_charcode_map const *get_index_to_charcode_map (const string &filename,
int face_index,
FT_Face face);
- All_font_metrics (string search_path);
+ All_font_metrics (const string &search_path);
~All_font_metrics ();
Pango_font *find_pango_font (PangoFontDescription const *description,
Real scale);
- Font_metric *find_font (string name);
- Open_type_font *find_otf (string name);
+ Font_metric *find_font (const string &name);
+ Open_type_font *find_otf (const string &name);
SCM font_descriptions () const;
};
MARKER, CUE_POINT
};
- Audio_text (Audio_text::Type type, string text_string);
+ Audio_text (Audio_text::Type type, const string &text_string);
Type type_;
string text_string_;
DECLARE_SCHEME_CALLBACK (calc_pure_relevant_items, (SCM));
DECLARE_SCHEME_CALLBACK (calc_pure_relevant_spanners, (SCM));
DECLARE_SCHEME_CALLBACK (calc_pure_y_common, (SCM));
- static SCM internal_calc_pure_relevant_grobs (Grob *, string);
+ static SCM internal_calc_pure_relevant_grobs (Grob *, const string&);
static Interval relative_group_extent (vector<Grob *> const &list,
Grob *common, Axis);
static Interval relative_maybe_bound_group_extent (vector<Grob *> const &list,
DECLARE_CLASSNAME (Change_iterator);
private:
- void error (string);
+ void error (const string&);
};
#endif
void instrumented_set_property (SCM, SCM, const char *, int, const char *);
void internal_set_property (SCM var_sym, SCM value);
- Context *create_context (Context_def *, string, SCM);
+ Context *create_context (Context_def *, const string&, SCM);
DECLARE_LISTENER (create_context_from_event);
DECLARE_LISTENER (acknowledge_infant);
DECLARE_LISTENER (remove_context);
virtual Context *get_score_context () const;
virtual Output_def *get_output_def () const;
virtual Moment now_mom () const;
- virtual Context *get_default_interpreter (string context_id = "");
+ virtual Context *get_default_interpreter (const string &context_id = "");
bool is_alias (SCM) const;
void add_alias (SCM);
bool is_removable () const;
Context *find_create_context (SCM context_name,
- string id, SCM ops);
- Context *create_unique_context (SCM context_name, string context_id,
+ const string &id, SCM ops);
+ Context *create_unique_context (SCM context_name, const string &context_id,
SCM ops);
vector<Context_def *> path_to_acceptable_context (SCM alias) const;
};
SCM context_property, SCM grob_property_path, SCM val);
SCM updated_grob_properties (Context *tg, SCM sym);
Context *find_context_below (Context *where,
- SCM type_sym, string id);
+ SCM type_sym, const string &id);
bool melisma_busy (Context *);
Context *get_voice_to_lyrics (Context *lyrics);
#include "std-string.hh"
-string map_file_name (string s);
+string map_file_name (const string &s);
#endif /* FILE_NAME_MAP_HH */
// Return stencil for given string. output_state may be modified to
// record the font.
virtual Stencil text_stencil (Output_def *output_state,
- string text, bool music) const;
+ const string &text, bool music) const;
virtual string font_name () const;
virtual size_t count () const;
- virtual Offset attachment_point (string) const;
+ virtual Offset attachment_point (const string&) const;
virtual Offset get_indexed_wxwy (size_t) const;
virtual Box get_indexed_char_dimensions (size_t index) const;
- virtual size_t name_to_index (string) const;
+ virtual size_t name_to_index (string) const=0;
virtual size_t index_to_charcode (size_t) const;
virtual Real design_size () const;
virtual Stencil find_by_name (string) const;
Font_metric ();
};
-int get_encoded_index (Font_metric *m, string input_coding, int code);
-
DECLARE_UNSMOB (Font_metric, metrics);
char *pfb2pfa (Byte const *pfb, int length);
virtual SCM get_output ();
virtual Output_def *get_output_def () const;
virtual Moment now_mom () const;
- virtual Context *get_default_interpreter (string context_id = "");
+ virtual Context *get_default_interpreter (const string &context_id = "");
Moment previous_moment () const;
protected:
void internal_set_property (SCM sym, SCM val);
/* messages */
- void warning (string) const;
- void programming_error (string) const;
+ void warning (const string&) const;
+ void programming_error (const string&) const;
/* class hierarchy */
virtual System *get_system () const;
vector<string> file_name_strings_;
Source_file *get_source_file () const;
- virtual void new_input (string s, Sources *);
+ virtual void new_input (const string &s, Sources *);
- void new_input (string name, string data, Sources *);
+ void new_input (const string &name, string data, Sources *);
char const *here_str0 () const;
};
char const *end () const;
void set (Source_file *, char const *, char const *);
- void error (string) const;
- void programming_error (string) const;
- void non_fatal_error (string) const;
- void warning (string) const;
- void message (string) const;
- void debug_output (string) const;
+ void error (const string&) const;
+ void programming_error (const string&) const;
+ void non_fatal_error (const string&) const;
+ void warning (const string&) const;
+ void message (const string&) const;
+ void debug_output (const string&) const;
void set_spot (Input const &);
void step_forward ();
void set_location (Input const &, Input const &);
Input ();
protected:
string message_location () const;
- string message_string (string msg) const;
+ string message_string (const string &msg) const;
};
#include "smobs.hh"
string mangle_cxx_identifier (string);
-void ly_add_type_predicate (void *ptr, string name);
+void ly_add_type_predicate (void *ptr, const string &name);
string predicate_to_typename (void *ptr);
/*
#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT) \
MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT, 0, "");
-void ly_add_function_documentation (SCM proc, string fname, string varlist, string doc);
-void ly_check_name (string cxx, string fname);
+void ly_add_function_documentation (SCM proc, const string &fname, const string &varlist, const string &doc);
+void ly_check_name (const string &cxx, const string &fname);
#define ADD_SCM_INIT_FUNC(name, func) \
class name ## _scm_initter \
extern SCM global_lily_module;
-string gulp_file_to_string (string fn, bool must_exist, int size);
+string gulp_file_to_string (const string &fn, bool must_exist, int size);
SCM ly_string2scm (string const &s);
string ly_scm2string (SCM s);
string ly_symbol2string (SCM);
-string robust_symbol2string (SCM, string);
+string robust_symbol2string (SCM, const string&);
Rational ly_scm2rational (SCM);
SCM ly_rational2scm (Rational);
SCM ly_offset2scm (Offset);
Drul_array<bool> robust_scm2booldrul (SCM, Drul_array<bool>);
Interval robust_scm2interval (SCM, Drul_array<Real>);
Offset robust_scm2offset (SCM, Offset);
-string robust_scm2string (SCM, string);
+string robust_scm2string (SCM, const string&);
Rational robust_scm2rational (SCM, Rational);
vector<Real> ly_scm2floatvector (SCM);
SCM ly_floatvector2scm (vector<Real> v);
DECLARE_SMOBS (Lily_lexer);
private:
- int lookup_keyword (string);
- int scan_bare_word (string);
- SCM scan_markup_word (string);
- int scan_escaped_word (string);
- int scan_shorthand (string);
+ int lookup_keyword (const string&);
+ int scan_bare_word (const string&);
+ int scan_escaped_word (const string&);
+ int scan_shorthand (const string&);
int scan_scm_id (SCM);
int identifier_type (SCM);
char escaped_char (char) const;
void start_main_input ();
- virtual void new_input (string s, Sources *);
- virtual void new_input (string s, string d, Sources *);
+ virtual void new_input (const string &s, Sources *);
+ virtual void new_input (const string &s, string d, Sources *);
bool top_input () { return include_stack_.size () < 2; }
SCM keyword_list () const;
- SCM lookup_identifier (string s);
+ SCM lookup_identifier (const string &s);
SCM lookup_identifier_symbol (SCM s);
void push_extra_token (int token_type, SCM scm = SCM_UNSPECIFIED);
void push_chord_state (SCM alist);
void clear ();
void do_init_file ();
SCM do_yyparse ();
- void include_string (string ly_code);
- void parse_file (string init, string name, string out_name);
- void parse_string (string ly_code);
- SCM parse_string_expression (string ly_code, string filename, int line);
- void parser_error (string);
- void parser_error (Input const &, string);
+ void include_string (const string &ly_code);
+ void parse_file (const string &init, const string &name, const string &out_name);
+ void parse_string (const string &ly_code);
+ SCM parse_string_expression (const string &ly_code, const string &filename, int line);
+ void parser_error (const string&);
+ void parser_error (Input const &, const string&);
// The following is called as yyerror
- static void parser_error (Input const *i, Lily_parser *parser, SCM *, string s);
+ static void parser_error (Input const *i, Lily_parser *parser, SCM *, const string &s);
void set_yydebug (bool);
SCM make_scope () const;
struct Lilypond_version
{
Lilypond_version (int major, int minor, int patch);
- Lilypond_version (string str);
+ Lilypond_version (const string &str);
string to_string () const;
operator int () const;
void do_scores ();
void clear_scores ();
void add_score (Score *s);
-void set_default_output (string s);
-string find_file (string);
void call_constructors ();
vector<string> get_inclusion_names ();
void set_inclusion_names (vector<string>);
class Midi_chunk
{
public:
- void set (string header_string, string data_string, string footer_string);
+ void set (const string &header_string, const string &data_string, const string &footer_string);
virtual string to_string () const;
virtual string data_string () const;
DECLARE_CLASSNAME (Midi_chunk);
struct Midi_stream
{
- Midi_stream (string file_name_string);
+ Midi_stream (const string &file_name_string);
~Midi_stream ();
- void write (string);
+ void write (const string&);
void write (Midi_chunk const &);
void open ();
Offset get_point_in_y_direction (Offset orig, Real slope, Real dist, Direction dir);
Real peak_around (Real epsilon, Real threshold, Real x);
Real convex_amplifier (Real standard_x, Real increase_factor, Real x);
-string camel_case_to_lisp_identifier (string in);
+string camel_case_to_lisp_identifier (const string &in);
#endif
struct Modified_font_metric : public Font_metric
{
public:
- Stencil text_stencil (Output_def *output_state, string, bool) const;
+ Stencil text_stencil (Output_def *output_state, const string&, bool) const;
Real get_magnification () const;
static SCM make_scaled_font_metric (Font_metric *fm, Real magnification);
size_t count () const;
Offset get_indexed_wxwy (size_t) const;
- Offset attachment_point (string) const;
+ Offset attachment_point (const string&) const;
size_t name_to_index (string) const;
size_t index_to_charcode (size_t) const;
Font_metric *original_font () const;
static Real stem_attachment_coordinate (Grob *, Axis a);
static int get_balltype (Grob *);
- static Offset get_stem_attachment (Font_metric *, string);
+ static Offset get_stem_attachment (Font_metric *, const string&);
};
#endif // NOTEHEAD_HH
SCM glyph_list () const;
SCM get_glyph_outline (size_t signed_idx) const;
Box get_glyph_outline_bbox (size_t signed_idx) const;
- string get_otf_table (string tag) const;
- static SCM make_otf (string);
+ string get_otf_table (const string &tag) const;
+ static SCM make_otf (const string&);
string font_name () const;
~Open_type_font ();
- Offset attachment_point (string) const;
+ Offset attachment_point (const string&) const;
size_t count () const;
Box get_indexed_char_dimensions (size_t) const;
Box get_unscaled_indexed_char_dimensions (size_t) const;
size_t name_to_index (string) const;
- //size_t glyph_name_to_charcode (string) const;
size_t index_to_charcode (size_t) const;
void derived_mark () const;
SCM sub_fonts () const;
Real design_size () const;
};
-string get_otf_table (FT_Face face, string tag);
-FT_Face open_ft_face (string str, FT_Long idx);
+string get_otf_table (FT_Face face, const string &tag);
+FT_Face open_ft_face (const string&, FT_Long idx);
#endif /* OPEN_TYPE_FONT_HH */
/*
variables.
*/
- SCM c_variable (string id) const;
+ SCM c_variable (const string &id) const;
SCM lookup_variable (SCM sym) const;
void set_variable (SCM sym, SCM val);
void normalize ();
string description_string () const;
SCM font_file_name () const;
- void register_font_file (string, string, int);
+ void register_font_file (const string &filename, const string &ps_name, int face_index);
size_t name_to_index (string) const;
SCM get_glyph_outline (size_t signed_idx) const;
Stencil pango_item_string_stencil (PangoGlyphItem const *) const;
virtual Stencil text_stencil (Output_def *output_state,
- string text, bool music) const;
+ const string &text, bool music) const;
virtual void derived_mark () const;
};
DECLARE_SMOBS (Paper_outputter);
public:
- Paper_outputter (SCM port, string format);
+ Paper_outputter (SCM port, const string &format);
void close ();
SCM dump_string (SCM);
SCM scheme_to_string (SCM);
};
-Paper_outputter *get_paper_outputter (string, string);
DECLARE_UNSMOB (Paper_outputter, outputter);
#endif /* PAPER_OUTPUTTER_HH */
#include "std-string.hh"
-void read_relocation_dir (string dirname);
-void read_relocation_file (string filename);
-string expand_environment_variables (string orig);
+void read_relocation_dir (const string &dirname);
+void read_relocation_file (const string &filename);
+string expand_environment_variables (const string &orig);
-int sane_putenv (char const *key, string value, bool overwrite);
+int sane_putenv (char const *key, const string &value, bool overwrite);
void setup_paths (char const *argv0);
extern bool relocate_binary;
DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM));
DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
DECLARE_GROB_INTERFACE ();
- static string glyph_name (Grob *, int, string, bool, Real);
+ static string glyph_name (Grob *, int durlog, const string &style, bool, Real);
static Real staff_position_internal (Grob *, int /* duration_log */,
int /* dir */);
static SCM brew_internal_stencil (Grob *, bool);
Real score () const { return score_; }
string card () const { return score_card_; }
- void add_score (Real, string);
+ void add_score (Real, const string&);
void generate_curve (Slur_score_state const &state, Real r0, Real h_inf,
vector<Offset> const &);
void stop_translation_timestep ();
void process_music ();
- bool can_create_slur (string, vsize, vsize *, Stream_event *);
- void create_slur (string spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken);
+ bool can_create_slur (const string&, vsize, vsize *, Stream_event *);
+ void create_slur (const string &spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken);
bool try_to_end (Stream_event *ev);
virtual void set_melisma (bool);
DECLARE_SMOBS (Source_file);
public:
- Source_file (string fn);
- Source_file (string, string);
+ Source_file (const string &fn);
+ Source_file (const string&, const string&);
char const *c_str () const;
virtual string quote_input (char const *pos_str0) const;
int line_offset_;
};
-vector<char> gulp_file (string fn, int desired);
+vector<char> gulp_file (const string &fn, int desired);
#endif /* SOURCE_FILE_HH */
+++ /dev/null
-/*
- This file is part of LilyPond, the GNU music typesetter.
-
- Copyright (C) 2001--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
- LilyPond is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- LilyPond is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef STREAM_HH
-#define STREAM_HH
-
-#include "std-string.hh"
-
-#include <iostream>
-#include <sstream>
-using namespace std;
-
-#if __GNUC__ > 2
-ostream *open_file_stream (string file_name,
- ios_base::openmode mode = ios::out);
-#else
-ostream *open_file_stream (string file_name, int mode = ios::out);
-#endif
-void close_file_stream (ostream *os);
-
-#endif /* STREAM_HH */
-
+++ /dev/null
-/*
- This file is part of LilyPond, the GNU music typesetter.
-
- Copyright (C) 2005--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
- LilyPond is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- LilyPond is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef TIE_COLUMN_FORMAT_HH
-#define TIE_COLUMN_FORMAT_HH
-
-#include "lily-proto.hh"
-#include "tie-configuration.hh"
-
-void set_chord_outline (Skyline *skyline,
- vector<Item *> bounds,
- Grob *common,
- Direction d);
-void set_tie_config_directions (Ties_configuration *tie_configs_ptr);
-void shift_small_ties (Ties_configuration *tie_configs,
- Grob *staff_referencer,
- Tie_details const &details);
-void final_shape_adjustment (Tie_configuration &conf,
- Tie_formatting_problem const &,
- Grob *staff_referencer);
-void
-set_chord_outlines (Drul_array<Skyline> *skyline_drul,
- vector<Grob *> ties,
- Grob *common);
-
-void
-set_manual_tie_configuration (Ties_configuration *tie_configs,
- bool *manual_override,
- SCM manual_configs
- );
-
-#endif /* TIE_COLUMN_FORMAT_HH */
/* computed. */
Interval attachment_x_;
- void add_score (Real, string);
+ void add_score (Real, const string&);
Tie_configuration ();
void center_tie_vertically (Tie_details const &);
Bezier get_transformed_bezier (Tie_details const &) const;
friend class Tie_formatting_problem;
public:
Ties_configuration ();
- void add_score (Real amount, string description);
- void add_tie_score (Real amount, int i, string description);
+ void add_score (Real amount, const string &description);
+ void add_tie_score (Real amount, int i, const string &description);
Real score () const;
void reset_score ();
string card () const;
[file:line:column:][warning:]message
*/
string
-Input::message_string (string msg) const
+Input::message_string (const string &msg) const
{
if (source_file_)
return msg + "\n" + source_file_->quote_input (start_);
return (source_file_) ? location_string () : "";
}
void
-Input::error (string s) const
+Input::error (const string &s) const
{
::non_fatal_error (message_string (s), message_location ());
// UGH, fix naming or usage (use non_fatal_error in most places, instead)
}
void
-Input::programming_error (string s) const
+Input::programming_error (const string &s) const
{
::programming_error (message_string (s), message_location ());
}
void
-Input::non_fatal_error (string s) const
+Input::non_fatal_error (const string &s) const
{
::non_fatal_error (message_string (s), message_location ());
}
void
-Input::warning (string s) const
+Input::warning (const string &s) const
{
::warning (message_string (s), message_location ());
}
void
-Input::message (string s) const
+Input::message (const string &s) const
{
::message (message_string (s), true, message_location ());
}
void
-Input::debug_output (string s) const
+Input::debug_output (const string &s) const
{
::debug_output (message_string (s), true, message_location ());
}
int
-Lily_lexer::scan_escaped_word (string str)
+Lily_lexer::scan_escaped_word (const string &str)
{
// use more SCM for this.
}
int
-Lily_lexer::scan_shorthand (string str)
+Lily_lexer::scan_shorthand (const string &str)
{
SCM sid = lookup_identifier (str);
if (Music *m = unsmob_music (sid))
}
int
-Lily_lexer::scan_bare_word (string str)
+Lily_lexer::scan_bare_word (const string &str)
{
SCM sym = ly_symbol2scm (str.c_str ());
if ((YYSTATE == notes) || (YYSTATE == chords)) {
}
string
-robust_symbol2string (SCM sym, string str)
+robust_symbol2string (SCM sym, const string &str)
{
return scm_is_symbol (sym) ? ly_symbol2string (sym) : str;
}
string
-gulp_file_to_string (string fn, bool must_exist, int size)
+gulp_file_to_string (const string &fn, bool must_exist, int size)
{
string s = global_path.find (fn);
if (s == "")
}
string
-robust_scm2string (SCM k, string s)
+robust_scm2string (SCM k, const string &s)
{
if (scm_is_string (k))
- s = ly_scm2string (k);
+ return ly_scm2string (k);
return s;
}
}
int
-Lily_lexer::lookup_keyword (string s)
+Lily_lexer::lookup_keyword (const string &s)
{
return keytable_->lookup (s.c_str ());
}
}
SCM
-Lily_lexer::lookup_identifier (string name)
+Lily_lexer::lookup_identifier (const string &name)
{
return lookup_identifier_symbol (ly_symbol2scm (name.c_str ()));
}
}
void
-Lily_lexer::new_input (string str, string d, Sources *ss)
+Lily_lexer::new_input (const string &str, string d, Sources *ss)
{
Includable_lexer::new_input (str, d, ss);
}
void
-Lily_lexer::new_input (string str, Sources *ss)
+Lily_lexer::new_input (const string &str, Sources *ss)
{
if (is_main_input_ && be_safe_global)
{
/* Process one .ly file, or book. */
void
-Lily_parser::parse_file (string init, string name, string out_name)
+Lily_parser::parse_file (const string &init, const string &name, const string &out_name)
{
lexer_->set_identifier (ly_symbol2scm ("parser"), self_scm ());
output_basename_ = out_name;
}
void
-Lily_parser::parse_string (string ly_code)
+Lily_parser::parse_string (const string &ly_code)
{
lexer_->main_input_name_ = "<string>";
lexer_->new_input (lexer_->main_input_name_, ly_code, sources_);
}
SCM
-Lily_parser::parse_string_expression (string ly_code, string filename,
+Lily_parser::parse_string_expression (const string &ly_code, const string &filename,
int line)
{
lexer_->main_input_name_ = filename;
}
void
-Lily_parser::include_string (string ly_code)
+Lily_parser::include_string (const string &ly_code)
{
lexer_->new_input ("<included string>", ly_code, sources_);
}
}
void
-Lily_parser::parser_error (string s)
+Lily_parser::parser_error (const string &s)
{
lexer_->here_input ().error (_ (s.c_str ()));
error_level_ = 1;
}
void
-Lily_parser::parser_error (Input const &i, string s)
+Lily_parser::parser_error (Input const &i, const string &s)
{
i.error (s);
error_level_ = 1;
patch_ = patch;
}
-Lilypond_version::Lilypond_version (string str)
+Lilypond_version::Lilypond_version (const string &str)
{
major_ = 0;
minor_ = 0;
}
static void
-prepend_scheme_list (string dir, string scmlist)
+prepend_scheme_list (const string &dir, const string &scmlist)
/*
* Inserts an item at the front of a Scheme list, e.g. %load-path
* Parameters:
}
static void
-add_output_format (string format)
+add_output_format (const string &format)
/*
* Capture information internally from command-line options
* re output format.
}
void
-Midi_chunk::set (string header_string, string data_string, string footer_string)
+Midi_chunk::set (const string &header_string, const string &data_string, const string &footer_string)
{
data_string_ = data_string;
footer_string_ = footer_string;
#include "midi-chunk.hh"
#include "misc.hh"
#include "program-option.hh"
-#include "stream.hh"
#include "string-convert.hh"
#include "warn.hh"
-Midi_stream::Midi_stream (string file_name)
+Midi_stream::Midi_stream (const string &file_name)
{
file_name_string_ = file_name;
out_file_ = fopen (file_name.c_str (), "wb");
}
void
-Midi_stream::write (string str)
+Midi_stream::write (const string &str)
{
size_t sz = sizeof (Byte);
size_t n = str.length ();
}
string
-camel_case_to_lisp_identifier (string in)
+camel_case_to_lisp_identifier (const string &in)
{
vector<char> out;
complex<Real> res = orig_c + to_move;
return Offset (real (res), imag (res));
-}
\ No newline at end of file
+}
}
Offset
-Modified_font_metric::attachment_point (string s) const
+Modified_font_metric::attachment_point (const string &s) const
{
Offset o = orig_->attachment_point (s);
return o * magnification_;
return o * magnification_;
}
-vsize
+size_t
Modified_font_metric::name_to_index (string s) const
{
return orig_->name_to_index (s);
Stencil
Modified_font_metric::text_stencil (Output_def *state,
- string text, bool feta) const
+ const string &text, bool feta) const
{
Box b;
if (Pango_font *pf = dynamic_cast<Pango_font *> (orig_))
}
Offset
-Note_head::get_stem_attachment (Font_metric *fm, string key)
+Note_head::get_stem_attachment (Font_metric *fm, const string &key)
{
Offset att;
}
string
-Open_type_font::get_otf_table (string tag) const
+Open_type_font::get_otf_table (const string &tag) const
{
return ::get_otf_table (face_, tag);
}
UGH fix naming
*/
string
-get_otf_table (FT_Face face, string tag)
+get_otf_table (FT_Face face, const string &tag)
{
FT_ULong len;
FT_Byte *tab = load_table (tag.c_str (), face, &len);
}
FT_Face
-open_ft_face (string str, FT_Long idx)
+open_ft_face (const string &str, FT_Long idx)
{
FT_Face face;
FT_Error error_code = FT_New_Face (freetype2_library, str.c_str (), idx, &face);
}
SCM
-Open_type_font::make_otf (string str)
+Open_type_font::make_otf (const string &str)
{
FT_Face face = open_ft_face (str, 0 /* index */);
Open_type_font *otf = new Open_type_font (face);
}
Offset
-Open_type_font::attachment_point (string glyph_name) const
+Open_type_font::attachment_point (const string &glyph_name) const
{
SCM sym = ly_symbol2scm (glyph_name.c_str ());
SCM entry = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
}
SCM
-Output_def::c_variable (string s) const
+Output_def::c_variable (const string &s) const
{
return lookup_variable (ly_symbol2scm (s.c_str ()));
}
}
void
-Pango_font::register_font_file (string filename,
- string ps_name,
+Pango_font::register_font_file (const string &filename,
+ const string &ps_name,
int face_index)
{
scm_hash_set_x (physical_font_tab_,
Stencil
Pango_font::text_stencil (Output_def * /* state */,
- string str, bool music_string) const
+ const string &str, bool music_string) const
{
/*
The text assigned to a PangoLayout is automatically divided
#include "ly-smobs.icc"
-Paper_outputter::Paper_outputter (SCM port, string format)
+Paper_outputter::Paper_outputter (SCM port, const string &format)
{
file_ = port;
output_module_ = SCM_EOL;
#include "warn.hh"
void
-Lily_parser::parser_error (Input const *i, Lily_parser *parser, SCM *, string s)
+Lily_parser::parser_error (Input const *i, Lily_parser *parser, SCM *, const string &s)
{
parser->parser_error (*i, s);
}
$$ = $1;
else {
parser->parser_error (@1, _ ("not a context mod"));
+ $$ = Context_mod ().smobbed_copy ();
}
}
;
embedded_scm_arg
| SCM_IDENTIFIER
| bare_number
+ // The following is a rather defensive variant of admitting
+ // negative numbers: the grammar would permit number_factor or
+ // even number_expression. However, function arguments allow
+ // only this simple kind of negative number, so to have things
+ // like \tweak and \override behave reasonably similar, it
+ // makes sense to rule out things like -- which are rather an
+ // accent in function argument contexts.
+ | '-' bare_number
+ {
+ $$ = scm_difference ($2, SCM_UNDEFINED);
+ }
| FRACTION
- | lyric_element
+ | STRING
+ | full_markup
;
scalar_closed:
embedded_scm_arg_closed
| SCM_IDENTIFIER
+ // for scalar_closed to be an actually closed (no lookahead)
+ // expression, we'd need to use bare_number_closed here. It
+ // turns out that the only use of scalar_closed in TEMPO is
+ // not of the kind requiring the full closedness criterion.
| bare_number
+ | '-' bare_number
+ {
+ $$ = scm_difference ($2, SCM_UNDEFINED);
+ }
| FRACTION
- | lyric_element
+ | STRING
+ | full_markup
;
lyric_element:
full_markup {
+ if (!parser->lexer_->is_lyric_state ())
+ parser->parser_error (@1, _ ("markup outside of text script or \\lyricmode"));
$$ = $1;
}
| STRING {
+ if (!parser->lexer_->is_lyric_state ())
+ parser->parser_error (@1, _ ("unrecognized string, not in text script or \\lyricmode"));
$$ = $1;
}
| LYRIC_ELEMENT
lyric_element_music:
lyric_element optional_notemode_duration post_events {
- if (!parser->lexer_->is_lyric_state ())
- parser->parser_error (@1, _ ("have to be in Lyric mode for lyrics"));
$$ = MAKE_SYNTAX ("lyric-event", @$, $1, $2);
if (scm_is_pair ($3))
unsmob_music ($$)->set_property
"DynamicLineSpanner",
"Tie",
"Dots",
+ "MultiMeasureRest",
"Rest",
"Slur",
"TextScript",
ly_symbol2scm ("horizontal-shift"), horizontalShiftOne_);
execute_pushpop_property (two, ly_symbol2scm ("NoteColumn"),
ly_symbol2scm ("horizontal-shift"), horizontalShiftTwo_);
- /* Also handle MultiMeasureRest positions for voice 1/2 */
- execute_pushpop_property (one, ly_symbol2scm ("MultiMeasureRest"),
- ly_symbol2scm ("staff-position"), scm_from_int (4));
- execute_pushpop_property (two, ly_symbol2scm ("MultiMeasureRest"),
- ly_symbol2scm ("staff-position"), scm_from_int (-4));
}
#define FRAMEWORKDIR ".."
int
-sane_putenv (char const *key, string value, bool overwrite)
+sane_putenv (char const *key, const string &value, bool overwrite)
{
if (overwrite || !getenv (key))
{
}
static int
-set_env_file (char const *key, string value, bool overwrite = false)
+set_env_file (char const *key, const string &value, bool overwrite = false)
{
if (is_file (value))
return sane_putenv (key, value, overwrite);
}
static int
-set_env_dir (char const *key, string value)
+set_env_dir (char const *key, const string &value)
{
if (is_dir (value))
return sane_putenv (key, value, false);
#endif
static void
-prefix_relocation (string prefix)
+prefix_relocation (const string &prefix)
{
string bindir = prefix + "/bin";
string datadir = prefix + "/share";
*/
static void
-framework_relocation (string prefix)
+framework_relocation (const string &prefix)
{
debug_output (_f ("Relocation: framework_prefix=%s", prefix));
}
string
-expand_environment_variables (string orig)
+expand_environment_variables (const string &orig)
{
char const *start_ptr = orig.c_str ();
char const *ptr = orig.c_str ();
}
void
-read_relocation_file (string filename)
+read_relocation_file (const string &filename)
{
debug_output (_f ("Relocation file: %s", filename.c_str ()) + "\n");
char const *cname = filename.c_str ();
}
void
-read_relocation_dir (string dirname)
+read_relocation_dir (const string &dirname)
{
if (DIR *dir = opendir (dirname.c_str ()))
while (struct dirent *ent = readdir (dir))
make this function easily usable in C++
*/
string
-Rest::glyph_name (Grob *me, int durlog, string style, bool try_ledgers,
+Rest::glyph_name (Grob *me, int durlog, const string &style, bool try_ledgers,
Real offset)
{
bool is_ledgered = false;
#include "staff-symbol-referencer.hh"
#include "item.hh"
#include "tie-formatting-problem.hh"
-#include "tie-column-format.hh"
ADD_INTERFACE (Semi_tie_column,
"The interface for a column of l.v. (laissez vibrer) ties.",
};
void
-Slur_configuration::add_score (Real s, string desc)
+Slur_configuration::add_score (Real s, const string &desc)
{
if (s < 0)
{
}
void
-Slur_proto_engraver::create_slur (string spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken)
+Slur_proto_engraver::create_slur (const string &spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken)
{
Grob *ccc = unsmob_grob (get_property ("currentCommandColumn"));
SCM cause = ev_cause ? ev_cause->self_scm () : g_cause->self_scm ();
}
bool
-Slur_proto_engraver::can_create_slur (string id, vsize old_slurs, vsize *event_idx, Stream_event *ev)
+Slur_proto_engraver::can_create_slur (const string &id, vsize old_slurs, vsize *event_idx, Stream_event *ev)
{
for (vsize j = slurs_.size (); j--;)
{
return contents of FILENAME. *Not 0-terminated!*
*/
vector<char>
-gulp_file (string filename, int desired_size)
+gulp_file (const string &filename, int desired_size)
{
/* "b" must ensure to open literally, avoiding text (CR/LF)
conversions. */
smobify_self ();
}
-Source_file::Source_file (string filename, string data)
+Source_file::Source_file (const string &filename, const string &data)
{
init ();
newline_locations_.push_back (&characters_[0] + i);
}
-Source_file::Source_file (string filename_string)
+Source_file::Source_file (const string &filename_string)
{
init ();
private:
string new_instrument_string ();
- void set_instrument_name (string voice);
- void set_instrument (int channel, string voice);
- int get_channel (string instrument);
- Audio_staff *get_audio_staff (string voice);
- Audio_staff *new_audio_staff (string voice);
- Audio_dynamic *get_dynamic (string voice);
+ void set_instrument_name (const string &voice);
+ void set_instrument (int channel, const string &voice);
+ int get_channel (const string &instrument);
+ Audio_staff *get_audio_staff (const string &voice);
+ Audio_staff *new_audio_staff (const string &voice);
+ Audio_dynamic *get_dynamic (const string &voice);
string instrument_string_;
int channel_;
}
Audio_staff *
-Staff_performer::new_audio_staff (string voice)
+Staff_performer::new_audio_staff (const string &voice)
{
Audio_staff *audio_staff = new Audio_staff;
audio_staff->merge_unisons_
}
Audio_staff *
-Staff_performer::get_audio_staff (string voice)
+Staff_performer::get_audio_staff (const string &voice)
{
SCM channel_mapping = get_property ("midiChannelMapping");
if (channel_mapping != ly_symbol2scm ("instrument")
}
Audio_dynamic *
-Staff_performer::get_dynamic (string voice)
+Staff_performer::get_dynamic (const string &voice)
{
map<string, Audio_dynamic *>::const_iterator i = dynamic_map_.find (voice);
if (i != dynamic_map_.end ())
}
void
-Staff_performer::set_instrument (int channel, string voice)
+Staff_performer::set_instrument (int channel, const string &voice)
{
instrument_ = new Audio_instrument (instrument_string_);
instrument_->channel_ = channel;
}
void
-Staff_performer::set_instrument_name (string voice)
+Staff_performer::set_instrument_name (const string &voice)
{
instrument_name_ = new Audio_text (Audio_text::INSTRUMENT_NAME,
instrument_string_);
}
int
-Staff_performer::get_channel (string instrument)
+Staff_performer::get_channel (const string &instrument)
{
SCM channel_mapping = get_property ("midiChannelMapping");
map<string, int> &channel_map
return stencil_traverser (trans, scm_caddr (expr));
else if (scm_car (expr) == ly_symbol2scm ("color"))
return stencil_traverser (trans, scm_caddr (expr));
+ else if (scm_car (expr) == ly_symbol2scm ("transparent-stencil"))
+ return stencil_traverser (trans, scm_cadr (expr));
else if (scm_car (expr) == ly_symbol2scm ("id"))
return stencil_traverser (trans, scm_caddr (expr));
else
interpret_stencil_expression (scm_force (scm_cadr (expr)), func, func_arg, o);
return;
}
+ if (head == ly_symbol2scm ("transparent-stencil"))
+ return;
if (head == ly_symbol2scm ("footnote"))
return;
if (head == ly_symbol2scm ("translate-stencil"))
#include "pointer-group-interface.hh"
#include "tie.hh"
#include "directional-element-interface.hh"
-#include "tie-column-format.hh"
#include "tie-formatting-problem.hh"
#include "tie-configuration.hh"
}
void
-Tie_configuration::add_score (Real s, string desc)
+Tie_configuration::add_score (Real s, const string &desc)
{
assert (!scored_);
score_ += s;
}
void
-Ties_configuration::add_tie_score (Real s, int i, string desc)
+Ties_configuration::add_tie_score (Real s, int i, const string &desc)
{
assert (!scored_);
score_ += s;
}
void
-Ties_configuration::add_score (Real s, string desc)
+Ties_configuration::add_score (Real s, const string &desc)
{
assert (!scored_);
score_ += s;
}
static void
-create_type42_font (void *out, string name, int idx)
+create_type42_font (void *out, const string &name, int idx)
{
FT_Face face;
\defaultchild "Voice"
\accepts "Voice"
\accepts "CueVoice"
+ \accepts "NullVoice"
\description "Handles clefs, bar lines, keys, accidentals. It can contain
@code{Voice} contexts."
context."
}
+\context {
+ \name "NullVoice"
+ \type "Engraver_group"
+
+ \description "Non-printing context, typically used for aligning
+lyrics in polyphonic situations, or with @code{\partcombine}."
+
+ %% don't route anything out of here
+ \alias "Staff"
+ \alias "Voice"
+
+ %% all three are needed for ties to work with lyrics
+ \consists "Note_heads_engraver"
+ \consists "Rhythmic_column_engraver"
+ \consists "Tie_engraver"
+
+ %% both are needed for melismas to work with \autoBeamOff
+ \consists "Beam_engraver"
+ \consists "Stem_engraver"
+
+ %% needed for slurs to work with lyrics
+ \consists "Slur_engraver"
+
+ %% keep noteheads inside the staff
+ \consists "Pitch_squash_engraver"
+ squashedPosition = 0
+
+ %% `\omit NoteHead' would give slur attachment errors
+ \omit Accidental
+ \omit Beam
+ \omit Dots
+ \omit Flag
+ \omit Rest
+ \omit Slur
+ \omit Stem
+ \omit Tie
+
+ %% let these take up space (for lyric extenders, etc.)
+ \override NoteHead.transparent = ##t
+ \override TabNoteHead.transparent = ##t
+
+ %% don't let notes shift
+ \override NoteHead.X-offset = 0
+ \override NoteColumn.ignore-collision = ##t
+
+ %% keep beams and stems inside the staff
+ \override Beam.positions = #'(1 . 1)
+ \override Stem.length = 0
+
+ %% prevent "weird stem size" warnings
+ \override Stem.direction = #UP
+}
+
\context {
\Voice
\name "TabVoice"
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: lilypond 2.17.25\n"
+"Project-Id-Version: lilypond 2.17.26\n"
"Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
"lilypond.bugs\n"
-"POT-Creation-Date: 2013-08-25 15:40+0100\n"
+"POT-Creation-Date: 2013-09-08 15:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "\\applycontext argument is not a procedure"
msgstr ""
-#: arpeggio.cc:115
+#: arpeggio.cc:138
msgid "no heads for arpeggio found?"
msgstr ""
msgid "\"%s\" is not a valid outside-staff-placement-directive"
msgstr ""
-#: axis-group-interface.cc:774
+#: axis-group-interface.cc:776
msgid "an outside-staff object should have a direction, defaulting to up"
msgstr ""
msgid "custos `%s' not found"
msgstr ""
-#: dispatcher.cc:83
+#: dispatcher.cc:89
msgid "Event class should be a list"
msgstr ""
-#: dispatcher.cc:166
+#: dispatcher.cc:172
#, c-format
msgid "Junking event: %s"
msgstr ""
-#: dispatcher.cc:262
+#: dispatcher.cc:277
msgid "Attempting to remove nonexisting listener."
msgstr ""
-#: dispatcher.cc:284
+#: dispatcher.cc:303
msgid "Already listening to dispatcher, ignoring request"
msgstr ""
msgid "Time signature with more than 255 beats. Truncating"
msgstr ""
-#: midi-stream.cc:39
+#: midi-stream.cc:38
#, c-format
msgid "cannot open for write: %s: %s"
msgstr ""
-#: midi-stream.cc:55
+#: midi-stream.cc:54
#, c-format
msgid "cannot write to file: `%s'"
msgstr ""
msgid "Too much lookahead"
msgstr ""
-#: parser.yy:458 parser.yy:747 parser.yy:814
+#: parser.yy:458 parser.yy:756 parser.yy:823
msgid "bad expression type"
msgstr ""
-#: parser.yy:643 parser.yy:1142
+#: parser.yy:652 parser.yy:1151
msgid "not a context mod"
msgstr ""
-#: parser.yy:849
+#: parser.yy:858
msgid "score expected"
msgstr ""
-#: parser.yy:865
+#: parser.yy:874
msgid "\\paper cannot be used in \\score, use \\layout instead"
msgstr ""
-#: parser.yy:889
+#: parser.yy:898
msgid "need \\paper for paper block"
msgstr ""
-#: parser.yy:1037 parser.yy:1059
+#: parser.yy:1046 parser.yy:1068
msgid "unexpected post-event"
msgstr ""
-#: parser.yy:1067
+#: parser.yy:1076
msgid "Ignoring non-music expression"
msgstr ""
-#: parser.yy:1078 parser.yy:2325
+#: parser.yy:1087 parser.yy:2373
msgid "music expected"
msgstr ""
-#: parser.yy:1346
+#: parser.yy:1355
msgid "not a symbol"
msgstr ""
-#: parser.yy:2037 parser.yy:2151 parser.yy:2164 parser.yy:2173
+#: parser.yy:2044 parser.yy:2158 parser.yy:2171 parser.yy:2180
msgid "bad grob property path"
msgstr ""
-#: parser.yy:2131
+#: parser.yy:2138
msgid "only \\consists and \\remove take non-string argument."
msgstr ""
-#: parser.yy:2192
+#: parser.yy:2199
msgid "bad context property path"
msgstr ""
-#: parser.yy:2293
+#: parser.yy:2300
msgid "simple string expected"
msgstr ""
-#: parser.yy:2434
+#: parser.yy:2318
+msgid "symbol expected"
+msgstr ""
+
+#: parser.yy:2482
msgid "not a rhythmic event"
msgstr ""
-#: parser.yy:2508
+#: parser.yy:2556
msgid "post-event expected"
msgstr ""
-#: parser.yy:2517 parser.yy:2522 parser.yy:3003
+#: parser.yy:2565 parser.yy:2570
msgid "have to be in Lyric mode for lyrics"
msgstr ""
-#: parser.yy:2590
+#: parser.yy:2638
msgid "expecting string as script definition"
msgstr ""
-#: parser.yy:2685
+#: parser.yy:2733
msgid "not an articulation"
msgstr ""
-#: parser.yy:2757 parser.yy:2803
+#: parser.yy:2805 parser.yy:2851
#, c-format
msgid "not a duration: %d"
msgstr ""
-#: parser.yy:2820
+#: parser.yy:2868
msgid "bass number expected"
msgstr ""
-#: parser.yy:2919
+#: parser.yy:2967
msgid "have to be in Note mode for notes"
msgstr ""
-#: parser.yy:2978
+#: parser.yy:3026
msgid "have to be in Chord mode for chords"
msgstr ""
-#: parser.yy:3204
+#: parser.yy:3041
+msgid "markup outside of text script or \\lyricmode"
+msgstr ""
+
+#: parser.yy:3046
+msgid "unrecognized string, not in text script or \\lyricmode"
+msgstr ""
+
+#: parser.yy:3254
msgid "not a markup"
msgstr ""
msgid "Undefined parent event class `~S'"
msgstr ""
-#: define-markup-commands.scm:1041
+#: define-markup-commands.scm:1037
msgid "no systems found in \\score markup, does it have a \\layout block?"
msgstr ""
-#: define-markup-commands.scm:2837
+#: define-markup-commands.scm:2832
#, scheme-format
msgid "Cannot find glyph ~a"
msgstr ""
-#: define-markup-commands.scm:3263
+#: define-markup-commands.scm:3258
#, scheme-format
msgid "no brace found for point size ~S "
msgstr ""
-#: define-markup-commands.scm:3264
+#: define-markup-commands.scm:3259
#, scheme-format
msgid "defaulting to ~S pt"
msgstr ""
-#: define-markup-commands.scm:3508
+#: define-markup-commands.scm:3503
#, scheme-format
msgid "not a valid duration string: ~a"
msgstr ""
-#: define-markup-commands.scm:3719
+#: define-markup-commands.scm:3714
#, scheme-format
msgid "not a valid duration string: ~a - ignoring"
msgstr ""
msgid "wrong type for argument ~a. Expecting ~a, found ~s"
msgstr ""
-#: ly-syntax-constructors.scm:201
+#: ly-syntax-constructors.scm:200
#, scheme-format
msgid "Invalid property operation ~a"
msgstr ""
msgid "bad grob property path ~a"
msgstr ""
-#: music-functions.scm:766
+#: music-functions.scm:755
msgid "Bad chord repetition"
msgstr ""
-#: music-functions.scm:801
+#: music-functions.scm:790
#, scheme-format
msgid "music expected: ~S"
msgstr ""
-#: music-functions.scm:1145
+#: music-functions.scm:1133
#, scheme-format
msgid "cannot find quoted music: `~S'"
msgstr ""
-#: music-functions.scm:1283
+#: music-functions.scm:1271
msgid "Add @var{octave-shift} to the octave of @var{pitch}."
msgstr ""
-#: music-functions.scm:1343
+#: music-functions.scm:1331
#, scheme-format
msgid "Unknown octaveness type: ~S "
msgstr ""
-#: music-functions.scm:1344
+#: music-functions.scm:1332
msgid "Defaulting to 'any-octave."
msgstr ""
-#: music-functions.scm:1689
+#: music-functions.scm:1677
#, scheme-format
msgid "unknown accidental style: ~S"
msgstr ""
'ambitus-interface
"The line between note heads for a pitch range."
'(gap
+ length-fraction
+ maximum-gap
note-heads
thickness))
(max-stretch ,number? "The maximum amount that this
@code{VerticalAxisGroup} can be vertically stretched (for example, in
order to better fill a page).")
+ (maximum-gap ,number? "Maximum value allowed for @code{gap}
+property.")
(measure-count ,integer? "The number of measures for a
multi-measure rest.")
(measure-length ,ly:moment? "Length of a measure. Used in some
grob horizontally. If this property is set, the outside-staff-object
is raised so that it is not so close to its neighbor.")
(outside-staff-padding ,number? "The padding to place between
-this grob and the staff when spacing according to
-@code{outside-staff-priority}.")
+grobs when spacing according to @code{outside-staff-priority}.
+Two grobs with different @code{outside-staff-padding} values have
+the larger value of padding between them.")
(outside-staff-placement-directive ,symbol? "One of four directives
telling how outside staff objects should be placed.
@itemize @bullet
(AmbitusLine
. (
- (gap . 0.35)
+ (gap . ,ambitus-line::calc-gap)
+ (length-fraction . 0.7)
+ (maximum-gap . 0.45)
(stencil . ,ambitus::print)
(thickness . 2)
(X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
(direction . ,DOWN)
(minimum-space . 1.2)
(outside-staff-priority . 250)
- (outside-staff-padding . 0.6)
(padding . 0.6)
(side-axis . ,Y)
(slur-padding . 0.3)
(font-encoding . fetaText)
(font-size . -2)
(outside-staff-horizontal-padding . 0.5)
- (outside-staff-padding . 0.5)
(outside-staff-priority . 750)
(self-alignment-X . ,CENTER)
(side-axis . ,Y)
(padding . 0.2)
(stencil . ,parentheses-item::print)
(stencils . ,parentheses-item::calc-parenthesis-stencils)
+ ;; X-extent needs to be non-empty in order to allow proper
+ ;; horizontal attachment. ParenthesesItem does not reserve
+ ;; space of its own, however.
+ (X-extent . (0 . 0))
(meta . ((class . Item)
(interfaces . (font-interface
parentheses-interface))))))
(extra-spacing-width . (+inf.0 . -inf.0))
(font-size . 2)
(non-musical . #t)
- (outside-staff-horizontal-padding . 0.12)
+ (outside-staff-horizontal-padding . 0.2)
(outside-staff-priority . 1500)
(padding . 0.8)
(self-alignment-X . ,CENTER)
(cross-staff . ,script-or-side-position-cross-staff)
(direction . ,DOWN)
(extra-spacing-width . (+inf.0 . -inf.0))
- (outside-staff-horizontal-padding . 0.12)
+ (outside-staff-horizontal-padding . 0.2)
(outside-staff-priority . 450)
;; sync with Fingering ?
(let* ((arg-stencil (interpret-markup layout props arg))
(x-ext (ly:stencil-extent arg-stencil X))
(y-ext (ly:stencil-extent arg-stencil Y)))
- (ly:make-stencil
- `(delay-stencil-evaluation
- ,(delay (ly:stencil-expr
- (let* ((table (ly:output-def-lookup layout 'label-page-table))
+ (ly:stencil-add
+ (ly:make-stencil
+ `(delay-stencil-evaluation
+ ,(delay (let* ((table (ly:output-def-lookup layout 'label-page-table))
(page-number (if (list? table)
(assoc-get label table)
- #f))
- (link-expr (list 'page-link page-number
- `(quote ,x-ext) `(quote ,y-ext))))
- (ly:stencil-add (ly:make-stencil link-expr x-ext y-ext)
- arg-stencil)))))
- x-ext
- y-ext)))
+ #f)))
+ (list 'page-link page-number
+ `(quote ,x-ext) `(quote ,y-ext)))))
+ x-ext
+ y-ext)
+ arg-stencil)))
(define-markup-command (beam layout props width slope thickness)
@cindex putting space around text
Add space around a markup object.
+Identical to @code{pad-around}.
@lilypond[verbatim,quote]
\\markup {
}
}
@end lilypond"
- (let*
- ((stil (interpret-markup layout props arg))
- (xext (ly:stencil-extent stil X))
- (yext (ly:stencil-extent stil Y)))
-
- (ly:make-stencil
- (ly:stencil-expr stil)
- (interval-widen xext amount)
- (interval-widen yext amount))))
+ (let* ((m (interpret-markup layout props arg))
+ (x (interval-widen (ly:stencil-extent m X) amount))
+ (y (interval-widen (ly:stencil-extent m Y) amount)))
+ (ly:stencil-add (make-transparent-box-stencil x y)
+ m)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; space
@cindex setting extent of text objects
Set the dimensions of @var{arg} to @var{x} and@tie{}@var{y}."
- (let* ((m (interpret-markup layout props arg)))
- (ly:make-stencil (ly:stencil-expr m) x y)))
+ (let* ((expr (ly:stencil-expr (interpret-markup layout props arg))))
+ (ly:stencil-add
+ (make-transparent-box-stencil x y)
+ (ly:make-stencil
+ `(delay-stencil-evaluation ,(delay expr))
+ x y))))
(define-markup-command (pad-around layout props amount arg)
(number? markup?)
}
@end lilypond"
(let* ((m (interpret-markup layout props arg))
- (x (ly:stencil-extent m X))
- (y (ly:stencil-extent m Y)))
- (ly:make-stencil (ly:stencil-expr m)
- (interval-widen x amount)
- (interval-widen y amount))))
+ (x (interval-widen (ly:stencil-extent m X) amount))
+ (y (interval-widen (ly:stencil-extent m Y) amount)))
+ (ly:stencil-add (make-transparent-box-stencil x y)
+ m)))
(define-markup-command (pad-x layout props amount arg)
(number? markup?)
(let* ((m (interpret-markup layout props arg))
(x (ly:stencil-extent m X))
(y (ly:stencil-extent m Y)))
- (ly:make-stencil "" x y)))
+ (ly:make-stencil (list 'transparent-stencil (ly:stencil-expr m)) x y)))
(define-markup-command (pad-to-box layout props x-ext y-ext arg)
(number-pair? number-pair? markup?)
}
}
@end lilypond"
- (let* ((m (interpret-markup layout props arg))
- (x (ly:stencil-extent m X))
- (y (ly:stencil-extent m Y)))
- (ly:make-stencil (ly:stencil-expr m)
- (interval-union x-ext x)
- (interval-union y-ext y))))
+ (ly:stencil-add (make-transparent-box-stencil x-ext y-ext)
+ (interpret-markup layout props arg)))
(define-markup-command (hcenter-in layout props length arg)
(number? markup?)
(if (eqv? direction DOWN)
(markup #:musicglyph "scripts.dfermata")
(markup #:musicglyph "scripts.ufermata"))))
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; translating.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(let* ((gauge-stencil (interpret-markup layout props gauge))
(x-ext (ly:stencil-extent gauge-stencil X))
(y-ext (ly:stencil-extent gauge-stencil Y)))
+ (ly:stencil-add
+ (make-transparent-box-stencil x-ext y-ext))
(ly:make-stencil
`(delay-stencil-evaluation
,(delay (ly:stencil-expr
rotate-stencil
scale-stencil
translate-stencil
+ transparent-stencil
))
(map ly:register-stencil-expression
(final-x (car result))
(stencils (cdr result)))
;; Add the horizontal line and combine all stencils:
- (box-stencil
- (apply ly:stencil-add
- (cons
- (make-line-stencil line-width 0 0 final-x 0)
- stencils))
- 0.0
- 0.0)))
+ (apply ly:stencil-add
+ (make-line-stencil line-width 0 0 final-x 0) ; the horizontal line
+ (make-transparent-box-stencil ; space for absent boxes
+ (cons 0 final-x)
+ (interval-widen '(0 . 0) (+ box-hheight dy)))
+ stencils)))
;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o and #\|
(define (harp-pedals-parse-string definition-string)
direction-polyphonic-grobs)
(list
(make-property-set 'graceSettings general-grace-settings)
- (make-grob-property-override 'NoteColumn 'horizontal-shift (quotient n 2))
- (make-grob-property-override 'MultiMeasureRest 'staff-position (if (odd? n) -4 4))))))
+ (make-grob-property-override 'NoteColumn 'horizontal-shift (quotient n 2))))))
(define-safe-public (make-voice-props-revert)
(make-sequential-music
(map (lambda (x) (make-grob-property-revert x 'direction))
direction-polyphonic-grobs)
(list (make-property-unset 'graceSettings)
- (make-grob-property-revert 'NoteColumn 'horizontal-shift)
- (make-grob-property-revert 'MultiMeasureRest 'staff-position)))))
+ (make-grob-property-revert 'NoteColumn 'horizontal-shift)))))
(define-safe-public (context-spec-music m context #:optional id)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ambitus
+;; Calculate the gaps between ambitus heads and ends of ambitus line.
+;; Start by determining desired length of the ambitus line (based on
+;; length-fraction property), calc gap from that and make sure that
+;; it doesn't exceed maximum allowed value.
+
+(define-public (ambitus-line::calc-gap grob)
+ (let ((heads (ly:grob-object grob 'note-heads)))
+
+ (if (and (ly:grob-array? heads)
+ (= (ly:grob-array-length heads) 2))
+ (let* ((common (ly:grob-common-refpoint-of-array grob heads Y))
+ (head-down (ly:grob-array-ref heads 0))
+ (head-up (ly:grob-array-ref heads 1))
+ (fraction (ly:grob-property grob 'length-fraction 0.7))
+ (max-gap (ly:grob-property grob 'maximum-gap 0.45))
+ ;; distance between noteheads:
+ (distance (- (interval-start (ly:grob-extent head-up common Y))
+ (interval-end (ly:grob-extent head-down common Y))))
+ (gap (* 0.5 distance (- 1 fraction))))
+
+ (min gap max-gap))
+ 0)))
+
+;; Print a line connecting ambitus heads:
+
(define-public (ambitus::print grob)
(let ((heads (ly:grob-object grob 'note-heads)))
(let* ((common (ly:grob-common-refpoint-of-array grob heads Y))
(head-down (ly:grob-array-ref heads 0))
(head-up (ly:grob-array-ref heads 1))
- (gap (ly:grob-property grob 'gap 0.35))
+ ;; The value used when 'gap' property cannot be read is small
+ ;; to make sure that ambitus of a fifth will have a visible line.
+ (gap (ly:grob-property grob 'gap 0.25))
(point-min (+ (interval-end (ly:grob-extent head-down common Y))
gap))
(point-max (- (interval-start (ly:grob-extent head-up common Y))
gap)))
- (if (< point-min point-max)
+ (if (< (+ point-min 0.1) point-max) ; don't print lines shorter than 0.1ss
(let* ((layout (ly:grob-layout grob))
(line-thick (ly:output-def-lookup layout 'line-thickness))
(blot (ly:output-def-lookup layout 'blot-diameter))
(interval-widen xext (/ width 2))
(interval-widen yext (/ width 2)))))
+(define-public (make-transparent-box-stencil xext yext)
+ "Make a transparent box."
+ (ly:make-stencil
+ (list 'transparent-stencil
+ (ly:stencil-expr (make-filled-box-stencil xext yext)))
+ xext yext))
(define-public (make-filled-box-stencil xext yext)
"Make a filled box."
$(outdir)/%.lo: $(outdir)/%.cc
$(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
-$(outdir)/%.cc: %.yy
- $(BISON) -o $@ $<
-
-$(outdir)/%.hh: %.yy
- $(BISON) -o $(subst .hh,-tmp.cc,$@) -d $<
- rm $(subst .hh,-tmp.cc,$@)
- mv $(subst .hh,-tmp.hh,$@) $@
+$(outdir)/%.cc $(outdir)/%.hh: %.yy
+ $(BISON) -d -o $(outdir)/$*.cc $<
$(outdir)/%.cc: %.ll
$(FLEX) -Cfe -p -p -o$@ $<
$(outdir)/%.lo: %.c
$(DO_LO_DEP) $(CC) -c $(ALL_CFLAGS) $(PIC_FLAGS) -o $@ $<
-$(outdir)/%.c: %.y
- $(BISON) $<
- mv $(*F).tab.c $@
-
-$(outdir)/%.h: %.y
- $(BISON) -d $<
- mv $(*F).tab.h $@
- rm -f $(*F).tab.c # if this happens in the wrong order it triggers recompile of the .cc file
+$(outdir)/%.c $(outdir)/%.h: %.y
+ $(BISON) -d -o $(outdir)/$*.c $<
$(outdir)/%.c: %.l
$(FLEX) -Cfe -p -p -o$@ $<