lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global alignment tweak for ChordName


From: Aaron Hill
Subject: Re: global alignment tweak for ChordName
Date: Tue, 21 Dec 2021 10:56:39 -0800
User-agent: Roundcube Webmail/1.4.9

On 2021-12-21 10:30 am, Kieren MacMillan wrote:
and am once again in need this ChordName alignment feature. Is anyone
out there able to shepherd me through building a callback to make this
happen?

I've used something like this in the past:

%%%%
\version "2.22.0"

music = \chordmode {
  \override ChordName.X-offset =
  #(lambda (grob)
    (let* ((sten (ly:grob-property grob 'stencil))
           (xex (ly:stencil-extent sten X))
           (width (interval-length xex)))
     (* -0.5 (max 0 (- width 2)))))

  c1 c:7 c:m7 c':m6/ees
}
<< \new ChordNames \music \new Staff \music >>
%%%%


-- Aaron Hill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]