Changes

Jump to navigation Jump to search
173 bytes removed ,  18:21, 25 January 2021
adapt to current working setup
< [[Graphics]] | [[Using Graphics]] >
[http://lilypond.org LilyPond] is a great music engraver, and you can include LilyPond in ConTeXt source using [[moduleshttps://github.com/adityam/filter|the filter module]] with some setup. This is different from using the lilypond-book preprocessor with LaTeX. (For LaTeX there’s also a package that works similar to our ConTeXt setup here: [https://github.com/jperon/lyluatex lyluatex].)
== Simple Filter Setup ==
directory=lilytemp/, % directory for LilyPond's files
output={\externalfilterbasefile.pdf},
filtercommand={lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts -ddelete-intermediate-files -o"lilytemp/\externalfilterbasefile" "\externalfilterinputfile"}]
</texcode>
directory=\LILYTEMP/,
output={\externalfilterbasefile.pdf},
filtercommand={lilypond -dbackend=eps -dincludeddelete-epsintermediate-fonts -dno-gs-load-fonts files -o"\LILYTEMP/\externalfilterbasefile/" "\externalfilterinputfile"},]
</texcode>
</texcode>
Please look up the meaning of settings in [http://lilypond.org/doc/v2.1822/Documentation/web/manuals LilyPond’s great documentation]!
If you’d like to exchange measures like text width between ConTeXt and LilyPond, you could write those into the LilyPond buffer(see below). To give LilyPond measures to ConTeXt, you would need to write them into a temp file (using Scheme) and read that in again (useing using Lua).
For the time being this is left as an exercise to the user. ;)
Normally, your LilyPond snippets just get a running number. If you re-order your scores, each one gets re-rendered.
You can avoid that if you name your LilyPond snippets: just add <tt>[name=myfunnyname]</tt> to <{{cmd>|startlilypond</cmd>}}.
If you have just one LilyPond part per component (e.g. songs in a songbook), you could use <tt>[name=\currentcomponent]</tt>.
== Too many open files ==
With bigger projects and the above setup you might run into "too many open files" errors, at least in older Linux, OSX and other Unix-like OSes.
Ask your shell about the open files maximum and set it higher:
256
$ ulimit -S -n 2048
 
== Deprecation ==
 
The old LilyPond module (t-lilypond) doesn't work any more with recent versions of ConTeXt, therefore we removed its documentation here.
[[Category:Modules]]

Navigation menu