Ahoi! While processing my LilyPond/ConTeXt songbook, I experience still the same behaviour as in 2006-10: The checking, if a LilyPond buffer/temp file has changed, works only with the old Perl texexec, the recent Ruby version creates/processes the files only if they're missing completely and then still uncomplete: after 20-some songs, some buffers get dropped, so that LilyPond score and ConTeXt lyrics don't match. But I can't simply use the Perl texexec, because that doesn't create table of contents and references. Besides being much slower. Looks like the workaround of first Perl, then Ruby gives the expected result, but it's an annoyance. Maybe it's only a problem of the LilyPond module, but I guess the filechange check is somehow broken in the Ruby version. What details should I provide to track the problem down? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Fri, 4 May 2007, Henning Hraban Ramm wrote:
Ahoi!
While processing my LilyPond/ConTeXt songbook, I experience still the same behaviour as in 2006-10:
The checking, if a LilyPond buffer/temp file has changed, works only with the old Perl texexec, the recent Ruby version creates/processes the files only if they're missing completely and then still uncomplete: after 20-some songs, some buffers get dropped, so that LilyPond score and ConTeXt lyrics don't match.
But I can't simply use the Perl texexec, because that doesn't create table of contents and references. Besides being much slower.
Looks like the workaround of first Perl, then Ruby gives the expected result, but it's an annoyance.
Maybe it's only a problem of the LilyPond module, but I guess the filechange check is somehow broken in the Ruby version.
What details should I provide to track the problem down?
I usually find the output of texmfstart --verbose texexec --verbose to be useful in seeing what is going wrong. I think that the R module also uses the --ifchanged switch. If something has broken, it will also affect the R module. Aditya
Am 2007-05-04 um 20:17 schrieb Aditya Mahajan:
I usually find the output of texmfstart --verbose texexec --verbose to be useful in seeing what is going wrong. I think that the R module also uses the --ifchanged switch. If something has broken, it will also affect the R module.
Actually it was easy, and I remember to have that problem reported when I enhanced the LilyPond module: It says the following with *-1.tmp for every song, i.e. the counter doesn't work in the Ruby version: """ TeXUtil | running texmfstart --ifchanged=prd_winternacht- lilypond-1.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts - dinclude-eps-fonts prd_winternacht-lilypond-1.tmp """ In the module it's defined as: """ \global\advance\lily!figures\plusone \edef\lily!filename{\bufferprefix lilypond-\the\lily!figures} ... \edef\LP{texmfstart --ifchanged=\lily!filename.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \lily! filename.tmp} """ I still don't understand a lot of TeX programming, so I've no clue. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Fri, 4 May 2007, Henning Hraban Ramm wrote:
Am 2007-05-04 um 20:17 schrieb Aditya Mahajan:
I usually find the output of texmfstart --verbose texexec --verbose to be useful in seeing what is going wrong. I think that the R module also uses the --ifchanged switch. If something has broken, it will also affect the R module.
Actually it was easy, and I remember to have that problem reported when I enhanced the LilyPond module:
It says the following with *-1.tmp for every song, i.e. the counter doesn't work in the Ruby version: """ TeXUtil | running texmfstart --ifchanged=prd_winternacht- lilypond-1.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts - dinclude-eps-fonts prd_winternacht-lilypond-1.tmp """
In the module it's defined as: """ \global\advance\lily!figures\plusone \edef\lily!filename{\bufferprefix lilypond-\the\lily!figures} ... \edef\LP{texmfstart --ifchanged=\lily!filename.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \lily! filename.tmp} """
I still don't understand a lot of TeX programming, so I've no clue.
\edef expands its argument at the time of the definition. So \lily!filename is always *-1.tmp. Try changing the \edefs to \def. Aditya
Am 2007-05-04 um 21:15 schrieb Aditya Mahajan:
""" \global\advance\lily!figures\plusone \edef\lily!filename{\bufferprefix lilypond-\the\lily!figures} ... \edef\LP{texmfstart --ifchanged=\lily!filename.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \lily! filename.tmp} """
I still don't understand a lot of TeX programming, so I've no clue.
\edef expands its argument at the time of the definition. So \lily!filename is always *-1.tmp. Try changing the \edefs to \def.
Arrgll! Yes, that helped. Thanks a lot! I'll see soon if that solved everything and then upload the corrected version of the module. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Am 2007-05-04 um 21:50 schrieb Henning Hraban Ramm:
""" \global\advance\lily!figures\plusone \edef\lily!filename{\bufferprefix lilypond-\the\lily!figures} ... \edef\LP{texmfstart --ifchanged=\lily!filename.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \lily! filename.tmp} """
I still don't understand a lot of TeX programming, so I've no clue.
\edef expands its argument at the time of the definition. So \lily!filename is always *-1.tmp. Try changing the \edefs to \def.
BTW: Why did that change between the two versions? But anyway: It doesn't reckognize that the buffer has changed, if it's from a different component. Example: My songbook is a product. Every song is a component. If I change the order of the components in the product, ConTeXt (texmfstart, texexec, whoever) doesn't reckognize that, so I get the scores in the old order, i.e. with the wrong title & lyrics! Similar with my test product that only imports one component (for debugging the notes): If I change the component to import, I always get the last score that I checked. And remember: It works with Perl texexec! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Fri, 4 May 2007, Henning Hraban Ramm wrote:
Am 2007-05-04 um 21:50 schrieb Henning Hraban Ramm:
""" \global\advance\lily!figures\plusone \edef\lily!filename{\bufferprefix lilypond-\the\lily!figures} ... \edef\LP{texmfstart --ifchanged=\lily!filename.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \lily! filename.tmp} """
I still don't understand a lot of TeX programming, so I've no clue.
\edef expands its argument at the time of the definition. So \lily!filename is always *-1.tmp. Try changing the \edefs to \def.
BTW: Why did that change between the two versions?
But anyway: It doesn't reckognize that the buffer has changed, if it's from a different component.
Example: My songbook is a product. Every song is a component. If I change the order of the components in the product, ConTeXt (texmfstart, texexec, whoever) doesn't reckognize that, so I get the scores in the old order, i.e. with the wrong title & lyrics! Similar with my test product that only imports one component (for debugging the notes): If I change the component to import, I always get the last score that I checked.
It has been a while since I looked at the lilypond module. This is how I understand what is happening. The pdfs are not generated again in the second run. So, you get the old versions. Try deleting the lilypond pdfs, change the order of components, and you should get missing images.
And remember: It works with Perl texexec!
Maybe --ifchanged in not honored at all and lilypond is run every time, irrespective of whether the snippet has changed or not. BTW, how slow if lilypond, if you ask it just to create small music snippets and not do the page layout etc. If it runs reasonably fast, then there may be no need to do all this --ifchanged stuff. Just as metapost graphics are included. Aditya
Am 2007-05-04 um 23:03 schrieb Aditya Mahajan:
Example: My songbook is a product. Every song is a component. If I change the order of the components in the product, ConTeXt (texmfstart, texexec, whoever) doesn't reckognize that, so I get the scores in the old order, i.e. with the wrong title & lyrics! Similar with my test product that only imports one component (for debugging the notes): If I change the component to import, I always get the last score that I checked.
It has been a while since I looked at the lilypond module. This is how I understand what is happening. The pdfs are not generated again in the second run. So, you get the old versions. Try deleting the lilypond pdfs, change the order of components, and you should get missing images.
True - I get missing images (placeholders). If I delete all the temporary files (about 9 for every song!) I sometimes get nothing at all (only placeholders), while normally also the Ruby script does create something...
And remember: It works with Perl texexec!
Maybe --ifchanged in not honored at all and lilypond is run every time, irrespective of whether the snippet has changed or not.
No, it works completely correct, as far as I can tell. But I don't get references and TOC, so I need a final Ruby run.
BTW, how slow if lilypond, if you ask it just to create small music snippets and not do the page layout etc. If it runs reasonably fast, then there may be no need to do all this --ifchanged stuff. Just as metapost graphics are included.
I use only small snippets - simple folksongs need seldom more than 3 lines - but a lot of them... LilyPond is fast enough, but the startup needs a while (typical for Python programs, but it also reads in fonts etc.), so it's really important to run only as needed. I attached the recent version of t-lilypond, perhaps you can find an obvious error. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
participants (2)
-
Aditya Mahajan
-
Henning Hraban Ramm