Hi everyone, I'm producing some music that uses some custom headers as well as chord names above the staff. Sometimes the chord names are a little too close to the headers for my liking, and I'd like a way to add more padding above the chord names when necessary.
Because of the custom headers, it seems like I can't just add a \markup \vspace before the score (also this score is the second on the page, so that just adds more space between the two scores, not after the headers.) I've fiddled around with the ChordName VerticalAxisGroup, but there doesn't seem to be a property I can tweak that will create more space between them and the headers. I've included a little example (somewhat lengthy - my apologies), does anyone have any suggestions for how to create more distance between the headers and the chord names? Any help much appreciated, Brent.
#(define-markup-command (column-right-up layout props args) (markup-list?) #:properties ((baseline-skip)) (let* ((lines (wordwrap-internal-markup-list layout props #f args)) (right-aligned-lines (map (lambda (stil) (ly:stencil-aligned-to stil X RIGHT)) lines))) (stack-lines UP 0.0 baseline-skip (reverse right-aligned-lines)))) #(define-markup-command (number-fromproperty layout props digits symbol) (index? symbol?) (let ((n (chain-assoc-get symbol props))) (if (index? n) (interpret-markup layout props (number->string n)) empty-stencil))) #(define-markup-command (wordwrap-right-field layout props symbol) (symbol?) (let* ((m (chain-assoc-get symbol props))) (if (markup-list? m) (column-right-up-markup layout props m) empty-stencil)))
chordnames-padding.pdf
Description: Adobe PDF document
\version "2.22.1" \include "heading-code.txt" globalB = { \key d \major \time 4/4 %\partial 2 \numericTimeSignature } \paper { indent = 0 print-all-headers = ##t scoreTitleMarkup = \markup \overlay { %% Only to demonstrate aligning to baseline, delete me! \translate #'(0 . -0.1) %\draw-hline \fill-line { \line { \fontsize #7 \number-fromproperty #3 #'header:piece-nr \hspace #1 \normal-text \large \fromproperty #'header:piece-title \hspace #2 \normal-text \large \fromproperty #'header:piece-meter } \italic \small %% probably: \override #'(baseline-skip . 2.5) \override #'(line-width . 30) \wordwrap-right-field #'header:infotext } } } theChordsB = \chords { d2 b:m g:6 d d fis:m b4:m7 e:7 a2 d/fis g/b g:6 e:m a:7/cis d a4:sus4 a d2 } rightOneAltB = \relative c'' { \globalB a4 fis e d e e fis2 a4 d cis a a gis a2 d4 a g fis e fis g2 g4 a fis d d cis d2 \bar "|." } rightTwoAltB = \relative c' { \globalB fis2 b, b a fis' cis d cis d d b b a1 a2 a \bar "|." } leftTwoAltB = \relative c { \globalB d2 b g d' d fis b,4 e a,2 fis b g e' cis d a d \bar "|." } \markup \vspace #0.1 \score { \header { piece-title = \markup \bold \italic "Three-part setting" infotext = \markuplist { "L.G. Hayne 1836-1883 1863" } } \new PianoStaff << \new ChordNames \theChordsB \new Staff = "right" << \rightOneAltB \\ \rightTwoAltB >> \new Staff = "left" { \clef bass \leftTwoAltB } >> \layout { \context { \Score \omit BarNumber } \context { \ChordNames \override ChordName.font-size = #-1 } } }