Am Freitag, 17. September 2010, 14:52:50 schrieb Han-Wen Nienhuys: > On Fri, Sep 17, 2010 at 7:48 AM, Reinhold Kainhofer > > <[email protected]> wrote: > > So, you think we should rather extend the parser to cater for that > > feature? (Or do you know any way to insert an event in simple_music > > without extending the parser?) > > I was thinking of inserting a zero duration music event, similar to > eg. barcheck, through an identifier.
Okay, I have now changed the code to use a new PartCombineForceEvent (had to add a dummy translator listener to the part-combine engraver to silence lilypond) New patch is up at: http://codereview.appspot.com/1698054/ My only problem now is that when I add definitions like (so that one can also force other types than the pre-defined ones): partcombineForce = #(define-music-function (location parser type once) (symbol? boolean?) ....) partcombineApart = \partcombineForce #'apart ##f partcombineApartOnce = \partcombineForce #'apart ##t then processing a file containing some part-combine overrides, I often get a warning (not all the time, seems to depend on the music structure...): warning: Two simultaneous part-combine events, junking this one warning: Previous part-combine event here Strangely, it does not happen when I define partcombineApart etc. as #(define (make-part-combine-force type once) (make-music 'EventChord 'elements (list (make-music 'PartCombineForceEvent 'forced-type type 'once once)))) partcombineApart = #(define-music-function (parser location) () (make-part-combine-force 'apart #f)) Any idea what the difference between these two definitions are? And the other small issue I have: Is there any way to let a music-function take a symbol (the forced part-combine strategy) or ##f (to revert to automatic part-combination) as argument? That would let me combine the partcombineAutomatic and partcombineApart etc. definitions to one single definition. Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
