Hi, just out of curiosity I wanted to check whether my context could typeset music. I found lilypond mentioned on the list, downloaded lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex posted by Henning here. When I typeset texexec test.test this test file ... \usemodule[lilypond] \starttext \startlilypond % Telemann, TWV 40:11 \version "2.6.3" \relative c’ { \set Staff.instrument = flute \key fis \minor \time 3/4 \partial 4 r8 fis’8 | fis4. cis8 a cis | fis, a cis fis a fis | b, d fis b d b | eis,, gis cis eis gis b, | a fis’ gis, fis’ cis eis | fis,4 r8 a’ gis fis | e gis, a e’ fis cis | d fis, gis b e d | cis4 \trill r8 cis b a | b dis e gis cis, b | a e’ dis fis b, a | gis4 \trill r8 } \stoplilypond \stoptext ... the result is ... name: dummy file: lilypond_2-lilypond-1 state: unknown What is missing? Steffen [OSX 10.4.9, Intel; ConTeXt ver: 2007.01.12, TeX-Live2007]
On Wed, 9 May 2007, Steffen Wolfrum wrote:
Hi,
just out of curiosity I wanted to check whether my context could typeset music. I found lilypond mentioned on the list, downloaded lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex posted by Henning here.
When I typeset texexec test.test this test file ...
... the result is ...
name: dummy file: lilypond_2-lilypond-1 state: unknown
What is missing?
Do you have write18 enabled? Check the wiki to see how to check if it is enabled, and how to enable it. Aditya
On Wednesday 09 May 2007 09:19, Aditya Mahajan wrote:
On Wed, 9 May 2007, Steffen Wolfrum wrote:
Hi,
just out of curiosity I wanted to check whether my context could typeset music. I found lilypond mentioned on the list, downloaded lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex posted by Henning here.
When I typeset texexec test.test this test file ...
... the result is ...
name: dummy file: lilypond_2-lilypond-1 state: unknown
What is missing?
Do you have write18 enabled? Check the wiki to see how to check if it is enabled, and how to enable it.
Aditya
I typeset music using mup available for about $29 USD at www.arkkra.com. The support from the authors is excellent and free updates occur once a year. I suppose it would be possible to embed a mup document source code in a tex document, write it to a file, and hte import the resulting ps file. But I use it as a pure stand alone creator. BTW it also will create a midi file from the same source. -- John Culleton Able Indexing and Typesetting Precision typesetting (tm) at reasonable cost. Satisfaction guaranteed. http://wexfordpress.com _________________________________________________________________ Need personalized email and website? Look no further. It's easy with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
On Wed, 9 May 2007 09:19:19 -0400 (EDT), Aditya Mahajan wrote:
On Wed, 9 May 2007, Steffen Wolfrum wrote:
Hi,
just out of curiosity I wanted to check whether my context could typeset music. I found lilypond mentioned on the list, downloaded lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex posted by Henning here.
When I typeset texexec test.test this test file ...
... the result is ...
name: dummy file: lilypond_2-lilypond-1 state: unknown
What is missing?
Do you have write18 enabled? Check the wiki to see how to check if it is enabled, and how to enable it.
Yes, I do: TeXExec | processing document 'lilypond_2.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file lilypond_2.top TeXExec | using randomseed 870 TeXExec | tex engine: pdfetex TeXExec | tex format: cont-en This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) \write18 enabled. %&-line parsing enabled. (/usr/local/texlive/2007/texmf/web2c/natural.tcx) entering extended mode (./lilypond_2.tex ConTeXt ver: 2007.01.12 15:56 MKII fmt: 2007.4.3 int: english/english ... systems : system commands are enabled system : module lilypond loaded (./t-lilypond.tex) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (./lilypond_2.tuo) (/usr/local/texlive/2007/texmf-dist/tex/context/base/sort-def.tex) (/usr/local/texlive/2007/texmf-dist/tex/context/base/sort-lan.tex) (./lilypond_2.tuo) (./lilypond_2.tuo) (/usr/local/texlive/2007/texmf-dist/tex/context/base/pdfr-def.tex)PsToPdf | file lilypond_2-lilypond-1.eps does not exist systems : begin file lilypond_2 at line 3 figures : figure lilypond_2-lilypond-1.pdf can not be found color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is local activated ... systems : end file lilypond_2 at line 23 ){/usr/local/texlive/2007/texmf-dist/fonts/enc/dvips/lm/lm-ec.enc} Output written on lilypond_2.pdf (1 page, 38475 bytes). Transcript written on lilypond_2.log. TeXUtil | parsing file lilypond_2.tui TeXUtil | shortcuts : 169 TeXUtil | expansions: 308 TeXUtil | reductions: 0 TeXUtil | divisions : 0 TeXUtil | loaded files: 1 TeXUtil | temporary files: 0 TeXUtil | commands: 23 TeXUtil | programs: 0 TeXUtil | tuo file saved TeXExec | runtime: 1.383958
Am 2007-05-09 um 13:47 schrieb Steffen Wolfrum: \enableregime[utf]
\usemodule[lilypond]
\starttext
\startlilypond % Telemann, TWV 40:11 \version "2.6.3"
far tool old! use the latest LilyPond 2.10.x! (the module works only with LilyPond > 2.8, as mentioned on the wiki page)
\relative c’ {
You've always ’ instead of ' -- that can't work! We need code, not typography!
\set Staff.instrument = flute \key fis \minor \time 3/4 \partial 4 r8 fis’8 | fis4. cis8 a cis | fis, a cis fis a fis | b, d fis b d b | eis,, gis cis eis gis b, | a fis’ gis, fis’ cis eis | fis,4 r8 a’ gis fis | e gis, a e’ fis cis | d fis, gis b e d | cis4 \trill r8
I'm not completely sure, but I think the \trills should be attached to the previous note.
cis b a | b dis e gis cis, b | a e’ dis fis b, a | gis4 \trill r8 } \stoplilypond
\stoptext
Probably you will experience further problems as soon as you use more than one LilyPond snippet - at the moment the Ruby texexec doesn't process more than one, the old Perl texexec does, though. Aditya is hunting the bug (I hope). Please find attached my latest version of t-lilypond (has some more options). BTW I always check my LilyPond code with LilyPond first - the call via ConTeXt is far too slow for debugging! And you wouldn't blame ConTeXt or the poor module for your errorneous LP code. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Wed, 9 May 2007 23:31:00 +0200, Henning Hraban Ramm wrote:
Am 2007-05-09 um 13:47 schrieb Steffen Wolfrum:
\enableregime[utf]
\usemodule[lilypond]
\starttext
\startlilypond % Telemann, TWV 40:11 \version "2.6.3"
far tool old! use the latest LilyPond 2.10.x! (the module works only with LilyPond > 2.8, as mentioned on the wiki page)
\relative c’ {
You've always ’ instead of ' -- that can't work! We need code, not typography!
Pardon?! The example you refer to is from the recent version of "t-lilypond.pdf" from ctan as I wrote in my initial posting (see below). As I had to start somewhere, I thought it's a good start to use the most recent versions of lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex that you have posted here last week. I have no idea why this leads to statements like "far tool old" and "We need code, not typography!". But it seems something is wrong here. Steffen On Wed, 9 May 2007 13:47:53 +0200, Steffen Wolfrum wrote: ...
I found lilypond mentioned on the list, downloaded lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex posted by Henning here.
When I typeset texexec test.test this test file ...
\usemodule[lilypond]
\starttext
\startlilypond % Telemann, TWV 40:11 \version "2.6.3" \relative c’ { \set Staff.instrument = flute \key fis \minor \time 3/4 \partial 4 r8 fis’8 | fis4. cis8 a cis | fis, a cis fis a fis | b, d fis b d b | eis,, gis cis eis gis b, | a fis’ gis, fis’ cis eis | fis,4 r8 a’ gis fis | e gis, a e’ fis cis | d fis, gis b e d | cis4 \trill r8 cis b a | b dis e gis cis, b | a e’ dis fis b, a | gis4 \trill r8 } \stoplilypond
\stoptext
Steffen
Hallo Steffen,
I have no idea why this leads to statements like "far tool old" and "We need code, not typography!".
You have two different problems: * The version of the Lilypond module on CTAN isn't actually that new since it dates back to September 2005 (according to the date of t-lilypond.pdf). Now even without that date, we can spot it in the code since it mentions the version of Lilypond it was typed for (this is a general request in Lilypond); in that case it's 2.6; so Hraban meant your code was old, not your executable (current version is 2.10). * You probably copypasted the code from the PDF, and the quotes were interpreted as a “nice quotes” from Unicode (U+2019 RIGHT SINGLE QUOTATION MARK), not a plain ASCII quote. This of course is a problem since the right single quotation mark isn't part of the Lilypond markup at all, but it's “typography”, so to say. In any case, just take the example from the file Hraban just posted and it should solve both problems (it does here). And Hraban should probably add a \version statement to his sample code ;-)
Am 2007-05-10 um 15:44 schrieb Arthur Reutenauer:
* The version of the Lilypond module on CTAN isn't actually that new since it dates back to September 2005 (according to the date of t-lilypond.pdf). Now even without that date, we can spot it in the code since it mentions the version of Lilypond it was typed for (this is a general request in Lilypond); in that case it's 2.6; so Hraban meant your code was old, not your executable (current version is 2.10).
I meant both ;-) I didn't even knew there was a version of t-lilypond on CTAN (overlooked that in Steffen's post). (It's a known problem that ConTeXt versions on CTAN are often outdated, too.) I should update the contextgarden version, but I wanted to wait if Aditya could find the error with Ruby texexec and clean up the code a bit.
In any case, just take the example from the file Hraban just posted and it should solve both problems (it does here). And Hraban should probably add a \version statement to his sample code ;-)
I was tired of the version statements in every snippet, so I let the module add a version statement. It's impossible to take care of different LilyPond versions in one module, so I always try to stick with (and change syntax for) the latest - "always" meaning "everytime I work at a songbook". LilyPond is a rather fast moving target, like ConTeXt, so some code becomes old very soon... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Thu, 10 May 2007, Henning Hraban Ramm wrote:
Am 2007-05-10 um 15:44 schrieb Arthur Reutenauer:
* The version of the Lilypond module on CTAN isn't actually that new since it dates back to September 2005 (according to the date of t-lilypond.pdf). Now even without that date, we can spot it in the code since it mentions the version of Lilypond it was typed for (this is a general request in Lilypond); in that case it's 2.6; so Hraban meant your code was old, not your executable (current version is 2.10).
I meant both ;-)
I didn't even knew there was a version of t-lilypond on CTAN (overlooked that in Steffen's post). (It's a known problem that ConTeXt versions on CTAN are often outdated, too.) I should update the contextgarden version, but I wanted to wait if Aditya could find the error with Ruby texexec and clean up the code a bit.
Sorry for being the bottleneck, but I have been awfully busy this week. Maybe, you should go ahead and update the module at garden. When I get the chance to test the changes that I was thinking about, a new version will need to be uploaded anyways. Aditya
On 5/10/07, Henning Hraban Ramm wrote:
I didn't even knew there was a version of t-lilypond on CTAN (overlooked that in Steffen's post).
You cannot escape the big brother ;)
(It's a known problem that ConTeXt versions on CTAN are often outdated, too.)
If we're speaking about ConTeXt, that's partly intentional. (It gets updated only when Taco explicitely submits it - when he thinks the version is less buggy that on average.) If you're speaking about the modules: updates to CTAN are curretly manual. CTAN team asked for rsync access to the modules. Now they have it, but didn't respond yet. I guess it's not automatic yet ... but should become so sooner or later. Mojca
So, after extensive testing (with support from Arthur) using the lilypond-module (as described) just doesn't work at all. What to do now? As it seems to be a question of several parts working / not working together, who feels "responsible"? Steffen On Fri, 11 May 2007 18:31:10 +0200, Mojca Miklavec wrote:
On 5/10/07, Henning Hraban Ramm wrote:
I didn't even knew there was a version of t-lilypond on CTAN (overlooked that in Steffen's post).
You cannot escape the big brother ;)
(It's a known problem that ConTeXt versions on CTAN are often outdated, too.)
If we're speaking about ConTeXt, that's partly intentional. (It gets updated only when Taco explicitely submits it - when he thinks the version is less buggy that on average.)
If you're speaking about the modules: updates to CTAN are curretly manual. CTAN team asked for rsync access to the modules. Now they have it, but didn't respond yet. I guess it's not automatic yet ... but should become so sooner or later.
Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 2007-05-14 um 09:45 schrieb Steffen Wolfrum:
So, after extensive testing (with support from Arthur) using the lilypond-module (as described) just doesn't work at all. What to do now? As it seems to be a question of several parts working / not working together, who feels "responsible"?
Did you try old Perl texexec? (As I wrote several times, LilyPond doesn't get called - or one time at max - with Ruby texexec.) But it seems to need one "Ruby" run afterwards. Sorry, I can't help you further, I just don't understand most of the TeX internals needed. 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-14 um 23:39 schrieb Henning Hraban Ramm:
Did you try old Perl texexec? (As I wrote several times, LilyPond doesn't get called - or one time at max - with Ruby texexec.) But it seems to need one "Ruby" run afterwards.
I tried to track down my problem with texexec calling LilyPond. In the module it says (at the moment): ... \def\LP{texmfstart --ifchanged=\lily!filename .tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \lily! filename .tmp} \def\PDF{texmfstart --ifchanged=\lily!filename .eps pstopdf \lily! filename .eps} \ifeof18 \writestatus{DEBUG-w18}{\LP} \installprogram{\LP}% \doif\jobsuffix{pdf}{% \installprogram{\PDF}% }% \else ... So I get lots of messages like: """ DEBUG-w18 : texmfstart --ifchanged=prd_kanons-lilypond-16.tmp -- exec bin: lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts prd_kanons- lilypond-16.t mp """ That means, the counter and the definition of \lily!filename are working. But the execution of LilyPond (and pstopdf) is postponed, and at that later time, \lily!filename is always "prd_kanons-lilypond-1" (counter always 1), resulting in lots of identical messages: """ TeXUtil | running texmfstart --ifchanged=prd_kanons-lilypond-1.tmp -- exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts prd_kanons-lilypond-1.tmp """ So I guess the command or counter or whatever in \installprogram is expanded at runtime. I tried \expanded, but it didn't help. Maybe you have a clue? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Hi, Henning Hraban Ramm wrote:
So I guess the command or counter or whatever in \installprogram is expanded at runtime. I tried \expanded, but it didn't help.
Maybe you have a clue?
You have to run \installprogram{} on each separate, expanded commandline. Best wishes, Taco
2007/5/24, Taco Hoekwater
So I guess the command or counter or whatever in \installprogram is expanded at runtime. I tried \expanded, but it didn't help.
You have to run \installprogram{} on each separate, expanded commandline.
I thought that was what I do. \installcommand is run after every buffer. I also tried \expanded{\installcommand{\LP}} and \installcommand{\expanded{\LP}}, but neither did help. Greetlings, Hraban
Henning Hraban Ramm wrote:
2007/5/24, Taco Hoekwater
: So I guess the command or counter or whatever in \installprogram is expanded at runtime. I tried \expanded, but it didn't help.
You have to run \installprogram{} on each separate, expanded commandline.
I thought that was what I do. \installcommand is run after every buffer. I also tried \expanded{\installcommand{\LP}} and \installcommand{\expanded{\LP}}, but neither did help.
You probably should \edef \LP then?
Am 2007-05-24 um 13:41 schrieb Taco Hoekwater:
So I guess the command or counter or whatever in \installprogram is expanded at runtime. I tried \expanded, but it didn't help. You have to run \installprogram{} on each separate, expanded commandline. I thought that was what I do. \installcommand is run after every buffer. I also tried \expanded{\installcommand{\LP}} and \installcommand{\expanded{\LP}}, but neither did help. You probably should \edef \LP then?
You have to run \installprogram{} on each separate, expanded commandline.
With \expanded{} I always get "incomplete iffalse", \edef doesn't change anything. I tried to "outsource" the command and dropped the \ifeof18 (because \executesystemcommand doesn't seem to do anything anyway): \def\doprocesslilypond#1{% \edef\LPFN{#1}% \writestatus{DEBUG-w18}{\LPFN}% \installprogram{texmfstart --ifchanged=\LPFN.tmp --exec bin:lilypond -b eps -dno-gs-load-fonts -dinclude-eps-fonts \LPFN.tmp}% \doif\jobsuffix{pdf}{% \installprogram{texmfstart --ifchanged=\LPFN.eps pstopdf \LPFN.eps}% }% } Still the same: \writestatus writes the right filename (enumerated), but the latter is always called with no.1 Of course I first tried just using #1 and only \def\LPFN. As you wrote: perhaps you did overlook that, even if \installprogram is "run" after every buffer, the execution is postponed to the end of the texexec run - I'm rather sure the number get forgotten on the way of this postponing, but everything I tried to expand the number, failed. But I don't really know what I'm doing while I try to program in TeX... HELP! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Hi, There is a bug in texutil.rb Here is a simple test. Create test.tex \def\runprogram#1% {\installprogram{echo "#1"}} \starttext \runprogram{test} \runprogram{test again} \stoptext and texexec it. Everything is fine at the TeX end, the tui file says e p {echo "test"} e p {echo "test again"} However, the output says TeXUtil | programs: 2 TeXUtil | tuo file saved TeXUtil | running echo "test" "test" TeXUtil | running echo "test" "test" TeXExec | runtime: 0.892 that is, the first command was run both times. Looking into texutil.rb, I think that the bug is in the definition of Myextras::finalizer method. In /scritps/ruby/base/texutil.rb change def MyExtras::finalizer(logger) unless (ENV["CTX.TEXUTIL.EXTRAS"] =~ /^(no|off|false|0)$/io) || (ENV["CTX_TEXUTIL_EXTRAS"] =~ /^(no|off|false|0)$/io) then @@programs.each do |p| cmd = @@programs[p.to_i] #AM: why p.to_i #AM: p is the name of the program, hence a string #AM: p.to_i evaluates to 0 always, explaining the bug logger.report("running #{cmd}") system(cmd) end end end to def MyExtras::finalizer(logger) unless (ENV["CTX.TEXUTIL.EXTRAS"] =~ /^(no|off|false|0)$/io) || (ENV["CTX_TEXUTIL_EXTRAS"] =~ /^(no|off|false|0)$/io) then @@programs.each do |cmd| logger.report("running #{cmd}") system(cmd) end end end and everything runs correctly. Hraban, I have not tested this with lilypond, but this may be part of the problem there. Aditya
Am 2007-05-24 um 22:00 schrieb Aditya Mahajan:
and everything runs correctly. Hraban, I have not tested this with lilypond, but this may be part of the problem there.
Thank you very much, Aditya, that is the WHOLE problem! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Aditya Mahajan wrote:
Hi,
There is a bug in texutil.rb Here is a simple test. Create test.tex
strange indeed, mayb esome leftover from the perl version fixed; thanks Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Quoting Hans Hagen
Aditya Mahajan wrote:
Hi,
There is a bug in texutil.rb Here is a simple test. Create test.tex
strange indeed, mayb esome leftover from the perl version
fixed; thanks
The to_i in def MyExtras::writer also looks suspicious. The tuo file has wrong information % programs: 2 % % echo "test" (echo "test") % echo "test again" (echo "test") I think that def MyExtras::writer can be simplified to def MyExtras::writer(logger,handle) handle << logger.banner("programs: #{@@programs.size}") @@programs.each do |p| # handle << "% #{p} (#{@@programs[p.to_i]})\n" handle << "% #{p}\n" end end or maybe the slightly more informative def MyExtras::writer(logger,handle) handle << logger.banner("programs: #{@@programs.size}") @@programs.each_with_index do |cmd, p| # handle << "% #{p} (#{@@programs[p.to_i]})\n" handle << "% #{p+1} (#{cmd})\n" end end BTW, using p as a variable name is not a good idea in ruby. p prints out the output of inspect, and is useful while debugging programs. Compare a = /ad?/ b = a.match("Dad") puts b p b puts b.inspect Aditya
On Thu, May 10, 2007 at 09:36:15AM +0200, Steffen Wolfrum wrote:
On Wed, 9 May 2007 23:31:00 +0200, Henning Hraban Ramm wrote:
Am 2007-05-09 um 13:47 schrieb Steffen Wolfrum:
\enableregime[utf]
\usemodule[lilypond]
\starttext
\startlilypond % Telemann, TWV 40:11 \version "2.6.3"
far tool old! use the latest LilyPond 2.10.x! (the module works only with LilyPond > 2.8, as mentioned on the wiki page)
\relative c? {
You've always ? instead of ' -- that can't work! We need code, not typography!
Pardon?!
The example you refer to is from the recent version of "t-lilypond.pdf" from ctan as I wrote in my initial posting (see below).
As I had to start somewhere, I thought it's a good start to use the most recent versions of lilypond-2.10.23-1.darwin-x86.tar.bz2 from lilypond.org, t-lilypond.pdf from ctan and t-lilypond.tex that you have posted here last week.
I have no idea why this leads to statements like "far tool old" and "We need code, not typography!".
But it seems something is wrong here.
Steffen
I also had my first brush with the lilypond module recently and also started with the example included in the manual. I don't know if I'm right (having no idea about module's inner workings) but it seems that the offending command is \version "2.6.3" after removing it everything went surprisingly smooth. Piotr
participants (9)
-
Aditya Mahajan
-
Arthur Reutenauer
-
Hans Hagen
-
Henning Hraban Ramm
-
John R. Culleton
-
Mojca Miklavec
-
Piotr Kopszak
-
Steffen Wolfrum
-
Taco Hoekwater