lilypond-user
[Top][All Lists]
Advanced

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

Re: Stanzas over staves


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

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:

%%START
\version "2.19.65"

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


\score {
  \narrator #1  "The message"
}
%%END

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?

Regards,
Helge



reply via email to

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