[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix 524 (pitched trill accidental forgetfulness)
From: |
Neil Puttock |
Subject: |
Re: [PATCH] Fix 524 (pitched trill accidental forgetfulness) |
Date: |
Wed, 18 Jun 2008 21:26:33 +0100 |
2008/6/12 Han-Wen Nienhuys <address@hidden>:
> 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?
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.
> 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.
:(
Regards,
Neil