Marc Hohl <m...@hohlart.de> writes: > Hi Harm, hi Paul, > > thanks a lot for your code/improvements/discussion to this subject! > > Definitively worth to be put in the LSR! > > Some remarks from me as a real-life user: > > the engraver does not expand repeats, so if there ist some \repeat > volta ... construct around, the total duration is not only wrong > (which is clear from the way the engraver works) but somewhat strange. > > So my humble question to the scheme wizards out there: is it possible > to store the total duration in a variable/property to be read > afterwards? > > I think of something like > > music = { ... } > > \score { > \new Staff { > \music > \mark \markup "Duration: > #(get-total-duration #{ \unfoldRepeats \music #})" > \bar "|." > } > } > > (just pseudo-code, of course) > > Would this be somehow possible?
I probably lack the imagination for seeing your problem.
music = \fixed c' { c1 \repeat volta 4 { g1 } \alternative { { c1 g1 } { r1 } } } \score { \new Staff { \music \mark \markup #(format "Duration: ~a" (ly:moment-main (ly:music-length #{ \unfoldRepeats \music #}))) \bar "|." } }
-- David Kastrup
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user