[Top][All Lists]

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

Re: Stanzas over staves

From: Partitura Organum
Subject: Re: Stanzas over staves
Date: Wed, 18 Apr 2018 23:20:36 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 18-4-2018 20:26, Helge Kruse wrote:
Am 18.04.2018 um 12:39 schrieb Engraver:
I use "with-dimensions" if I want to place some text over staves. And
"\whiteout" can be used to blot out the staff-lines. See attached.
It's rather hackish, so I hope the more knowledgeable members of the
list have a more elegant solution for you.
This is one approach I would follow.
Since this repeats I would like to put this to a scheme construct. But I
don't have sufficient knowledge. Here is my (failed) try:

\version "2.19.65"

narrator =
#(define-music-function (dim text) (integer? string?)
       \with-dimensions #'(0 . dim) #'(0 . 0)
       \override #'(line-width . dim)
       \translate #'(0 . -1.5)
       \wordwrap {  text }

\score {
   \narrator #1  "The message"

It looks like the parameter 'dim' can't be used in this way to build a
valid parameter to with-dimension. Is this true? How to do it correctly?

How could I pass 'dim+2' to the override of line-width?


lilypond-user mailing list

My scheme knowledge is very very limited. I just found out one can construct a pair in a scheme function like this:

   #(cons a b)

where a and b are the values. So for your function "narrator", this would become:

   \with-dimensions #(cons 0 dim)  #'(0 . 0)

I am however lost how to make "\override #'(line-width . dim)" work inside this scheme-function.


reply via email to

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