lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 5740: Add \post to defer context actions to end of time step (


From: nine . fierce . ballads
Subject: Re: Issue 5740: Add \post to defer context actions to end of time step (issue 581600043 by address@hidden)
Date: Thu, 06 Feb 2020 06:29:54 -0800

Reviewers: thomasmorley651, hanwenn,

Message:
The reviewers are turning the first question I asked around and asking
it back to me.  I don't know if this is useful without other stuff I've
been working on.  That's why I've posted it for review.  I thought that
you (well, mainly I thought that David K.) might know of some corner of
LilyPond where delaying a \set (or similar thing) until the end of the
current time step would be useful.


Description:
https://sourceforge.net/p/testlilyissues/issues/5740/

I've carved this off of some experimental work that allows expressing
in ly code the post-increment of a context property without
sensitivity to the number of times the music that requests it is
iterated.  That is something that the rehearsal-mark engraver does,
and I believe it can only be done currently by an engraver/performer.

The implementation of \post is similar to the way \once reverts an
effect at the end of the time step.  In fact, I first implemented it
the same way for the sake of simplicity; but after testing, I decided
to complicate it.  \once reversions naturally occur in reverse order,
but it seems more natural for \post actions to run in the order given
in the ly code.  It also seems more natural for all \once reversions
to precede all \post actions regardless of their order in the ly code.
Because of those differences, they are handled separately.

TODOs and questions:

* Is \post per se worthy to be merged, or should I wait until the
  whole group of post-increment features is ready, which is possibly
  much later or never?  It would be easier for me to finish \post and
  merge it so that I have less to rebase on a regular basis.  Can you
  think of places that \post would be useful right now?

* Test coverage is insufficient.  I've provided a few cases to show
  the basic idea.

* Are there editor configs that I need to update to say that \post is
  a built-in command?  Other similar things?

* Should this be called \post, \atEndOfTimeStep, or something else?

Please review this at https://codereview.appspot.com/581600043/

Affected files (+234, -21 lines):
  A input/regression/set-once-post.ly
  A input/regression/set-post.ly
  M lily/apply-context-iterator.cc
  M lily/context.cc
  M lily/context-scheme.cc
  M lily/global-context.cc
  M lily/include/context.hh
  M lily/include/global-context.hh
  M lily/include/lily-imports.hh
  M lily/lily-imports.cc
  M lily/property-iterator.cc
  M ly/music-functions-init.ly
  M scm/define-context-properties.scm
  M scm/define-music-properties.scm





reply via email to

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