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: Paul
Subject: Re: calculation of the total duration of a score
Date: Thu, 8 Sep 2016 13:28:07 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Marc,

Well, looks like I sent the file too soon before testing it for this use case. It looks like the html-live-score is using different units of time somehow? I haven't had a chance to look into it or figure out the difference.

Anyway, the attached file will report the correct total duration, thanks to some help from looking at Harm's code. (But I think this version will probably not work with the code for html-live-score...)

Anyway, you're probably better off using Harm's code since it was written for calculating the total duration.

Cheers,
-Paul



On 09/08/2016 06:10 AM, Marc Hohl wrote:
Hi Paul,

thanks for the file. It lookes quite promising, but a quick test shows some strange numbers I do not understand:

test.ly ---

\version "2.19.47"

\include "grob-meta-data-engraver.ily"

\score {
  \new Staff {
     \tempo 4 = 60
     \repeat unfold 60 c'4
   }
   \layout { }
   \midi { }
 }

Processing this file yields to:

GNU LilyPond 2.19.48
»test.ly« wird verarbeitet
Analysieren...
Interpretation der Musik...[8][16][16]3.75
Vorverarbeitung der grafischen Elemente...
Interpretation der Musik...
MIDI-Ausgabe nach »test.midi«...
Ideale Seitenanzahl wird gefunden...
Musik wird auf eine Seite angepasst...
Systeme erstellen...
Layout nach »/tmp/lilypond-pgKSZe« ausgeben...
Konvertierung nach »test.pdf«...
Löschen von »/tmp/lilypond-pgKSZe«...
Kompilation erfolgreich beendet

address@hidden ~/engraver$ timidity test.midi
Playing test.midi
MIDI file: test.midi
Format: 1  Tracks: 2  Divisions: 384
Sequence:
Text: creator:
Text: GNU LilyPond 2.19.48
Playing time: ~64 seconds
Notes cut: 0
Notes lost totally: 0

It shows a duration of 3.75 in line 4.

A timidity call plays the file in about 64 seconds
(even strange, 60 notes with tempo 4 = 60 should have a total duration of 60 seconds).

What does 3.75 mean?

Marc


Am 08.09.2016 um 05:39 schrieb Paul:
On 09/05/2016 05:01 AM, Marc Hohl wrote:

Has someone else already done something like this? I have no experience
in writing scheme engravers, so any hint would be highly appreciated.

lilypond-html-live-score does something like this by post-processing an
SVG with python to add meta data to the grobs in the SVG file:
https://gitlab.com/sigmate/lilypond-html-live-score/blob/master/make-live-score#L88


I was working on porting part of that to scheme so it could be done
directly.  I've attached my include file.  It will currently display the
total duration to the log.  It could be simplified in various ways if it
was calculating just the total duration and not adding timing info to
every grob.

It's still a work in progress and only lightly tested.

-Paul



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user

Attachment: grob-meta-data-engraver.ily
Description: Text document


reply via email to

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