@code{side-position-interface} and the nearest other object (generally
the note or the staff lines); @code{staff-padding} applies only to
those objects which are always set outside the staff -- it controls
-the minimum amount of space that should be inserted between that
-object and the staff. Note that @code{staff-padding} has no effect on
-objects which are positioned relative to the note rather than the
+the minimum distance from the staff to the outside-staff object.
+Note that @code{staff-padding} has no effect on
+objects that are positioned relative to the note rather than the
staff, even though it may be overridden without error for such objects
-- it is simply ignored.
@cindex objects, aligning on a baseline
@code{staff-padding} can be used to align objects such as dynamics
-along a baseline at a fixed height above the staff, rather than at a
-height dependent on the position of the note to which they are
-attached. It is not a property of @code{DynamicText} but of
+along a baseline at a fixed distance from the staff, when no other
+notation forces them further from the staff.
+It is not a property of @code{DynamicText} but of
@code{DynamicLineSpanner}. This is because the baseline should apply
equally to @strong{all} dynamics, including those created as extended
spanners. So this is the way to align the dynamic marks in the
@cindex staff-padding property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
-\dynamicUp
-% Extend width by 1 unit
-\override DynamicText.extra-spacing-width = #'(-0.5 . 0.5)
-% Align dynamics to a base line 2 units above staff
-\override DynamicLineSpanner.staff-padding = #2
-a4\f b\mf a\mp b\p
+\override DynamicLineSpanner.staff-padding = #3
+a4\f b\mf a\p b\mp
@end lilypond
\new Staff = "up" {
\voiceOne
% Make space for fingering in the cross-staff voice
- \once\override DynamicLineSpanner.staff-padding = #3.4
+ \once\override DynamicLineSpanner.staff-padding = #4
e''2\p\< d''\>
c''1\!
}
@item @code{ChordNames} @tab baseline
@item @code{NoteNames} @tab baseline
@item @code{Lyrics} @tab baseline
-@item @code{Dynamics} @tab vertical center
+@item @code{Dynamics} @tab mid-height of @q{m}
@item @code{FiguredBass} @tab highest point
@item @code{FretBoards} @tab top line
@end multitable
\new Lyrics { \lyrics { \skip 1*2 | ghijk1 | } }
>>
-%% The reference point for Dynamics is its vertical center
+%% The reference point for Dynamics is the midline of 'm' in the font
<<
\new RhythmicStaff {
- \set RhythmicStaff.instrumentName = #"vertical center "
+ \set RhythmicStaff.instrumentName = #"mid-height "
\labelContext "Dynamics" s1*3
}
\new Dynamics { s1\mp s\fp }
-%% 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"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.27
+\version "2.17.27"
\header {
lsrtags = "contemporary-notation, expressive-marks, symbols-and-glyphs"
texidoc = "
In order to make parts of a crescendo hairpin invisible, the following
method is used: A white rectangle is drawn on top of the respective
-part of the crescendo hairpin, making it invisible. The rectangle is
-defined as postscript code within a text markup.
-
-To fine-tune the position and size of the markup, the number preceding
-@code{setgray} in the postscript definition can be set to a value less
-than one, making it grey. The two numbers before @code{scale} in the
-postscript code are responsible for the width and height of the
-rectangle, the two numbers before @code{translate} change the x- and
-y-origin of the rectangle.
+part of the crescendo hairpin, making it invisible.
+The markup command @code{with-dimensions} tells LilyPond to consider only
+the bottom edge of the rectangle when spacing it against the hairpin.
+The property @code{staff-padding} prevents the rectangle from fitting
+between the hairpin and staff.
Make sure to put the hairpin in a lower layer than the text markup to
draw the rectangle over the hairpin.
<<
{
\dynamicUp
- \override DynamicLineSpanner.staff-padding = #4
r2 r16 c'8.\pp r4
}
\\
\override DynamicLineSpanner.layer = #0
des,2\mf\< ~
\override TextScript.layer = #2
- des16_\markup {
- \postscript #"
- 1.9 -8 translate
- 5 4 scale
- 1 setgray
- 0 0 moveto
- 0 1 lineto
- 1 1 lineto
- 1 0 lineto
- 0 0 lineto
- fill"
- }
+ \once\override TextScript.staff-padding = #6
+ \once\override TextScript.vertical-skylines = #'()
+ des16_\markup \with-dimensions #'(2 . 7) #'(0 . 0)
+ \with-color #white
+ \filled-box #'(2 . 7) #'(0 . 2) #0
r8. des4 ~ des16->\sff
}
>>
-%% 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"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.27
+\version "2.17.27"
\header {
lsrtags = "headword"
\key g \major
\time 6/8
\partial 2
- \once \override TextScript.staff-padding = #2
+ \once \override TextScript.padding = #2
d'8 \staccato
^ \markup { \column {
RONDO
--- /dev/null
+\version "2.17.27"
+
+\header {
+ lsrtags = "contemporary-notation, expressive-marks, symbols-and-glyphs"
+
+ texidoc = "
+In order to make parts of a crescendo hairpin invisible, the following
+method is used: A white rectangle is drawn on top of the respective
+part of the crescendo hairpin, making it invisible.
+
+The markup command @code{with-dimensions} tells LilyPond to consider only
+the bottom edge of the rectangle when spacing it against the hairpin.
+The property @code{staff-padding} prevents the rectangle from fitting
+between the hairpin and staff.
+
+Make sure to put the hairpin in a lower layer than the text markup to
+draw the rectangle over the hairpin.
+
+"
+ doctitle = "Broken Crescendo Hairpin"
+}
+
+\relative c' {
+ <<
+ {
+ \dynamicUp
+ r2 r16 c'8.\pp r4
+ }
+ \\
+ {
+ \override DynamicLineSpanner.layer = #0
+ des,2\mf\< ~
+ \override TextScript.layer = #2
+ \once\override TextScript.staff-padding = #6
+ \once\override TextScript.vertical-skylines = #'()
+ des16_\markup \with-dimensions #'(2 . 7) #'(0 . 0)
+ \with-color #white
+ \filled-box #'(2 . 7) #'(0 . 2) #0
+ r8. des4 ~ des16->\sff
+ }
+ >>
+}
--- /dev/null
+\version "2.17.27"
+
+\header {
+ lsrtags = "headword"
+
+ texidoc = "
+Expressive headword
+
+"
+ doctitle = "Expressive headword"
+}
+\include "english.ly"
+
+% NR 1.3 Expressive marks
+
+% L. v. Beethoven, Op. 49 no. 1
+% Piano sonata 19 - "Leichte Sonate"
+% measures 1 - 12
+
+%\layout {
+% \context {
+% \Score
+% \override SpacingSpanner.base-shortest-duration =
+% #(ly:make-moment 1/20)
+% }
+%}
+
+\new PianoStaff <<
+
+ % RH Staff
+ \new Staff {
+ \clef treble
+ \key g \major
+ \time 6/8
+ \partial 2
+ \once \override TextScript.padding = #2
+ d'8 \staccato
+ ^ \markup { \column {
+ RONDO
+ \italic Allegro } }
+ d'8 \staccato
+ g'8 \staccato
+ a'8 \staccato
+
+ |
+
+ b'8 [ (
+ g'8 ] )
+ e'8 \staccato
+ e' \staccato
+ a'8 \staccato
+ b'8 \staccato
+
+ |
+
+ c''8 [ (
+ a'8 ] )
+ e''8 \staccato
+ d''8 \staccato
+ c''8 \staccato
+ b'8 \staccato
+
+ |
+
+ a'8 \staccato
+ g'8 \staccato
+ a'8 \staccato
+ \acciaccatura { g'16 [ a'16 ] }
+ bf'8
+ a'8 \staccato
+ g'8 \staccato
+
+ |
+
+ fs'8 [ (
+ d'8 ] )
+ d'8 \staccato
+ d'8 \staccato
+ g'8 \staccato
+ a'8 \staccato
+
+ |
+
+ b'8 [ (
+ g'8 ] )
+ e'8 \staccato
+ e'8 \staccato
+ a'8 \staccato
+ b'8 \staccato
+
+ |
+
+ c''8 [ (
+ a'8 ] )
+ e''8 \staccato
+ d''8 \staccato
+ c''8 \staccato
+ b'8 \staccato
+
+ |
+
+ a'8 \staccato
+ g'8 \staccato
+ a'8 \staccato
+ <<
+ {
+ \voiceOne
+ d'8
+ g'8
+ fs'8
+ \oneVoice
+ }
+ \new Voice {
+ \voiceTwo
+ d'4
+ c'8
+ \oneVoice
+ }
+ >>
+
+ |
+
+ <b g'>4 \tenuto
+ d'8 \staccato
+ g'8 \staccato
+ b'8 \staccato
+ d''8 \staccato
+
+ |
+
+ d''8 (
+ <c'' a'>8 \staccato )
+ <c'' a'>8 \staccato
+ d''8 (
+ <b' g'>8 \staccato )
+ <b' g'>8 \staccato
+
+ |
+
+ d''8 (
+ <c'' a'>8 \staccato )
+ <c'' a'>8 \staccato
+ d''8 (
+ <b' g'>8 \staccato )
+ <b' g'>8 \staccato
+
+ |
+
+ d''8 \staccato
+ <c'' a'>8 \staccato
+ <b' g'>8 \staccato
+ d'' \staccato
+ <c'' a'>8 \staccato
+ <b' g'>8 \staccato
+
+ |
+
+ <d'' c'' a'>4 \fermata
+ r8 r4 r8
+ }
+
+ % LH Staff
+ \new Staff {
+ \clef bass
+ \key g \major
+ \time 6/8
+ \partial 2
+ r8
+ r8
+ <d' b>8 \staccato
+ <c' a>8 \staccato
+
+ |
+
+ <b g>4
+ r8
+ r8
+ <e' c'>8 \staccato
+ <d' b>8 \staccato
+
+ |
+
+ <c' a>4
+ r8
+ r8
+ <a fs>8 \staccato
+ <b g>8 \staccato
+
+ |
+
+ <c' a>8 \staccato
+ <b d'>8 \staccato
+ <e' c'>8 \staccato
+ <e' cs'>4. (
+
+ |
+
+ d'4 )
+ r8
+ r8
+ <d' b!>8 \staccato
+ <c'! a>8 \staccato
+
+ |
+
+ <b g>4
+ r8
+ r8
+ <e' c'>8 \staccato
+ <d' b>8 \staccato
+
+ |
+
+ <c' a>4
+ r8
+ r8
+ <a fs>8 \staccato
+ <b g>8 \staccato
+
+ |
+
+ <c' a>8 \staccato
+ <d' b>8 \staccato
+ <e' c'>8 \staccato
+ <b d>4
+ <a d>8 \staccato
+
+ |
+
+ <g g,>4 \tenuto
+ r8
+ r4
+ r8
+
+ |
+
+ r8
+ <d' fs>8 \staccato
+ <d' fs>8 \staccato
+ r8
+ <d' g>8 \staccato
+ <d' g>8 \staccato
+
+ |
+
+ r8
+ <d' fs>8 \staccato
+ <d' fs>8 \staccato
+ r8
+ <d' g>8 \staccato
+ <d' g>8 \staccato
+
+ |
+
+ r8
+ <d' fs>8 \staccato
+ <d' g>8 \staccato
+ r8
+ <d' fs>8 \staccato
+ <d' g>8 \staccato
+
+ |
+
+ <d' fs>4 \fermata
+ r8 r4 r8
+ }
+
+>>
--- /dev/null
+\version "2.17.27"
+
+\header {
+ lsrtags = "headword"
+
+ texidoc = "
+Piches headword
+
+"
+ doctitle = "Pitches headword"
+}
+% L. v. Beethoven
+% Piano sonata 21 - Dem Grafen von Waldstein Gewidmet
+% chorale at measures 34 - 40+
+
+\include "english.ly"
+
+\new PianoStaff <<
+
+ % RH Staff
+ \new Staff <<
+
+ % RH Voice 1
+ \new Voice {
+ \set Score.currentBarNumber = #34
+ \voiceOne
+ gs''2 ( ^ \markup \italic { dolce e molto ligato }
+ fs''4
+ e''4
+ |
+ ds''2
+ cs''2 )
+ |
+ ds''2 (
+ e''4
+ fs''4
+ |
+ <gs'' e''>2
+ <fs'' ds''>2 )
+ |
+ \oneVoice
+ \clef bass
+ <gs' e' b>2 (
+ <fs' ds' a>4
+ <e' cs' gs>4
+ |
+ <ds' bs fs>2
+ <cs' a e>2 )
+ |
+ \voiceOne
+ b2 %(
+ cs'4
+ ds'4
+ |
+ \clef treble
+ <e' gs>4 %)
+ r4 r2
+ }
+
+ % RH Voice 2
+ \new Voice {
+ \voiceTwo
+ \override Staff.DynamicLineSpanner.staff-padding = #3
+ <e'' b'>2 \p
+ <ds'' a'>4
+ <cs'' gs'>4
+ |
+ <bs' fs'>2
+ e'2
+ |
+ <b'! a'>2 -\tweak #'style #'none \cresc
+ b'4
+ <e'' cs''>4
+ |
+ b'2. ( \sf \>
+ a'4 )
+ \clef bass
+ | \break
+ s1 \p
+ |
+ s1
+ |
+ <gs e>4 (
+ <a fs>2. )
+ |
+ s4
+ r4 r2
+ }
+
+ >>
+
+ % LH Staff
+ \new Staff {
+ \override Staff.SustainPedalLineSpanner.staff-padding = #6
+ <gs' e'>2 ( \sustainOn
+ <fs' ds' b>4 \sustainOff
+ <e' cs'>4
+ |
+ <ds' bs gs>2
+ <cs' a>2 ) \sustainOn
+ |
+ \clef bass
+ \slurDown
+ <ds' b! a fs>2 ( \sustainOff
+ <e' b gs>4
+ <fs' cs' a>4 \sustainOn
+ |
+ \clef treble
+ \voiceOne
+ <<
+ {
+ <gs' e'>2
+ <fs' ds'>2 )
+ }
+ \new Voice {
+ \voiceTwo
+ b1 \sustainOff
+ }
+ >>
+ \oneVoice
+ |
+ %\break
+ \clef bass
+ <gs e>2 (
+ <fs ds b,>4
+ <e cs>4
+ |
+ <ds bs, gs,>2
+ <cs a,>2 ) \sustainOn
+ |
+ <b,! b,,!>1 ( \sustainOff
+ |
+ <e e,>4 )
+ r4 r2
+ }
+
+>>
--- /dev/null
+\version "2.17.27"
+
+\header {
+ lsrtags = "spacing, tweaks-and-overrides, workaround"
+
+ texidoc = "
+All @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
+placed with their reference line at least @code{'staff-padding} from
+the staff, unless other notation forces them to be farther.
+Setting @code{'staff-padding} to a sufficiently large value aligns the
+dynamics.
+
+The same idea, together with @code{\\textLengthOn}, is used to align
+the text scripts along their baseline.
+
+"
+ doctitle = "Vertically aligned dynamics and textscripts"
+}
+\markup \vspace #1 %avoid LSR-bug
+
+music = \relative c' {
+ a'2\p b\f
+ e4\p f\f\> g, b\p
+ c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
+}
+
+{
+ \music
+ \break
+ \override DynamicLineSpanner.staff-padding = #3
+ \textLengthOn
+ \override TextScript.staff-padding = #1
+ \music
+}
-%% 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"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.27
+\version "2.17.27"
\header {
lsrtags = "headword"
% RH Voice 2
\new Voice {
\voiceTwo
- \override Staff.DynamicLineSpanner.staff-padding = #2.5
+ \override Staff.DynamicLineSpanner.staff-padding = #3
<e'' b'>2 \p
<ds'' a'>4
<cs'' gs'>4
<bs' fs'>2
e'2
|
- \once \override TextScript.staff-padding = #2.5
- <b'! a'>2 _ \markup \italic { cresc. }
+ <b'! a'>2 -\tweak #'style #'none \cresc
b'4
<e'' cs''>4
|
% LH Staff
\new Staff {
- \override Staff.SustainPedalLineSpanner.staff-padding = #5
+ \override Staff.SustainPedalLineSpanner.staff-padding = #6
<gs' e'>2 ( \sustainOn
<fs' ds' b>4 \sustainOff
<e' cs'>4
-%% 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"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.27
+\version "2.17.27"
\header {
lsrtags = "spacing, tweaks-and-overrides, workaround"
texidoc = "
-By setting the @code{'Y-extent} property to a suitable value, all
-@code{DynamicLineSpanner} objects (hairpins and dynamic texts) can be
-aligned to a common reference point, regardless of their actual extent.
-This way, every element will be vertically aligned, thus producing a
-more pleasing output.
+All @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
+placed with their reference line at least @code{'staff-padding} from
+the staff, unless other notation forces them to be farther.
+Setting @code{'staff-padding} to a sufficiently large value aligns the
+dynamics.
The same idea, together with @code{\\textLengthOn}, is used to align
the text scripts along their baseline.
{
\music
\break
- \override DynamicLineSpanner.staff-padding = #2.0
- \override DynamicLineSpanner.Y-extent = #'(-1.5 . 1.5)
+ \override DynamicLineSpanner.staff-padding = #3
\textLengthOn
- \override TextScript.Y-extent = #'(-1.5 . 1.5)
+ \override TextScript.staff-padding = #1
\music
}