On Fri, Feb 7, 2020 at 1:34 PM <[email protected]> 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 - [email protected] - http://www.xs4all.nl/~hanwen
