[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printing bar numbers on every odd measure
From: |
-Eluze |
Subject: |
Re: printing bar numbers on every odd measure |
Date: |
Wed, 22 Sep 2010 03:45:42 -0700 (PDT) |
indeed - much nicer!
so you can put nearly everything in the layout block and keep the music part
"clean" except for the \bar "" in the beginning - and to suppress the first
bar number, just omit the \bar "" !
the code then could be:
\layout {
\context {
\Score
barNumberVisibility = #all-bar-numbers-visible
barNumberVisibility = #(lambda (n) (= (modulo n 2) 1))
\override BarNumber #'break-visibility = #all-visible
} }
\new Staff {
\bar ""
\repeat unfold 40 { c'4 c' c' c' }
}
now - will you modify the snippet or shall i try to do that?
cheers
Eluze
Alexander Kobel wrote:
>
> On 2010-09-22 12:06, Alexander Kobel wrote:
>> On 2010-09-22 11:47, -Eluze wrote:
>>>> On Tue, Sep 21, 2010 at 01:31:00PM -0700, -Eluze wrote:
>>>>> there is also this (quite hidden& undocumented, but working!):
>>>>>
>>>>> \override Score.BarNumber #'break-visibility = #end-of-line-invisible
>>>>> \set Score.barNumberVisibility = #(modulo-bar-number-visible 2 1 )
>>>
>>> added!
>>>
>>> however i didn't manage to build an example where also the very first
>>> barnumber is printed - this seems only to work when the
>>> currentBarNumber is
>>> explicitly set to>1
>
> Muah, still easier is the following (without the need to change
> Score.barNumberVisibility again after the first bar):
>
> %% from your mails and http://lsr.dsi.unimi.it/LSR/Item?id=504
> \score {
> \new Staff {
> %% The following are equivalent, but the second variant is more
> general:
> %% Change 2 to d in "(modulo n 2)" to show every d-th barnumber.
> %% E.g. with d=4, {1, 5, 9, 13, ...} will be shown.
>
> %% \set Score.barNumberVisibility = #(lambda (n) (odd? n))
> \set Score.barNumberVisibility = #(lambda (n) (= (modulo n 2) 1))
> \bar "" %% This is necessary for the first bar number to be printed.
> \repeat unfold 40 { c'4 c' c' c' }
> }
>
> \layout {
> \context {
> \Score
> \override BarNumber #'break-visibility = #end-of-line-invisible
> }
> }
> }
>
>
> Cheers,
> Alexander
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
--
View this message in context:
http://old.nabble.com/printing-bar-numbers-on-every-odd-measure-tp29772262p29778216.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
- printing bar numbers on every odd measure, Lia Zito, 2010/09/21
- Re: printing bar numbers on every odd measure, -Eluze, 2010/09/21
- Re: printing bar numbers on every odd measure, Graham Percival, 2010/09/21
- Re: printing bar numbers on every odd measure, -Eluze, 2010/09/22
- Re: printing bar numbers on every odd measure, Alexander Kobel, 2010/09/22
- Re: printing bar numbers on every odd measure, Alexander Kobel, 2010/09/22
- Re: printing bar numbers on every odd measure,
-Eluze <=
- Re: printing bar numbers on every odd measure, Alexander Kobel, 2010/09/22
- Re: printing bar numbers on every odd measure, -Eluze, 2010/09/22
- Re: printing bar numbers on every odd measure, Phil Holmes, 2010/09/23
- Re: printing bar numbers on every odd measure, eluze, 2010/09/24
- Re: printing bar numbers on every odd measure, Alexander Kobel, 2010/09/24
Re: printing bar numbers on every odd measure, Lia Zito, 2010/09/21