[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bar Numbers With Letters
From: |
Kieren MacMillan |
Subject: |
Re: Bar Numbers With Letters |
Date: |
Tue, 24 Dec 2024 07:50:14 -0500 |
Hi Steph,
> I'm looking for how to set some bar numbers in my score to have letters.
> For example:
> 46, 47, 48, 48A, 48B, 48C, 49, etc...
> I've been looking at the documentation and I see how to achieve this for
> \repeat'ed bars, but this is just sequential music and so the example in the
> documentation doesn't really apply here.
Well, you could always abuse repeats… ;)
%%% SNIPPET BEGINS
\version "2.23.82"
music = \relative c' {
\override Score.BarNumber.break-visibility = ##(#t #t #t)
\set Score.alternativeNumberingStyle = #'numbers-with-letters
\set Score.currentBarNumber = #46
c4 d e f |
c4 d e f
%% temporarily suppress VoltaBracket
\temporary \omit Score.VoltaBracket
\repeat volta 4 {
%% override the default repeat-begin barline
\bar "|"
%% here’s the un-lettered measure
c4 d e f |
%% rewind bar number!
\set Score.currentBarNumber = #48
%% abuse alternatives to generate lettered measures
\alternative {
\volta 1 { c4 d e f \bar "|" }
\volta 2 { d4 e f g \bar "|" }
\volta 3 { e4 f g a \bar "|" }
}}
%% reset so subsequent repeats display as expected
\undo \omit Score.VoltaBracket
c1 \bar "|."
}
{ \music }
%%% SNIPPET ENDS
I’m sure there’s a way by just overriding regular measure numbers — I just
wanted to see if I could do it this way! LOL
Hope that helps,
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.