Am 11.09.2012 20:48, schrieb m...@mikesolomon.org:
On 11 sept. 2012, at 17:48, Marc Hohl <m...@hohlart.de> wrote:

Hello list,

for my work on the volta bracket inclusion for the new bar line interface,
I need to know how the bars are ordered in (ly:grob-object grob 'bars).

Please see the attached file.

For the \musOne, I get a grob array with eight BarLine grobs
(two for each staff) for the first volta bracket (and one for
the second volta bracket, of course):

|------volta------|
<BarLine> <BarLine>
<BarLine> <BarLine>
<BarLine> <BarLine>
<BarLine> <BarLine>


For \musTwo, I get a grob array consisting of eight BarLine grobs
(because the bracket spans eight bars in a single line) and a second
one for the second volta bracket.

|-------------------------------------volta-----------------------------------|
<BarLine> <BarLine> <BarLine> <BarLine> <BarLine> <BarLine> <BarLine> <BarLine>


Is there any chance to get to know how the grobs are arranged?
Or more formally: how can I get the 2D structure back from a 1D vector?

Thanks in advance,

Marc

<shortvoltatest.ly>_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel
You can use Grob::get_vertical_axis_group_index (you'd have to write a Scheme 
binding).

This seems to do the trick, at least I get values from 0 to 3 in the case of \musOne,
which is very promising!

Thanks for the tip!

Marc
   Or sort the list it based on ly:grob::vertical-less? (that binding is 
already written).

Cheers,
MS




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

Reply via email to