Sorry for the top-posting.
Thank you, Kieren.
That's exactly the code I'm working with (which I probably got from you
originally).
I was able to modify some of it to:
setF = {
\temporary \override Score.BarNumber.stencil =
#(lambda (grob)
(let ((text (ly:grob-property grob 'text)))
(grob-interpret-markup grob
#{ \markup F #})))
}
To get a single bar-letter but as you mention in the original post the
challenge is automating it.
If I could get the answer to the question in this thread I could at
least simplify the code and maybe have a complete solution.
It's interesting that numbers-with-letters was added to Lily without
bar-letters.
I would also like to be able to make the letters in numbers-with-letters
upper case.
I play woodwinds in shows and often need to modify existing parts.
Be well,
Paul
On 12/22/25 7:48 AM, Kieren MacMillan wrote:
Hi all,
Trying to learn a little more programming for Lily:
How do I make "A" in the following type stencil?
setA = { \temporary \override Score.BarNumber.stencil = "A" }
This will lead to writing setLetter to identify bars with letters instead of
numbers as is done in musical theater when music is modified without changing
the bar numbers of measures that stay the same.
Ideally this is a feature request like 'numbers-with-letters .
Do you mean rehearsal marks? Look that up, and just change the default. Note
that there are two letter versions, one with an I, and one without.
I believe the OP means measure numbers that might go 1, 2, 3, 3A, 3B, 3C, 4, 5,
etc.
There’s a thread here that might help:
https://lists.gnu.org/archive/html/lilypond-user/2024-12/msg00235.html
I had the intention of making some better syntactic sugar for all of that, but
haven’t gotten around to it yet.
<sigh>
Hope the reference helps, anyway!
Kieren
__________________________________________________
My work day may look different than your work day. Please do not feel obligated
to read or respond to this email outside of your normal working hours.