d...@gnu.org wrote:
> Ok, here is a filthy bad thing:  in issue 2392 I finally punted and gave
> up on start_translation_timestep in implicitly created contexts to be
> reliably run.
>
> That means that for implicitly created contexts from a
> Simple_music_iterator, start_translation_timestep will only get run at
> the timestep _after_ creation.

...and it crashes on \score { { | c4 } \midi {} }, for the same reason
as issue 2392.

> If you think you can fix _that_, go ahead

OK: Issue 3744 fixes that for all score-level translators by creating
the Score context before iteration starts. Creating it later was
dubious anyway, because Score_engraver or Score_performer is needed
for iteration to work. AFAICT it's never valid to explicitly create a
score context (and the notation manual says so); if that's not true,
then this isn't safe.

Other contexts can legitimately be created during iteration, so their
translators can still miss start_translation_timestep. That could be
prevented by calling start_translation_timestep in
Translator_group::create_child_translator, but that's not strictly
accurate since it's not actually the start of a timestep. It's less
surprising for newly created contexts than for Score, though.

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to