[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom bar count
From: |
Aaron Hill |
Subject: |
Re: Custom bar count |
Date: |
Tue, 06 Apr 2021 22:48:31 -0700 |
User-agent: |
Roundcube Webmail/1.4.9 |
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
bar-num.cropped.png
Description: PNG image