[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-bug
Subject:    Re: grob::rhythmic-location and \set Score.currentBarNumber
From:       David Kastrup <dak () gnu ! org>
Date:       2019-09-30 10:43:46
Message-ID: 87ftkef4il.fsf () fencepost ! gnu ! org
[Download RAW message or body]

"Urs Liska" <lists@openlilylib.org> writes:

> 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?

No.  rhythmic-location uses internalBarNumber in order to get unique and
sortable results.

-- 
David Kastrup

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic