[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Most popular French users request : bar numbering of alternatives
From: |
Thomas Morley |
Subject: |
Re: Most popular French users request : bar numbering of alternatives |
Date: |
Tue, 29 Nov 2011 02:19:35 +0100 |
Hi,
2011/11/28 Alexander Kobel <address@hidden>
> On 2011-11-28 09:44, Colin Hall wrote:
>
>>
>> On Mon, Nov 28, 2011 at 01:04:06AM +0100, Xavier Scheuer wrote:
>>
>>> Dear LilyPond developers,
>>>
>>> Dear Bug Squad members, could you add this enhancement request to
>>> the tracker? Thanks!
>>>
>>> This is by far the most popular enhancement request from the French
>>> users mailing list: Bar numbering of repeat volta _alternatives_.
>>>
>>> Currently LilyPond counts the measures of each "alternative" as
>>> normal, unrepeated, measures hence incrementing the currentBarNumber
>>> in both alternative "1." and "2.". Several references supports what is
>>> actually asked by many users: bar numbering of alternatives should not
>>> be counted twice.
>>>
>>
>> Thanks, Xavier. Added to the tracker as issue 2059:
>>
>> http://code.google.com/p/**lilypond/issues/detail?id=2059<http://code.google.com/p/lilypond/issues/detail?id=2059>
>>
>
> Looks like a duplicate of
>
> http://code.google.com/p/**lilypond/issues/detail?id=785<http://code.google.com/p/lilypond/issues/detail?id=785>
> with some additional links...
>
>
> Best,
> Alexander
>
>
> ______________________________**_________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/**listinfo/lilypond-user<https://lists.gnu.org/mailman/listinfo/lilypond-user>
>
some helpful definitions: addtobarnumber by Jakob Lund
http://web.archiveorange.com/archive/v/nRTVViDHBezWgfouZMtk
and altBarNumber (can't rmember where I found it)
\version "2.15.20"
#(define (alt-bar-number BarNumber)
"Append a to the bar number."
(let* (
; Set barNumber to the current value
(barNumber (ly:grob-property BarNumber 'text))
; Append "a" to it
(bisBarNumber (string-append barNumber "a" )))
; Store the new value back
(ly:grob-set-property! BarNumber 'text bisBarNumber))
; and print it
(ly:text-interface::print BarNumber))
altBarNumber = \once \override Score.BarNumber #'stencil = #alt-bar-number
addtobarnumber = #(define-music-function (P L m) (integer?)
#{
\applyContext
#(lambda (voice)
(let ((staff (ly:context-property-where-defined voice
'currentBarNumber))
(n (ly:context-property voice 'currentBarNumber)))
(ly:context-set-property! staff 'currentBarNumber
;; with "2.14.2" use:
;; (+ $m n)
(+ m n)
)))
#})
%----- test
\relative c' {
\override Score.BarNumber #'break-visibility = #'#(#t #t #t)
\repeat volta 2 {
c1 |
c1 |
c1 |
}
\alternative {
{
c1 |
}
{ \addtobarnumber #-1
\altBarNumber
c1 |
}
}
c1 |
c1 |
}
Cordialement,
Harm