lilypond-user
[Top][All Lists]
Advanced

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

Re: Text above chord names - continued.


From: Thomas Morley
Subject: Re: Text above chord names - continued.
Date: Thu, 29 May 2014 12:52:54 +0200

2014-05-29 12:50 GMT+02:00 Thomas Morley <address@hidden>:
> Hi,
>
> 2014-05-29 10:08 GMT+02:00 Lars-Johan Liman <address@hidden>:
>> Hi!
>>
>> My trusty friend Google found me a useful code snippet by Thomas Morley
>> (Many thanks, Thomas!) in this message:
>
> Glad that it is still useful
>
>>
>> https://www.mail-archive.com/address@hidden/msg86850.html
>>
>> 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? ;-)
>
> Well, the function takes a markup-argument.
> You could insert \with-dimensions ...
> see below
> Drawback is, that it may cause collisions.
>
>>
>> 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
>>         #{
>>            \markup
>>              \override #'(direction . 1)
>>              \dir-column { $(ly:grob-property grob 'text) #mrkp }
>>         #}))
>> #})
>>
>> <<
>> \new ChordNames \chordmode {
>>     \addMarkup \markup \italic "Solo second time"
>
>
>     \addMarkup
>       \markup \with-dimensions #'(0 . 0) #'(-1 . 1) \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
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> Cheers,
>   taitinger

Ooops, roflmao
That's another alias of mine ...

Cheers,
  Harm



reply via email to

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