ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: ConTeXt and LilyPond problem
       [not found] <mailman.193.1467116172.6154.ntg-context@ntg.nl>
@ 2016-06-29  8:47 ` Robert Blackstone
  2016-07-03  8:49   ` Axel Kielhorn
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Blackstone @ 2016-06-29  8:47 UTC (permalink / raw)
  To: ntg-context


On 28 Jun 2016, at 14:16 , Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote
>> 
>> On 27 June 2016 at 16:11, Robert Blackstone wrote:
>>> Dear All,
>>> 
>>> I am trying to get the combination of ConTeXt and LilyPond working.
>>> I copied the example that I found on http://wiki.contextgarden.net/LilyPond
>>> , changing the setups a little (I don't have the font  Adobe Jenson Pro).
>>> 
>>> Processing it with mkiv from april this year and earlier produces a pdf with
>>> both zapf texts and in between the text: [[output file missing.
>>> 
>> 
>> You first need to get lilypond working from Terminal, otherwise asking
>> any other question on the ConTeXt mailing list won't really help much.
>> 
>> 
>> Mojca
> 
> Thanks Mojca,
> 
> I have tried to get lilypond working from Terminal but without success. No idea why. Whatever I do Terminal replies with : cannot execute binary file.

Dear all, and in particular Mojca Miklavec and Jean-Pierre Delange, who reacted to my first call for help, 

I think I have solved my problem.
Somehow I managed to get Lilypond working from Terminal.  Then I placed the ConTeXt-example with the LilyPond filter that I tried to compile in the same directory als the lilypond binary. Compiling it, as usual, from TeXShop it still did not start LilyPond and the .pdf still had: "[[output file missing"  where the musical example should have been.
However, compiling the file from Terminal did work.

Best regards,
Robert Blackstone







___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ConTeXt and LilyPond problem
  2016-06-29  8:47 ` ConTeXt and LilyPond problem Robert Blackstone
@ 2016-07-03  8:49   ` Axel Kielhorn
  0 siblings, 0 replies; 8+ messages in thread
From: Axel Kielhorn @ 2016-07-03  8:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 29.06.2016 um 10:47 schrieb Robert Blackstone <blackstone.robert@gmail.com>:

> I think I have solved my problem.
> Somehow I managed to get Lilypond working from Terminal.  Then I placed the ConTeXt-example with the LilyPond filter that I tried to compile in the same directory als the lilypond binary. Compiling it, as usual, from TeXShop it still did not start LilyPond and the .pdf still had: "[[output file missing"  where the musical example should have been.

You probably had to include 
/Applications/LilyPond.app/Contents/Resources/bin
into $PATH.

This PATH is only known in the Terminal.
When you call ConTeXt from the GUI (via TeXShop) you only have the default PATH.

Since TeXShop calls context via an engine file, you can add the PATH in the engine:

Change this line (actual path to context may differ):

set path= (/usr/local/texlive/context/tex/texmf-osx-64/bin /usr/local/bin $path )

to

set path= (/usr/local/texlive/context/tex/texmf-osx-64/bin /usr/local/bin /Applications/LilyPond.app/Contents/Resources/bin $path )

You will find the engines in:
~/Library/TeXShop/Engines

Axel
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ConTeXt and LilyPond problem
  2016-06-27 20:36 ` Mojca Miklavec
@ 2016-07-02 16:03   ` Henning Hraban Ramm
  0 siblings, 0 replies; 8+ messages in thread
From: Henning Hraban Ramm @ 2016-07-02 16:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2016-06-27 um 22:36 schrieb Mojca Miklavec <mojca.miklavec.lists@gmail.com>:

> On 27 June 2016 at 16:11, Robert Blackstone wrote:
> I created a shell script "lilypond" somewhere in PATH, containing
> #!/bin/bash
> exec /Applications/LilyPond.app/Contents/Resources/bin/lilypond "$@"

You can also add that path (/Applications/LilyPond.app/Contents/Resources/bin/) to your PATH. normally in .bashrc:

export PATH=$PATH:/Applications/LilyPond.app/Contents/Resources/bin/


Greetlings, Hraban
Grüßlinge, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ConTeXt and LilyPond problem
       [not found] <mailman.1.1467108001.8379.ntg-context@ntg.nl>
  2016-06-28 10:46 ` Robert Blackstone
@ 2016-06-28 11:19 ` Robert Blackstone
  1 sibling, 0 replies; 8+ messages in thread
From: Robert Blackstone @ 2016-06-28 11:19 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1683 bytes --]


On 28 Jun 2016, at 12:00 , Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote
> 
> On 27 June 2016 at 16:11, Robert Blackstone wrote:
>> Dear All,
>> 
>> I am trying to get the combination of ConTeXt and LilyPond working.
>> I copied the example that I found on http://wiki.contextgarden.net/LilyPond
>> , changing the setups a little (I don't have the font  Adobe Jenson Pro).
>> 
>> Processing it with mkiv from april this year and earlier produces a pdf with
>> both zapf texts and in between the text: [[output file missing.
>> 
>> The log-file says:
>> ---------------------
>> t-filter  . cached output file
>> 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' missing.
>> Rerunning filter
>> sh: lilypond: command not found
>> t-filter  > file
>> 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' cannot be
>> found
>> ---------------------
>> 
> 
> You first need to get lilypond working from Terminal, otherwise asking
> any other question on the ConTeXt mailing list won't really help much.
> 
> I created a shell script "lilypond" somewhere in PATH, containing [ ......] 
> and then it just consumes processor forever without producing any
> result. I'm not eager to start debugging right now, but just to let
> you know that getting lilypond to work from terminal is a prerequisite
> for getting the module to work.
> 
> Mojca

Thanks Mojca,

I have tried to get lilypond working from Terminal but without success. No idea why. Whatever I do Terminal replies with : cannot execute binary file.
I will now try to get some advice from the LilyPond list. 

Best regards,
Robert Blackstone






[-- Attachment #1.2: Type: text/html, Size: 2441 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ConTeXt and LilyPond problem
       [not found] <mailman.1.1467108001.8379.ntg-context@ntg.nl>
@ 2016-06-28 10:46 ` Robert Blackstone
  2016-06-28 11:19 ` Robert Blackstone
  1 sibling, 0 replies; 8+ messages in thread
From: Robert Blackstone @ 2016-06-28 10:46 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]


On 28 Jun 2016, at 12:00 , 
Jean-Pierre Delange <adeimantos@free.fr> wrote
> 
> Please, would you mind to answer these questions :
> 
> 1) Are you running ConTeXt as "Standalone" or with another install with LaTeX ?
> 2) Is ConTeXt running under Linux or Windows ?
> 3) What is the example you've tried to test ?
> 4) Did you have created manually a "temp" file and a buffer as it is said within the Context Garden page : "This works with ConTeXt MkII and MkIV, but takes only the first page of multi-pages scores, and you must create the folder "lilytemp" manually" ?
> 
Hello Jean-Pierre,
Thanks for your reaction.

Ref. 1: I am running ConTeXt as a standalone
Ref. 2: ConTeXt is running under Mac OSX 10.9.5. I use TeXShop as the editor.
Ref. 3: I attach the example to this mail
Ref. 4: Yes, I created a folder "lilytemp". It is in the same directory as the .tex-file I want to compile. But I have no idea how and where to create a buffer.

My guess is that ConTeXt does not find the or even a lilypond executable but I cannot see how and where I have to supply the path.

Best regards,
Robert Blackstone


[-- Attachment #2: LilyPond-ConTeXt-example-27-06-16.tex --]
[-- Type: application/octet-stream, Size: 3046 bytes --]

% LilyPond-ConTeXt-example-27-06-16
%Ref.:http://wiki.contextgarden.net/LilyPond
%Subject:  


\def\LILYTEMP{lilytemp} % name of folder for LilyPond/buffer files


\def\ParseLilypondFile#1% #1 is the name of the output file
  {\ctxlua{thirddata.parselilypondfile("#1")}}

\startluacode
 thirddata = thirddata or {}

 -- create temp folder if missing
 if not lfs.isdir("\LILYTEMP") then
   lfs.mkdir("\LILYTEMP")
 end

 function thirddata.parselilypondfile(name)
   -- include all systems (pages)
   -- name is like \LILYTEMP/mainfile-temp-lilypond-21.pdf
   logs.report("LILYPOND","name='" .. name .. "'")
   local scname = string.gsub(name, '%.pdf$', '-systems.count')
   local syco = tonumber(io.loaddata(scname)) or 0

   for nr = 1, syco do
     logs.report("LILYPOND","including system no." .. nr)
     context("\\setupfloats[location=right,frame=off]\\placefigure[none]{}{\\externalfigure[" .. string.gsub(name, '%.pdf$', '-' .. nr) .. "]}")
   end
 end
\stopluacode

\usemodule[filter]
\defineexternalfilter[lilypond]
  [continue=yes,
        cache=yes,
  readcommand=\ParseLilypondFile,
  directory=\LILYTEMP/,
  output={\externalfilterbasefile.pdf},
  filtercommand={lilypond -dbackend=eps -dinclude-eps-fonts -dno-gs-load-fonts -o"\LILYTEMP/\externalfilterbasefile" "\externalfilterinputfile"}]

 \starthiding
  \setuplayout[textwidth=6in] % matches line-width below
\definefontfeature[main][protrusion=quality, expansion=quality]
\definefontfamily[mainface][rm][Adobe Jenson Pro][features=main]
\setupbodyfont[mainface,13pt]
\setupalign[hz,hanging]
\stophiding 

\setuppapersize[A4][A4]

\usemodule[simplefonts]
\setmainfont[Verdana]
\setupbodyfont[10pt]
%\setupinterlinespace[line=18pt]

\definebodyfontenvironment[10pt][interlinespace=19pt]
\definebodyfontenvironment[9pt]
\definebodyfontenvironment[8pt]

\setupindenting[yes,20pt]%,next]
\setuppagenumbering[alternative=doublesided]



\setuplayout[
	location=doublesided,
	topspace=10mm,
	header=10mm,`
	footer=10mm,
	height=260mm, %was 266,265,263
	backspace=40mm,
	leftmargin=12mm,
	rightmargin=0mm,
	width=fit]


\starttext

\input zapf

\startlilypond

\layout{
  indent=0\mm
  ragged-right = ##f
}
\paper  {
myStaffSize = #20
  #(define fonts
    (make-pango-font-tree "Adobe Jenson Pro"
                          "Myriad Pro"
                          "Myriad Pro"
(/ myStaffSize 20)))
line-width=6\in
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  bookTitleMarkup = ##f
  scoreTitleMarkup = ##f
 }
melody = \relative c'' {
  \clef treble
  \key c \major
  \time 4/4

  a b c d
}

text = \lyricmode {
Aaa Bee Cee Dee
}

upper = \relative c'' {
  \clef treble
  \key c \major
  \time 2/4

  a4 b c d
}

lower = \relative c {
  \clef bass
  \key c \major
  \time 2/4

  a2 c
}

\score {
  <<
    \new Voice = "mel" { \autoBeamOff \melody }
    \new Lyrics \lyricsto mel \text
    \new PianoStaff <<
      \new Staff = "upper" \upper
      \new Staff = "lower" \lower
    >>
  >>
  \layout {
    \context { \Staff \RemoveEmptyStaves }
  }
}

\stoplilypond
\input tufte

\stoptext

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ConTeXt and LilyPond problem
  2016-06-27 14:11 Robert Blackstone
  2016-06-27 15:08 ` Jean-Pierre Delange
@ 2016-06-27 20:36 ` Mojca Miklavec
  2016-07-02 16:03   ` Henning Hraban Ramm
  1 sibling, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2016-06-27 20:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 27 June 2016 at 16:11, Robert Blackstone wrote:
> Dear All,
>
> I am trying to get the combination of ConTeXt and LilyPond working.
> I copied the example that I found on http://wiki.contextgarden.net/LilyPond
> , changing the setups a little (I don't have the font  Adobe Jenson Pro).
>
> Processing it with mkiv from april this year and earlier produces a pdf with
> both zapf texts and in between the text: [[output file missing.
>
> The log-file says:
> ---------------------
> t-filter  . cached output file
> 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' missing.
> Rerunning filter
> sh: lilypond: command not found
> t-filter  > file
> 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' cannot be
> found
> ---------------------
> Indeed there is no file
> lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf .
>
> With LilyPond.app itself, using TeXShop as the editor, I have no problems.
> (But I have never been able to get it working from Terminal, generating only
> messages like "cannot execute binary file" and "Permission denied" even
> after running sudo chmod u+x .)
>
> What can I do about it?

You first need to get lilypond working from Terminal, otherwise asking
any other question on the ConTeXt mailing list won't really help much.

I created a shell script "lilypond" somewhere in PATH, containing

#!/bin/bash
exec /Applications/LilyPond.app/Contents/Resources/bin/lilypond "$@"

but I don't remember if that ever worked properly.

At the moment I get

> lilypond test.ly
GNU LilyPond 2.18.2

and then it just consumes processor forever without producing any
result. I'm not eager to start debugging right now, but just to let
you know that getting lilypond to work from terminal is a prerequisite
for getting the module to work.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ConTeXt and LilyPond problem
  2016-06-27 14:11 Robert Blackstone
@ 2016-06-27 15:08 ` Jean-Pierre Delange
  2016-06-27 20:36 ` Mojca Miklavec
  1 sibling, 0 replies; 8+ messages in thread
From: Jean-Pierre Delange @ 2016-06-27 15:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Please, would you mind to answer these questions :

1) Are you running ConTeXt as "Standalone" or with another install with LaTeX ?
2) Is ConTeXt running under Linux or Windows ?
3) What is the example you've tried to test ?
4) Did you have created manually a "temp" file and a buffer as it is said within the Context Garden page : "This works with ConTeXt MkII and MkIV, but takes only the first page of multi-pages scores, and you must create the folder "lilytemp" manually" ?

----- Mail original -----
De: "Robert Blackstone" <blackstone.robert@gmail.com>
À: ntg-context@ntg.nl
Envoyé: Lundi 27 Juin 2016 16:11:52
Objet: [NTG-context] ConTeXt and LilyPond problem


Dear All, 


I am trying to get the combination of ConTeXt and LilyPond working. 
I copied the example that I found on http://wiki.contextgarden.net/LilyPond , changing the setups a little (I don't have the font Adobe Jenson Pro). 


Processing it with mkiv from april this year and earlier produces a pdf with both zapf texts and in between the text: [[output file missing. 


The log-file says: 
--------------------- 
t-filter . cached output file 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' missing. Rerunning filter 
sh: lilypond: command not found 
t-filter > file 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' cannot be found 
--------------------- 
Indeed there is no file lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf . 


With LilyPond.app itself, using TeXShop as the editor, I have no problems. (But I have never been able to get it working from Terminal, generating only messages like " cannot execute binary file " and " Permission denied " even after running sudo chmod u+x .) 


What can I do about it? 


Thanks in advance for tips and suggestions. 


Best regards, 
Robert Blackstone 




___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ConTeXt and LilyPond problem
@ 2016-06-27 14:11 Robert Blackstone
  2016-06-27 15:08 ` Jean-Pierre Delange
  2016-06-27 20:36 ` Mojca Miklavec
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Blackstone @ 2016-06-27 14:11 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1163 bytes --]

Dear All,

I am trying to get the combination of ConTeXt and LilyPond working.
I copied the example that I found on http://wiki.contextgarden.net/LilyPond , changing the setups a little (I don't have the font  Adobe Jenson Pro).

Processing it with mkiv from april this year and earlier produces a pdf with both zapf texts and in between the text: [[output file missing.

The log-file says: 
---------------------
t-filter  . cached output file 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' missing. Rerunning filter
sh: lilypond: command not found 
t-filter  > file 'lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf' cannot be found
---------------------
Indeed there is no file lilytemp/LilyPond-ConTeXt-example-27-06-16-templilypond-0.pdf .

With LilyPond.app itself, using TeXShop as the editor, I have no problems. (But I have never been able to get it working from Terminal, generating only messages like "cannot execute binary file" and "Permission denied" even after running sudo chmod u+x .)

What can I do about it?

Thanks in advance for tips and suggestions.

Best regards, 
Robert Blackstone



[-- Attachment #1.2: Type: text/html, Size: 1831 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-03  8:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.193.1467116172.6154.ntg-context@ntg.nl>
2016-06-29  8:47 ` ConTeXt and LilyPond problem Robert Blackstone
2016-07-03  8:49   ` Axel Kielhorn
     [not found] <mailman.1.1467108001.8379.ntg-context@ntg.nl>
2016-06-28 10:46 ` Robert Blackstone
2016-06-28 11:19 ` Robert Blackstone
2016-06-27 14:11 Robert Blackstone
2016-06-27 15:08 ` Jean-Pierre Delange
2016-06-27 20:36 ` Mojca Miklavec
2016-07-02 16:03   ` Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).