lilypond-user
[Top][All Lists]
Advanced

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

Re: calculation of the total duration of a score


From: Thomas Morley
Subject: Re: calculation of the total duration of a score
Date: Sat, 10 Sep 2016 20:48:28 +0200

Hi Paul,

many thanks for looking into it and adding a diff, much easier to
compare the versions. :)

2016-09-10 20:08 GMT+02:00 Paul <address@hidden>:
> On 09/09/2016 05:27 PM, Thomas Morley wrote:
>
>> Attached you'll find a different version.
>
>
> I noticed that text-only tempos (\tempo "Andante") caused problems. See
> attached revision which fixes this.

Good catch, I overlooked this.
Also for the insufficient
  (if duration-marks
which was kept from an earlier version. Ofcourse your correction is
the way to go.

> It also has improved code for detecting
> a missing initial tempo (to then supply the default one).  See attached diff
> file for changes.

You asked:
2016-09-10 16:40 GMT+02:00 Paul <address@hidden>:

> Also, I wonder, where you clear out these variables at the end of the
> finalize stage:
>
>          (set! evts '())
>          (set! last-evt #f)
>          (set! tempo-change-evts '())
>          (set! duration-marks '())
>
> Of course, it doesn't hurt, but is it necessary?  If so I need to do that in
> my code.

Well, at first it's a matter of code-hygiene. Those variables were
filled by the engraver doing it's work, why not clear them?
Additional I fear bleeding over, if the same engraver is used while
compiling multiple scores/files. Or if he is put into multiple
contexts of the same score.
Not entirely sure about this, but better be a paranoiac ;)


Thanks for your thorough review.
I think I'll follow your suggestion and put it in the LSR.


Best,
  Harm



reply via email to

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