lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let \time in mid-measure work without warning in some cases (issue 1


From: dak
Subject: Re: Let \time in mid-measure work without warning in some cases (issue 143450043 by address@hidden)
Date: Sun, 28 Sep 2014 06:33:12 +0000


https://codereview.appspot.com/143450043/diff/60001/lily/time-signature-engraver.cc
File lily/time-signature-engraver.cc (right):

https://codereview.appspot.com/143450043/diff/60001/lily/time-signature-engraver.cc#newcode102
lily/time-signature-engraver.cc:102: if (!(scm_is_bool (partialBusy) &&
scm_is_true (partialBusy)))
if (!to_boolean (get_property ("partialBusy")))
is the standard way we check for boolean properties.

https://codereview.appspot.com/143450043/diff/60001/lily/time-signature-engraver.cc#newcode104
lily/time-signature-engraver.cc:104: time_signature_->warning (_f
("\\time without \\partial amid measure %d",
On 2014/09/28 04:12:57, Dan Eble wrote:
Is there an easy way to make this warning cite the position of \time
in the
source file?

This is not going to make you happy:

When the cause argument of time_signature_ at creation time is set to
the originating stream event, this should happen automatically.

You don't have the cause argument of time_signature_ available, however,
since the Time_signature_engraver answers to events.

So you'll need to reverse your logic: make-time-signature-set will have
to set something like midTimeMusic to the music creating the time
signature when in midmeasure, partial will -- no, partial is an
iterator, it has no stop_translation_timestep.

Maybe the Time_signature_engraver should listen to time signature events
(possibly TimeSignatureMusic would need to get the additional type
"event" in define-music-types.scm for this to work, but I'm not sure).
Then it could just remember and use the last event (if any) for the
cause of creating the time_signature_ grob.

That would have the side effect of making \tweak work on \time, probably
not the worst idea anyway.

Uh, to answer your question: easy way: probably not really.  But if you
make an extra issue "Make \tweak work on \time", your current code will
magically create the warning pointing to the source as a side effect.

https://codereview.appspot.com/143450043/diff/60001/lily/time-signature-engraver.cc#newcode123
lily/time-signature-engraver.cc:123: "implicitTimeSignatureVisibility "
partialBusy is missing in the list of read properties.

https://codereview.appspot.com/143450043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]