bell notificationshomepageloginNewPostedit profiledmBox

Hoots : LilyPond vertical spacing, alternate endings, and chords I am typesetting a score that contains alternate endings on a volta repeat, as well as chords (using LilyPond 2.17.97). By default, the following MWE: song = - freshhoot.com

10% popularity   0 Reactions

LilyPond vertical spacing, alternate endings, and chords
I am typesetting a score that contains alternate endings on a volta repeat, as well as chords (using LilyPond 2.17.97). By default, the following MWE:

song = {
repeat volta 2 {
a1
}
alternative {
{ a }
{ b }
}

bar "|."
}

harmonies = chordmode {
a1 b c
}

score {
<<
new ChordNames {
set chordChanges = ##t
set noChordSymbol = ##f
harmonies
}
new Staff = "melody" relative c'' {
clef treble
key a major
time 4/4

song
}
>>
layout {}
}

renders:

This looks bad to me; the alternate ending lines being so far above the staff is confusing and makes your eye glance over them. Using the following tweaks I can place the chords over the ending marks:

song = {
repeat volta 2 {
a1 a1 a1 break a1
}
alternative {
{ a }
{ b }
}

bar "|."
}

harmonies = chordmode {
a1 b c d e f
}

score {
<<
new ChordNames {
set chordChanges = ##t
set noChordSymbol = ##f
harmonies
}
new Staff = "melody" with {
% Ensure that the chords are printed over the volta
consists "Volta_engraver"
}{
relative c'' {
clef treble
key a major
time 4/4

song
}
}
>>
layout {
context {
Score
remove "Volta_engraver"
}
}
}

which produces (extra notes / break added to illustrate the problem):

The alternate endings look alright now, but the chords before the alternate endings on the second line are way above the staff and have a lot of whitespace around them.

What is the usual way to solve this problem in published scores and how can I implement it in LilyPond? Would one simply move the chords that aren't above alternative endings closer to the staff (that also seems like it would look bad to me since the chords would no longer all be inline vertically)?


Load Full (1)

Login to follow hoots

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

Try

song = {
repeat volta 2 {
a1
}
alternative {
{ a }
{ b }
}

bar "|."
}

harmonies = chordmode {
a1 b c
}

score {
<<
new Staff = "melody" with { accepts ChordNames } <<
new ChordNames {
set chordChanges = ##t
set noChordSymbol = ##f
override ChordName.outside-staff-priority = #1100
override ChordName.direction = #UP
harmonies
}
relative c'' {
clef treble
key a major
time 4/4

song
}
>>
>>
}


Back to top Use Dark theme