By default, LilyPond should do exactly what you ask for, except that each Staff has a preset minimal size. If you want your chords to be even closer to te stave as long as the melody stays within the stave lines, then you should decrease the setting of Staff.minimumVerticalExtent. Leave the verticalExtent property unset, since it prevents LilyPond from doing what you want.
/Mats
Walter Hofmeister wrote:
Hello, I am engraving a solo guitar arrangement of a traditional folk tune that has chord symbols above the music staff. The problem is that when the melody goes higher on the staff, more space is required between the staff and the chord names. But when the melody is not so high, then you end up with too much space between the staff and the chord names. I would like to be able to set the height of the chord names to be a different space for each line of music if necessary. A setting like padding would do the trick but if there is one I have missed it in the documentation. I have used \set Staff.verticalExtent = #'(-4 . 7) which has worked well. I tried to use several of these tweaks on different lines of music but always the one which produces the highest space is the one that seems to prevail. Does any one have an idea how this could be accomplished? I have included the lilypond source file here as an example. Also there is a bar numbering problem in the second section of the piece probably caused by the two partial measures. Any suggestions as to how to fix this? TIA
Walter Hofmeister P.S. I am using 2.1.28 on Mac OS X.3.3
-----------------File begins here----------------------------------------
\version "2.1.22" \include "english.ly" \header { %dedication = "dedication" title = "Roslyn Castle" %subtitle = "Subtitle" %subsubtitle = "Subsubtitle" composer = "Traditional Scottish" %opus = "Opus 0" %piece = "Piece I" %instrument = "Instrument" %arranger = "Arranger" %poet = "Poet" %texttranslator = "Translator" copyright = "public domain" %source = "urtext " enteredby = "Walter Hofmeister" %maintainerEmail = "your email here" %texidoc = "The standard header that ought to be in top of a file." tagline = "Public Domain" }
harmonies = \chords { \override ChordName #'font-family =#'roman \time 4/4 \partial 8*2 s8*2 e2:m g | a2:m b:7 | e1:m | b1:7 | %5 a2:m b:7 | e2:m b | e4:m b e:m a:m | e4:m b:7 e2:m | \set chordChanges = ##f e1:m | %10 a2:m b:7 | e1:m | a2:m b:7 | a2:m b:7 | e2:m b | %15 e4:m b e:m a:m | e4:m b:7 e4:m | }
melody = \notes \relative c'' {
\voiceOne
\time 4/4
\key e \minor
\clef treble
\repeat volta 2 {
\partial 8*2
g8 fs
<e b>4 b'8 c <b d, g b,>4 a8 b
<c e, a>8[ b] a[ g] fs4 g8 fs
<e b>4 e'8 fs <g b, g>4 fs8 e | \break
<ds a fs>8[ e] fs[ ds] <b a ds,>4 a8 b
%5 <c a e>8[ b] a[ g] fs4 g8 a
<b g e b>8[ g] fs[ e] <ds' a fs>4 e8 fs \break
<g b, g e b>16 e8. <fs ds a fs>16 ds8. <e b g>8[ b] <a e>[ b]
%\partial4*3
<g e>4 fs8 e <e b>4
}
\repeat volta 2 {
%\partial8*2
e8 b'
<e b g e b>4 <e b g>8 fs <g b, g e b>4 <fs b, g>8 e \break
%10
<b' e, c a>8[ a] g[ a] <fs ds a fs>4 e8 ds
<e b g e b>4 <e b g>8 fs <g b, g e b>4 <fs b, g>8 e
<b' e, c a>8[ a] g[ a] <fs ds a fs>4 a,8 b \break
<c a e>8[ b] a[ g] fs4 g8 a
<b g e b>8[ g] fs[ e] <ds' b fs>4 e8 fs
%15
<g b, g e b>8[ e] <fs ds a fs>[ ds] <e b g>[ b] <a e>[ b]
\partial4*3
<g e>4 fs8 e <e b>4 %\bar "|."
}
}
bassNotes = \notes \relative c' { \voiceTwo \time 4/4 \partial8*2 s8*2 | e,2 g | a2 b | e,2 e' | b2 b | %5 a2 b | e,2 b' | e,4 b' e a, | \partial4*3 b4 b e, \partial8*2 s8*2 e8 b' e4 e,8 e' ~ e4 | a,2 b | %10 e,8 b' e4 e,8 e' ~ e4 | a,2 b | a2 b | e,2 b' | e,4 b' e a, | \partial4*3 b4 b e, | }
\score {
\notes <<
\context ChordNames {
\override ChordName #'font-size =#'-1
\set chordChanges = ##t
\harmonies
}
\context Staff = one <<
\context Voice = one \melody
\context Voice = two \bassNotes
>>
\set Staff.verticalExtent = #'(-4 . 7)
\set Staff.minimumVerticalExtent = #'(-6 . 4.5)
>>
\paper{ } \midi{ } }
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
-- ============================================= Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user