[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changing *displayed* barnumber
From: |
Urs Liska |
Subject: |
Changing *displayed* barnumber |
Date: |
Thu, 25 Feb 2016 12:35:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
Hi all,
I want to implement a function to display a modified barnumber in a box.
This is (can be) used in sketch edition to indicate that the barnumber
of the printed sketch doesn't match the one in the final composition.
This is what I came up with so far:
\version "2.19.37"
\layout {
\context {
\Score
\override BarNumber.break-visibility = ##(#t #t #t)
}
}
offsetBarnumber =
#(define-music-function (offset)(integer?)
#{
\override Score.BarNumber.stencil
= #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
#})
\relative g' {
\set Score.barNumberVisibility = #all-bar-numbers-visible
\bar ""
\repeat unfold 12 g4
\offsetBarnumber 2
\repeat unfold 12 g4
}
\offsetBarnumber will create the box.
But I don't have a clue how I can make the barnumber *print* a barnumber
that is offset by the argument. I do *not* want to change the
currentBarNumber as I would consider this semantically wrong.
Any hints or solutions appreciated
Thanks
Urs
PS: I don't seem to find how I can use the newer syntax for \override so
I don't have to use #{ #}
(override) is not defined so it must be some different approach
- Changing *displayed* barnumber,
Urs Liska <=