On Wed, Jun 18, 2008 at 10:26 PM, Neil Puttock <[EMAIL PROTECTED]> wrote: > 2008/6/12 Han-Wen Nienhuys <[EMAIL PROTECTED]>: > >> the inefficiency of computing things twice is not that important. I'm >> a bit more concerned with duplication of logic, if there is any. Can >> you fold things together into a common function? > > As it stands the only duplication would be the code for checking the > bar number, so that could quite easily be folded into a common > function. > >> I think there are a >> couple more utility functions for contexts/engravers, so you could add >> to that. > > Do you mean something like the functions in general-scheme.cc? >
no, context.hh:Moment measure_position (Context const *context); context.hh:Rational measure_length (Context const *context); > Of course, it would be desirable for the accidental behaviour for > pitched trills to follow that of normal accidentals (excepting the > 'natural-always-visible' rule); but that would require a much more > complicated rewrite of both engravers. ok. >> it should happen automatically if you set force-accidental on the >> corresponding music event in the parser. > > Well, I can see that force-accidental is set on the trill pitch in the > parser, but the stumbling block is that there's no music event passed > by the parser for a pitched trill - as far as my limited scheme > knowledge goes, it appears that the \pitchedTrill function filters out > the trill-span-event from the main note, then adds the trill pitch to > the list, which the Pitched_trill_engraver notices. > > I've tried reading the force-accidental property from the music event, > then adding it to the trill-span-event list, but it causes a segfault. > :( That's strange; can you show the code for that? As far as I can see, you should be extracting force-accidental from the secondary-note and set that property in the place where you set the trill-pitch property. Then the property reaches the engraver in the same way that the trill-pitch does. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel