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: Han-Wen Nienhuys
Subject: Re: Issue 5740: Add \post to defer context actions to end of time step (issue 581600043 by address@hidden)
Date: Fri, 7 Feb 2020 13:57:55 +0100

On Fri, Feb 7, 2020 at 1:34 PM <address@hidden> wrote:

> On 2020/02/07 09:19:03, hanwenn wrote:
>
> > David mentions \cadenzaOff in the issue tracker. I think you could fix
> the
> > behavior inside the Timing_engraver without requiring a new construct
> (although,
> > if we did this, we'd probably upset bar numbering across existing
> scores.)
>
> I think I tried.  At any rate, I was not proposing to change existing
> \cadenzaOff functionality since that has clearly defined semantics.  But
> it has evaded me to find a way of expressing "end cadenza and bar".  The
> best I could do so far could be expressed as
>
> \cadenzaOffAfter =
> #(define-music-function (last-note) (ly:music?)
>    #{ \partial #(ly:music-duration 1 0 (ly:moment-main (ly:music-length
> lastnote)))
>       #last-note
>    #})
>

it depends on what precisely it you want to achieve if you want with "end
cadenza and bar".

Looking at timing-translator.cc, the easiest hack would be to set
measurePosition to measureLength - duration-of-note. This means you have to
execute some scheme to retrieve the measureLength at the time. But it might
be fragile if you meddle with timing if there are multiple staves.

If changing C++ (which the change under review also does) is on the table,
it would probably be easier to simply detect the 'timing going from #f to
#t and reset measurePosition directly in C++.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen


reply via email to

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