[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:       "Urs Liska" <lists () openlilylib ! org>
Date:       2019-09-30 12:04:13
Message-ID: 4ab338b7ca3c656636d8c8dd03a1dd8d () openlilylib ! org
[Download RAW message or body]

30. September 2019 13:09, "David Kastrup" <dak@gnu.org> schrieb:

> Urs Liska <lists@openlilylib.org> writes:
> 
> > Am 30. September 2019 12:43:46 MESZ schrieb David Kastrup <dak@gnu.org>:
> > > "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.
> > 
> > ...
> > 
> > Is this a bug with grob::rhythmic-location?
> > > No. rhythmic-location uses internalBarNumber in order to get unique
> > > and
> > > sortable results.
> > 
> > Ok, I see.
> > 
> > How do I get the "current" bar number then, the one printed as barnumber?
> 
> It's not recorded in general grobs. If you say you need in in
> scholarLy, it sounds like a bar number subject to repetition and gaps is
> not particularly useful for identification purposes anyway.

Well, there may be two different applications for the barnumer in play here. An \
annotation includes a reference to the position, so it can say "in m. 23, 3rd beat, \
violin2" - and that measure is expected to be the measure that will also be printed \
rather than an internal counter. But even if the grobs themselves only record that \
"natural" position I can't imagine there's no way to get to the barnumber of a given \
note column (maybe that's better than a grob itself) as seen by \
Score.currentBarNumber and printed by the bar number engraver.

Urs

_______________________________________________
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