bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grob::rhythmic-location and \set Score.currentBarNumber


From: Urs Liska
Subject: grob::rhythmic-location and \set Score.currentBarNumber
Date: Mon, 30 Sep 2019 09:59:58 +0000

Hi all,

I use the grob::rhythmic-location function to determine the measure position of 
a given grob in a score (in the scholarLY annotation engraver). However, if the 
measure counter is modified using \set Score.currentBarNumber this change is 
not reflected in the result of grob::rhythmic-location.

\version "2.19.82"

{
  \override Score.BarNumber.break-visibility = ##(#t #t #t)
  \override NoteHead.after-line-breaking = 
  #(lambda (grob)
     (ly:message "Location: ~a" (grob::rhythmic-location grob)))
  c'1
  \set Score.currentBarNumber = 12
  c'1
}

This prints

Location: (1 . #<Mom 0>)
Location: (2 . #<Mom 0>)

instead of 

Location: (1 . #<Mom 0>)
Location: (12 . #<Mom 0>)

Is this a bug with grob::rhythmic-location?
Is this due to some wrong use of mine (e.g. can this information only be 
retrieved properly at some other point in the compilation process)?
Or is there some internal offset in the measure counter (I mean: does LilyPond 
internally count the "real" rhythmic-location and applies an offset for 
printing barnumbers) that I can read out somewhere?

Thanks
Urs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]