On 6/2/10 5:28 AM, "Mike Solomon" <mike...@ufl.edu> wrote: > Hey lilypond developers, > I am toying around with a new spanner, and before it prints, I need to > do some calculations on all of its broken_intos_. I can easily do these > calculations in the print function by accessing the broken_into_ of > spanner->original (), but then this calculation is done for each time print > is called, which is N-1 times too many (where N is the length of > broken_into_). The code works just fine, but it is overkill: is there a way > to perform operations on a spanner and its broken_into_'s once before the > print function is called?
You could decrease the calculation time by setting a flag in the original spanner (e.g. calculation_done_) and skip the calculation if it had been done. Somebody else will probably have a better idea. Thanks, Carl _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel