Valentin Villenave skrev:
OK, it's corrected.
Sorry for the noise.
The snippet did not work with grace notes. (Am I the only one who think
that the representation of grace timing is a bit messy?)
Try with this:
%%% BEGIN %%%
increaseBarNumber = \applyContext
#(lambda (x)
(let ((measurepos (ly:context-property x 'measurePosition)))
; Only increase bar number if not at start of measure.
; This way we ensure that you won't increase bar number twice
; if two parallel voices call increaseBarNumber simultanously:
(if (< 0 (ly:moment-main-numerator measurepos)) ; ugh. ignore grace part
(begin
(ly:context-set-property!
(ly:context-property-where-defined x 'internalBarNumber)
'internalBarNumber
(1+ (ly:context-property x 'internalBarNumber)))
(ly:context-set-property!
(ly:context-property-where-defined x 'currentBarNumber)
'currentBarNumber
(1+ (ly:context-property x 'currentBarNumber)))
; set main part of measurepos to zero, leave grace part as it is:
(ly:context-set-property!
(ly:context-property-where-defined x 'measurePosition)
'measurePosition
(ly:make-moment 0 1
(ly:moment-grace-numerator measurepos)
(ly:moment-grace-denominator measurepos)))))))
hardbar = {
\bar "|"
\increaseBarNumber
}
{
\new Staff \with { \remove Time_signature_engraver } {
\cadenzaOn
#(set-accidental-style 'modern-cautionary)
\key a \major
\repeat unfold 2 {
c'8 dis' eis' eis' \hardbar
c'4 dis' e' eis' \hardbar
c' dis' eis'8 dis' eis' \hardbar
c'1 dis' eis' eis'2 \hardbar
}
}
}
%%% END %%%
A funny detail: to find your snippet in the database, all I have to
do is enter the term: "yeah" :)
:-)
-Rune
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user