Hi Tina,
Am 28.09.26 um 18:19 schrieb Tina Petzel:
I haven't looked at the source, but I think I can answer this one: To do
this, one needs a convenient way to schedule a previously unused time step
for the translation cycle. That used to be missing in the Scheme world, but
(following a hint from Jean) I addedly:context-schedule-moment a few years
ago, which I expect Tina has used now.
Simply greping the file for `ly:context-schedule-moment` should tell you, yes,
it does!
Please forgive my laziness - grepping for a source line is not something
I'm used to doing on my phone on a bus ride. :-)
We still assume that there will be a timestep at measure start (which I
think generally is, then takes all specified bar positions for the measure and
schedules them.
Yes, I think it's safe to assume this, even if the user neglects to put
a rhythmic event at the beginning of each bar:
\version "2.27.2"
\layout {
\context {
\Score
\consists
#(lambda (ctx)
(make-engraver
((start-translation-timestep engraver)
(ly:message "Moment: ~a" (ly:context-current-moment ctx)))))
}
}
{
c'\breve
R1*3
}
displays
Moment: #<Mom 1>
Moment: #<Mom 2>
Moment: #<Mom 3>
Moment: #<Mom 4>
Moment: #<Mom 5>
I think this is ensured by the stop-translation-timestep hook of the
Timing_translator, if I read the C++ source correctly (something I'm
always struggling with):
constautomp
= from_scm (get_property (this, "measurePosition"), Moment (0))
.main_part_;
Rational barleft = 0;
if(mp < 0)
barleft = -mp;
else
barleft = measure_length (context ()) - mp;
if((barleft > 0) && isfinite (barleft))
{
autonextmom = Moment (now_mom ().main_part_ + barleft);
find_global_context ()->add_moment_to_process (nextmom);
}
Lukas