Hi Paul,

> 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.

Here’s a way hacking volta repeats:

%%%  SNIPPET BEGINS
\version "2.25.24"

\layout {
  system-count = 3
}

altBNs = {
  \set Score.alternativeNumberingStyle = #'numbers-with-letters
  \set Score.startRepeatBarType = "|"
  \set Score.endRepeatBarType = "|"
}
regBNs = {
  \unset Score.alternativeNumberingStyle
  \undo \omit Score.VoltaBracket
  \set Score.startRepeatBarType = ".|:"
  \set Score.endRepeatBarType = ":|."
}

music = \relative c' {
  \override Score.BarNumber.break-visibility = ##(#f #t #t)
  \set Score.currentBarNumber = #46
  c4 d e f
  c4 d e f |
  \altBNs
  \repeat volta 5 {
    { c4 d e f }
    \omit Score.VoltaBracket
    \set Score.currentBarNumber = #48
    \alternative {
      { c4 d e f }
      { c4 d e f }
      { c4 d e f }
      { c4 d e f }
      { c4 d e f }
    }
  }
  \regBNs
  c1
  \repeat volta 2 {
    c1
    \alternative {
      { c1 }
      { c1 }
    }
  }
  c1 \bar "|."
}

{ \music }
%%%  SNIPPET ENDS

Not perfect by any stretch, but better than my first hack!  :)

Even this one can be automated further [by having the function “subdivide” the 
music by measure and do the alternative-setting automatically]… I just haven’t 
had the time to figure out the right incantation.

> 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.

Maybe submit a feature request? This seems like something that Someone Smart™ 
(David, Tina, Jean, Lukas, etc.) could do fairly easily, if they felt inspired 
to do so.

In the meantime, I’ll see if I can up my Scheme-fu enough to build a 
fully-automated music function or engraver that will do the job for you.

Best,
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.


Reply via email to