Re: calculation of the total duration of a score

2016-09-16 Thread Marc Hohl
Hi Jan-Peter, Am 16.09.2016 um 08:40 schrieb Jan-Peter Voigt: Hi Marc, nice to hear, that you have a workflow. For the record I noted two things in the file. (And if there's some spare time, I might further work on it.) Thanks for the continuing work on that issue! 1. The durations are

Re: calculation of the total duration of a score

2016-09-16 Thread Jan-Peter Voigt
Hi Marc, nice to hear, that you have a workflow. For the record I noted two things in the file. (And if there's some spare time, I might further work on it.) 1. The durations are tagged by score and stored in an a-list, so you can first collect durations in multiple scores and display them

Re: calculation of the total duration of a score

2016-09-15 Thread Marc Hohl
Am 14.09.2016 um 14:24 schrieb Marc Hohl: [...] I thought of writing the duration to a external file to be read from within the markup call in the score to be printed, but did not follow this route any further yet. Update: a simple test file shows that this works. I can - compute the total

Re: calculation of the total duration of a score

2016-09-14 Thread Marc Hohl
Hi Jan-Peter, Am 14.09.2016 um 13:18 schrieb Jan-Peter Voigt: Hi Marc, I am busy today, so I will look into your example later. No problem! In short: Repeats are not taken into account right now. Yes. Therefore I used the \unfoldRepeats/\midi-combination, but the duration computed in one

Re: calculation of the total duration of a score

2016-09-14 Thread Jan-Peter Voigt
Hi Marc, I am busy today, so I will look into your example later. In short: Repeats are not taken into account right now. I thought of a factor, that is set, when a repeat starts. But I don't know yet, how to deal with alternatives and repeats with more than two loops. Probably the engraver

Re: calculation of the total duration of a score

2016-09-14 Thread Marc Hohl
Hi Jan-Peter, ok, so I played around with your engraver. It does exactly what it needs to do, but somehow I am not able to get everything to work. I'll try to explain: Let's say that I have some music: music = { ...stuff... \repeat volta 2 { ... more stuff ... } } and want it displayed

Re: calculation of the total duration of a score

2016-09-13 Thread Marc Hohl
Hi Jan-Peter, seems to do exactly what I need, so thanks for sharing ... I'll give it a try tomorrow, when I have some time to work on my project again. Cheers, Marc Am 13.09.2016 um 10:24 schrieb Jan-Peter Voigt: Hi Marc, you already received some solutions, but I stumbled across this

Re: calculation of the total duration of a score

2016-09-13 Thread Jan-Peter Voigt
Hi Marc, you already received some solutions, but I stumbled across this thread and just want to quickly show my engraver - perhaps it also helps. It doesn't read repeats right now, but this may be solved with \unfoldRepeats and the engraver placed in the midi-block. The

Re: calculation of the total duration of a score

2016-09-12 Thread Paul
Hi Harm, On 09/10/2016 02:48 PM, Thomas Morley wrote: many thanks for looking into it and adding a diff, much easier to compare the versions. :) You're welcome! Thanks for writing the code for me to test out. :) Also for the insufficient (if duration-marks which was kept from an

Re: calculation of the total duration of a score

2016-09-11 Thread Marc Hohl
Am 11.09.2016 um 12:16 schrieb David Kastrup: [...] Would this be somehow possible? I probably lack the imagination for seeing your problem. I need the total duration in terms of minutes and seconds, taking all possible tempo changes etc. into account.

Re: calculation of the total duration of a score

2016-09-11 Thread David Kastrup
Marc Hohl 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

Re: calculation of the total duration of a score

2016-09-11 Thread Marc Hohl
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

Re: calculation of the total duration of a score

2016-09-10 Thread Thomas Morley
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 : > On 09/09/2016 05:27 PM, Thomas Morley wrote: > >> Attached you'll find a different version. > > > I noticed that text-only tempos (\tempo

Re: calculation of the total duration of a score

2016-09-10 Thread Paul
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. It also has improved code for detecting a missing initial tempo (to then supply the default

Re: calculation of the total duration of a score

2016-09-10 Thread Paul
On 09/09/2016 05:27 PM, Thomas Morley wrote: Attached you'll find a different version. It avoids creating all those grobs and killing most of them in the end. Instead a preexisting RehearsalMark (or more of them) is taken and 'text is reset. Some other changes for better usability. Hi Harm,

Re: calculation of the total duration of a score

2016-09-09 Thread Thomas Morley
2016-09-08 14:21 GMT+02:00 Marc Hohl : > Hi Harm, > > thanks a lot for your engraver, works out of the box! > > Best regards, > > Marc Hi Marc, you're welcome. Attached you'll find a different version. It avoids creating all those grobs and killing most of them in the end.

Re: calculation of the total duration of a score

2016-09-09 Thread Marc Hohl
Hi Paul, Am 08.09.2016 um 19:28 schrieb Paul: 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. Ok, no

Re: calculation of the total duration of a score

2016-09-08 Thread Paul
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

Re: calculation of the total duration of a score

2016-09-08 Thread Marc Hohl
Hi Harm, thanks a lot for your engraver, works out of the box! Best regards, Marc Am 08.09.2016 um 10:02 schrieb Thomas Morley: 2016-09-08 5:39 GMT+02:00 Paul : On 09/05/2016 05:01 AM, Marc Hohl wrote: Has someone else already done something like this? I have no

Re: calculation of the total duration of a score

2016-09-08 Thread Marc Hohl
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

Re: calculation of the total duration of a score

2016-09-08 Thread Thomas Morley
2016-09-08 5:39 GMT+02:00 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

Re: calculation of the total duration of a score

2016-09-07 Thread 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

Re: calculation of the total duration of a score

2016-09-06 Thread Marc Hohl
Am 05.09.2016 um 11:54 schrieb Federico Bruni: Il giorno lun 5 set 2016 alle 11:01, Marc Hohl ha scritto: [...] I have not tried, but maybe python-ly is able to give what you want? http://python-ly.readthedocs.io/en/latest/ly.music.html Thanks for the link. If I haven't

Re: calculation of the total duration of a score

2016-09-05 Thread Federico Bruni
Il giorno lun 5 set 2016 alle 11:01, Marc Hohl ha scritto: I have a couple of songs in my latest theatre project. It would be nice to have something like "duration: 3'22''" at the end of each song. Doing this by hand is straightforward:I generate a midi file that sounds

calculation of the total duration of a score

2016-09-05 Thread Marc Hohl
Hi list, I have a couple of songs in my latest theatre project. It would be nice to have something like "duration: 3'22''" at the end of each song. Doing this by hand is straightforward:I generate a midi file that sounds accurate and let it play by timidity – but IMHO it would be less tedious