Hi Everyone, I'd be very grateful if someone could look into this with me. Last night I noticed that my old friend \increaseBarNumber and \nibar aren't behaving as they once did. In my example, shouldn't the 2nd and the 3rd lines look identical?
Thank you very much in advance. Adam %%% EXAMPLE \version "2.24.0" %% increaseBarNumber increaseBarNumber = \applyContext #(lambda (x) (let ((measurepos (ly:context-property x 'measurePosition))) (if (< 0 (ly:moment-main-numerator measurepos)) (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))) (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))))))) %% nibar nibar = #(define-music-function (x) (string?) #{ \bar $x \increaseBarNumber #}) \score { \new Staff \relative c' { \key c \major \numericTimeSignature \time 8/4 c4 d e f g a b c c b a g f e d c \break %\time 8/4 c4 d e f \bar "!" g a b c c b a g f e d c \break %\time 8/4 c4 d e f \nibar "!" g a b c c b a g f e d c } }