[Top][All Lists]

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

Text above chord names - continued.

From: Lars-Johan Liman
Subject: Text above chord names - continued.
Date: Thu, 29 May 2014 10:08:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)


My trusty friend Google found me a useful code snippet by Thomas Morley
(Many thanks, Thomas!) in this message:

to put text above the chord names. It's almost perfect. The one drawback
I've found is that is "pushes" the next note to the end of the text. So
if the text is of any length, a noticeable "gap" appears in the notes
below. I'm not deep enough into Lilypond yet to figure out a fix for
this on my own. Is anyone else intrigued enough to spend a few cycles on
finding a solution? (Thomas? ;-)

Here's an example that makes it very obvious:

\version "2.18.0"

addMarkup =
#(define-music-function (parser location mrkp)(markup?)
  \once \override ChordName.before-line-breaking =
    #(lambda (grob)
      (ly:grob-set-property! grob 'text
             \override #'(direction . 1)
             \dir-column { $(ly:grob-property grob 'text) #mrkp }

\new ChordNames \chordmode {
    \addMarkup \markup \italic "Solo second time"
    a b c:7 d:m5- | a b c:7 d:m5- |
\new Staff {
    \clef treble
    \key c \major
    \time 4/4
    a' b' c'' d'' | a' b' c'' d'' |

                                Best regards,
                                  /Lars-Johan Liman

reply via email to

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