Oops, some typos. Here a corrected algorithm version.
Here's the algorithm.
For a given moment,
(1) count the number of \startGroup and \stopGroup events and push the
events onto a stack so that they can be referenced later on
(function `listen_note_grouping'),
(2) create a HorizontalBracket spanner for every \startGroup event and
link it as necessary (function `process_music'),
(3) set one boundary for every element of the HorizontalBracket stack
(function `acknowledge_note_column'),
(4) [my code addition] check whether there is a \stopGroup within a
bunch of \startGroup's (or a single \startGroup within a bunch of
\stopGroup's) and set the other boundary with the same values to
create a single-moment horizontal bracket for this case (function
`acknowledge_note_column'),
(5) pop an element off the HorizontalBracket stack for every
\stopGroup event (function `stop_translation_timestep').
Werner
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user