lilypond-devel
[Top][All Lists]
Advanced

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

Re: Cleanup and generalization: get rid of Audio_column. (issue 42600043


From: James
Subject: Re: Cleanup and generalization: get rid of Audio_column. (issue 42600043)
Date: Sun, 22 Dec 2013 00:03:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 21/12/13 21:28, Devon Schudy wrote:
dak wrote:
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.
Where does the manual say that?  It's not true.
I was imagining it. :( Learning Manual 3.3.2 says “\new Score should
not be used” (but it also says “The Score context is usually left to
be created automatically”), and Notation Manual 5.1.1 says "A Score
context is instantiated implicitly when a \score {…} or \layout {…}
block is processed", but it never actually says it *can't* be
explicitly created.

[on doing start_translation_timestep for new contexts]
Better late than never...  The problem is then to avoid calling
start_translation_timestep twice under any circumstances.
It would only be called again if a context was created during
start_translation_timestep. I don't think that happens now, but
translators do a lot in start_translation_timestep, so it might
accidentally happen someday.

Doing start_translation_timestep in mid-timestep is unclean, though,
and may confuse translators that expect it to be called at the
beginning. It passes the tests, but I wouldn't be surprised if it
introduces bugs. I don't think it's an improvement.

Iteration has an awful lot of undocumented invariants about what's
called when and who listens to what. It would be nice to detect and
warn about violations.

Some possibilities to make iteration more maintainable:
  * Call start/stop_translation_timestep directly from
run_iterator_on_me, not through translators. Remove the Prepare and
OneTimeStep events.
  * Create contexts in advance by calling create_children before each timestep.
  * Warn when contexts are created in mid-timestep.
  * Figure out other context invariants and write them down.

_______________________________________________
lilypond-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-devel
http://code.google.com/p/lilypond/issues/detail?id=1322

Has this anything to do with this conversation?

James



reply via email to

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