On Mar 22, 2011, at 7:22 PM, n.putt...@gmail.com wrote: > On 2011/03/20 12:00:34, MikeSol wrote: >> This is now fully functional. >> The only issue is that, for auto-beams, I don't have a good method yet > for >> keeping note-heads that are part of the beam out of the covered grobs > list. >> This is doable, though - I just have to think of the cleanest way. > > Before you attempt that, can you think of a cleaner way to implement the > basic functionality which doesn't involve creating a dummy grob? > > Cheers, > Neil
OK, idea: In the auto beam engraver, every time a beam is created, a variable called timestep_ticker_ gets reset to 0 and increments by +1 for every timestep passed until the beam is completed (or junked if the beam is junked). This is stashed as an internal property called "timesteps-spanned." Then, in the beam collision engraver, there is a vector<vector<Grob *> *> called covered_grobs_queue_ that stores vectors of all acknowledged grobs (clefs, note-heads, accidentals, etc.) for a given timestep (with an empty vector being assigned for a acknowledged-grobless timestep). This vector is cleared at every barline (w/ appropriate deletes for the pointers to vectors). When an autobeam is completed (which we'll know because it will be announced during the same timestep as its end-grob), we look at the property timesteps-spanned and iterate through covered_grobs_queue_ starting from covered_grobs_queue_.size () - timesteps_spanned to the end, adding its contents to the grob array covered-grobs. Does this seem like a good idea? It'd need some tweaking to deal w/ covered interior grobs & to avoid code dups, but I think it's clean. Cheers, Mike _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel