[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calculation of the total duration of a score
From: |
David Kastrup |
Subject: |
Re: calculation of the total duration of a score |
Date: |
Sun, 11 Sep 2016 12:16:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Marc Hohl <address@hidden> 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
- Re: calculation of the total duration of a score, (continued)
- Re: calculation of the total duration of a score, Federico Bruni, 2016/09/05
- Re: calculation of the total duration of a score, Paul, 2016/09/07
- Re: calculation of the total duration of a score, Thomas Morley, 2016/09/08
- Re: calculation of the total duration of a score, Marc Hohl, 2016/09/08
- Re: calculation of the total duration of a score, Thomas Morley, 2016/09/09
- Re: calculation of the total duration of a score, Paul, 2016/09/10
- Re: calculation of the total duration of a score, Paul, 2016/09/10
- Re: calculation of the total duration of a score, Thomas Morley, 2016/09/10
- Re: calculation of the total duration of a score, Marc Hohl, 2016/09/11
- Re: calculation of the total duration of a score,
David Kastrup <=
- Re: calculation of the total duration of a score, Marc Hohl, 2016/09/11
- Re: calculation of the total duration of a score, Paul, 2016/09/12
Re: calculation of the total duration of a score, Marc Hohl, 2016/09/08
Re: calculation of the total duration of a score, Jan-Peter Voigt, 2016/09/13