Hi,
I am notating a Jazz chart with chord symbols that uses slashes to indicate
single-beat repeats.
I have been using an approach that formats quarter note rests as slashes.
I don't recall where I got this code, but it defines a new ChordNamesRests
that allows this behavior.
The only part that doesn't work is that these chords get printed above
voltas,
and I would like them below, which is how regular ChordNames behave.
What do I need to do to get this ChordNamesRests to show up underneath
voltas?
\version "2.24.3"
\layout {
\context {
\type "Engraver_group"
\name ChordNamesRests
\description "Typesets chord names."
\consists "Output_property_engraver"
\consists "Separating_line_group_engraver"
\consists Chord_name_engraver \consists Current_chord_text_engraver
\consists "Rest_engraver"
noChordSymbol = ##f
\override VerticalAxisGroup.staff-staff-spacing = #'((padding . 1))
\override VerticalAxisGroup.remove-first = ##t
\override VerticalAxisGroup.remove-empty = ##t
}
\context { \Score \accepts ChordNamesRests }
}
% Macro to print single slash
rs = {
\once \override Rest.stencil = #ly:percent-repeat-interface::beat-slash
\once \override Rest.thickness = #0.28
\once \override Rest.slope = #1.7
\once \override Rest.extra-offset = #'(0 . 1)
r4
}
global = {
\repeat volta 2 {
s1
}
\alternative {
{ s1 }
{ s1 }
}
}
melody = \relative c'' { c2. a4 | f a g b | f d c2 }
chordContent = \chordmode {
c4 \rs \rs f | \rs \rs g:7 \rs || \rs g:7 c2
}
chordsNormal = \chordmode {
\set noChordSymbol = ##f
\chordContent
}
chordsRests = \new ChordNamesRests {
\chordmode {
\set chordChanges = ##f
\chordContent
}
}
% The normal ChordNames formats under volta
<<
\new ChordNames \transpose c c { \chordsNormal }
\new Staff {
<<
\global
\melody
>>
}
>>
% The new ChordNamesRests shows up above voltas
<<
\new ChordNames \transpose c c { \chordsRests }
\new Staff {
<<
\global
\melody
>>
}
>>
Thanks,
Elaine Alt
415 . 341 .4954 "*Confusion is
highly underrated*"
[email protected]
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-