lilypond-user
[Top][All Lists]
Advanced

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

Re: write text next to the staff


From: Ben
Subject: Re: write text next to the staff
Date: Thu, 19 Oct 2017 06:17:58 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/19/2017 4:22 AM, Gianmaria Lari wrote:
Is there any simple way to write some text on the right of the staff? Like in the attached image.

Thank you, g.



Hi G,

I came across this code a while back on another website and it worked for what you're asking.
So I saved it for a rainy day... :)

Here it is:
(see attached)

\version "2.19.65"


barlineMarkup = \markup {
  \whiteout
  \pad-around #1
  \vcenter
  \column {
    "Some text I want"
    "next to the score"
  }
}

customBarLine = {
  \once \override Staff.BarLine #'stencil =
  #(lambda (grob)
     (ly:stencil-combine-at-edge
      (ly:bar-line::print grob)
      X RIGHT
      (grob-interpret-markup grob barlineMarkup)
      0))
}

{
  \override Score.BarLine.layer = 1
  c' d' e' c' \customBarLine \bar "|."
}

Attachment: textscore.png
Description: PNG image


reply via email to

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