|
From: | Gabriel Borin |
Subject: | Re: Custom bar count |
Date: | Wed, 7 Apr 2021 06:38:26 -0500 |
On 2021-04-06 9:02 pm, Gabriel Borin wrote:
> Hello,
>
> I am working on a part based on a manuscript. The arranger took many
> liberties on bar count, and since I am just replacing one lost part, I
> need
> to do 2 things:
>
> - I need the bar count to start at measure 7 (basically, mm.7 = 1).
> - I need to exclude a single bar in the middle from the bar count.
>
> Could anybody give me some advice on that?
You can \set the currentBarNumber as you need to. Additionally, you
could use a function as follows to skip a particular number of bars if
you do not easily know what the bar number should be:
%%%%
\version "2.22.0"
skipBarNumbers =
#(define-music-function
(count) (integer?)
(define (proc context)
(ly:context-set-property! context 'currentBarNumber
(+ count (ly:context-property context 'currentBarNumber))))
#{ \context Score \applyContext #proc #})
{
\override Score.BarNumber.break-visibility = #all-visible
\set Score.currentBarNumber = 7
R1*3 \bar "||" \skipBarNumbers 3 R1*2
}
%%%%
-- Aaron Hill
[Prev in Thread] | Current Thread | [Next in Thread] |