bug-lilypond
[Top][All Lists]
Advanced

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

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


From: Urs Liska
Subject: Re: grob::rhythmic-location and \set Score.currentBarNumber
Date: Mon, 30 Sep 2019 12:04:13 +0000

30. September 2019 13:09, "David Kastrup" <address@hidden> schrieb:

> Urs Liska <address@hidden> writes:
> 
>> Am 30. September 2019 12:43:46 MESZ schrieb David Kastrup <address@hidden>:
>>> "Urs Liska" <address@hidden> 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



reply via email to

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