@menu
* Tweaking basics::
* The Internals Reference manual::
-* Appearance of objects::
+* Appearance of objects::
* Placement of objects::
* Collisions of objects::
* Further tweaking::
@menu
* Visibility and color of objects::
-* Size of objects::
-* Length and thickness of objects::
+* Size of objects::
+* Length and thickness of objects::
@end menu
@node Visibility and color of objects
Let's now see how the properties in the previous section can
help to resolve overlapping notation.
-@c FIXME: formatting
-@subheading @code{padding}
+@subheading padding property
@cindex padding property
The @code{padding} property can be set to increase
If the @code{padding} property of an object is increased when that
object is in a stack of objects being positioned according to
-their @code{outside-staff-priority}, then that object and all
+their @code{outside-staff-priority}, then that object and all
objects outside it are moved.
-
-@subheading @code{left-padding} and @code{right-padding}
+
+@subheading left-padding and right-padding
@cindex left-padding property
@cindex right-padding property
@end lilypond
-@subheading force-hshift property
-@cindex force-hshift property
-@c FIXME: formatting stuff (ie not important right now IMO)
-@c @a nchor Chopin finally corrected TODOgp
-
-We can now see how to apply the final corrections to the Chopin
-example introduced at the end of @ref{I'm hearing Voices}, which
-was left looking like this:
-
-@lilypond[quote,verbatim,fragment,ragged-right]
-\new Staff \relative c'' {
- \key aes \major
- <<
- { c2 aes4. bes8 } \\
- { aes2 f4 fes } \\
- { \voiceFour
- <ees c>2
- des2
- }
- >> |
- <c ees aes c>1 |
-}
-@end lilypond
-
-@noindent
-The lower two notes of the first chord (i.e,
-those in the third voice) should not be shifted away from the
-note column of the higher two notes. To correct this we set
-@code{force-hshift}, which is a property of
-@code{NoteColumn}, of these notes to zero.
-The lower note of the second chord is best placed just to the
-right of the higher notes. We achieve this by setting
-@code{force-hshift} of this note to 0.5, ie half a note head's
-width to the right of the note column of the higher notes.
-
-Here's the final result:
-
-@lilypond[quote,verbatim,fragment,ragged-right]
-\new Staff \relative c'' {
- \key aes \major
- <<
- { c2 aes4. bes8 } \\
- { aes2 f4 fes } \\
- { \voiceFour
- \once \override NoteColumn #'force-hshift = #0 <ees c>2
- \once \override NoteColumn #'force-hshift = #0.5 des2
- }
- >> |
- <c ees aes c>1 |
-}
-@end lilypond
-
-
@subheading positions property
@cindex positions property
@end lilypond
@noindent
-This can only be resolved by manually moving both ends of the beam
+This can be resolved by manually moving both ends of the beam
up from their position at 2 staff-spaces above the center line to,
say, 3:
the second block of quavers, but not to any of the beams in the
second voice.
+@subheading force-hshift property
+@cindex force-hshift property
+@c FIXME: formatting stuff (ie not important right now IMO)
+@c @a nchor Chopin finally corrected TODOgp
+
+We can now see how to apply the final corrections to the Chopin
+example introduced at the end of @ref{I'm hearing Voices}, which
+was left looking like this:
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+\new Staff \relative c'' {
+ \key aes \major
+ <<
+ { c2 aes4. bes8 } \\
+ { aes2 f4 fes } \\
+ { \voiceFour
+ <ees c>2
+ des2
+ }
+ >> |
+ <c ees aes c>1 |
+}
+@end lilypond
+
+@noindent
+The lower two notes of the first chord (i.e,
+those in the third voice) should not be shifted away from the
+note column of the higher two notes. To correct this we set
+@code{force-hshift}, which is a property of
+@code{NoteColumn}, of these notes to zero.
+The lower note of the second chord is best placed just to the
+right of the higher notes. We achieve this by setting
+@code{force-hshift} of this note to 0.5, ie half a note head's
+width to the right of the note column of the higher notes.
+
+Here's the final result:
+
+@lilypond[quote,verbatim,fragment,ragged-right]
+\new Staff \relative c'' {
+ \key aes \major
+ <<
+ { c2 aes4. bes8 } \\
+ { aes2 f4 fes } \\
+ { \voiceFour
+ \once \override NoteColumn #'force-hshift = #0 <ees c>2
+ \once \override NoteColumn #'force-hshift = #0.5 des2
+ }
+ >> |
+ <c ees aes c>1 |
+}
+@end lilypond
+
+
@node Real music example
@subsection Real music example
@section Further tweaking
@menu
-* Other uses for tweaks::
-* Using variables for tweaks::
-* Other sources of information::
-* Advanced tweaks with Scheme::
-* Avoiding tweaks with slower processing::
+* Other uses for tweaks::
+* Using variables for tweaks::
+* Other sources of information::
+* Advanced tweaks with Scheme::
+* Avoiding tweaks with slower processing::
@end menu
@node Other uses for tweaks
@subheading Tying notes across voices
The following example demonstrates how to connect notes in
-different voices using ties. Normally, ties can be used to
-only to connect two notes in the same voice. By introducing
-a tie in a different voice,
+different voices using ties. Normally, only two notes in the
+same voice can be connected with ties. By using two voices,
+with the tied notes in one of them
@lilypond[quote,fragment,relative=2]
-<< {
- b8~ b8\noBeam
-} \\ {
- b[ g8]
-} >>
+<< { b8~ b8\noBeam }
+\\ { b[ g8] }
+>>
@end lilypond
@noindent
cross voices:
@lilypond[quote,fragment,relative=2,verbatim]
-<< {
- \once \override Stem #'transparent = ##t
- b8~ b8\noBeam
-} \\ {
- b[ g8]
-} >>
+<<
+ {
+ \once \override Stem #'transparent = ##t
+ b8~ b8\noBeam
+ }
+\\
+ { b[ g8] }
+>>
@end lilypond
To make sure that the just-blanked stem doesn't squeeze the tie
-too much, we can also lengthen the stem, by setting the
+too much, we can lengthen the stem by setting the
@code{length} to @code{8},
@lilypond[quote,fragment,relative=2,verbatim]
-<< {
- \once \override Stem #'transparent = ##t
- \once \override Stem #'length = #8
- b8~ b8\noBeam
-} \\ {
- b[ g8]
-} >>
+<<
+ {
+ \once \override Stem #'transparent = ##t
+ \once \override Stem #'length = #8
+ b8~ b8\noBeam
+ }
+\\
+ { b[ g8] }
+>>
@end lilypond
@item
For example, if we wished to change the metronome setting in order
to simulate a fermata in the MIDI output we would not want the
-metronome marking to appear in the printed output, and we would
+metronome markings to appear in the printed output, and we would
not want it to influence the spacing between the two systems or
the spacing of the notes on the staff. So setting its
@code{stencil} property to @code{#f} would be the best way.
We show here the effect of the two methods:
-@lilypond[quote,verbatim]
+@lilypond[quote,verbatim,ragged-right]
\score {
\relative c'' {
% Visible tempo marking
@subsection Other sources of information
The Internals Reference documentation contains a lot of information
-about LilyPond, but even more information can be gathered from
+about LilyPond, but even more information can be gathered by
looking at the internal LilyPond files. To explore these, first
find the directory appropriate to your system, as follows:
@itemize
-@item Linux:
+@item Linux
+
Navigate to
@file{@var{installdir}/lilypond/usr/share/lilypond/current/}
-@item OSX:
+@item OSX
+
Navigate to
-@file{@var{installdir}/LilyPond.app/Contents/Resources/share/lilypond/current/}.
+@file{@var{installdir}/LilyPond.app/Contents/Resources/share/lilypond/current/}
by either @code{cd}-ing into this directory from the
-Terminal, or control-clicking on the LilyPond application and
+Terminal, or control-clicking on the LilyPond application and
selecting @q{Show Package Contents}.
-@item Windows:
+@item Windows
+
Using Windows Explorer, navigate to
@file{@var{installdir}/LilyPond/usr/share/lilypond/current/}
@itemize
-@item @file{../ly/} - contains files in LilyPond format
+@item @file{../ly/ } - contains files in LilyPond format
@item @file{../scm/} - contains files in Scheme format
Open @file{../ly/property-init.ly} in a text editor. The one
you normally use for @code{.ly} files will be fine. This file
contains the definitions of all the standard LilyPond built-in
-commands -- like @code{\stemUp} and @code{\slurDotted}. You will
+commands, such as @code{\stemUp} and @code{\slurDotted}. You will
see that these are nothing more than definitions of variables
containing one or a group of @code{\override} commands. For
example, @code{/tieDotted} is defined to be:
be redefined easily, just like any other variable, at the
head of your input file.
-These are the most useful files to be found in @file{../ly/}:
+The following are the most useful files to be found in
+@file{../ly/}:
@multitable @columnfractions .4 .6
@headitem Filename
@item @file{../ly/performer-init.ly}
@tab Definitions of performer Contexts
@item @file{../ly/property-init.ly}
- @tab Definitions of all common macros
+ @tab Definitions of all common built-in commands
@end multitable
Other settings (such as the definitions of markup commands) are
is currently outside the scope of this manual, as a knowledge of
the Scheme language is required. Users should be warned that
a substantial amount of technical knowledge or time is required
-to understand Scheme and these files.
+to understand Scheme and these files (see @ref{Scheme tutorial}).
If you have this knowledge, the Scheme files which may be of
interest are:
@subsection Avoiding tweaks with slower processing
LilyPond can perform extra checks while it processes files. These
-commands will take extra time, but the result may require fewer
-manual tweaks.
+checks will take extra time to perform, but fewer manual tweaks
+may be required to obtain an acceptable result. If a text script
+or part of the lyrics extends over the margins these checks will
+compress that line of the score just enough to fit within the
+margins.
-@example
-%% makes sure text scripts and lyrics are within the paper margins
-\override Score.PaperColumn #'keep-inside-line = ##t
-\override Score.NonMusicalPaperColumn #'keep-inside-line = ##t
-@end example
-
-In some cases (see issue 246), this must be done before
-@code{\override} commands can be processed.
+To be effective under all circumstances these checks must be enabled
+by placing the overrides in a Score @code{\with} block, rather than
+in-line in music, as follows:
@verbatim
\new Score \with {
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
- } {
+ % Makes sure text scripts and lyrics are within the paper margins
+ \override PaperColumn #'keep-inside-line = ##t
+ \override NonMusicalPaperColumn #'keep-inside-line = ##t
+} {
..
}
@end verbatim
+