Changes

Jump to navigation Jump to search
248 bytes added ,  16:38, 21 September 2005
Updated page to reflect the existence of t-lilypond.tex
< [[Graphics]] | [[Using Graphics]] > ((Please leave this page orphaned until LilyPond integration is ready!))
[http://www.lilypond.org LilyPond] is a great music engraver, and this page is for future you can include LilyPond integration in ConTeXtsource using [http://modules.contextgarden. At net/t-lilypond the moment you can use LilyPond's PDFs as graphics just finelilypond module.]
== Setup ==
* First you need a working [http://www.lilypond.org LilyPond] installation plus dependencies like GhostScript.
* see Include the lilypond module<texcode>\usemodule[lilypond]</texcode>* If you want, you can change the default settings using <cmd>setupLilyPondsetuplilypond</cmd>
== Snippets ==
<texcode>
There are some notes \LilyPondlilypond{ \relative{bes a c b} } embedded in this line.
</texcode>
\section{A Tune}
\startLilyPondstartlilypond
\relative {
\repeat volta 2 {
}
}
\stopLilyPondstoplilypond
There's nothing to say about this tune yet; my friend heard it from Lúnasa.
== Developer's Corner ==
I need to figure out For information how LilyPond's LaTeX the integration in <tt>lilypond-book</tt> works. It is a different approach: LilyPond preprocesses , please check the LaTeX module code, replaces LilyPond code with images and runs its pdf version (both available from [http://modules.contextgarden.net/t-lilypond]). Unlike lilypond-book for LaTeX. Instead with ConTeXt, texexec would do this preprocessing the module does not use a precompiling stepand thus can react to local width changes and the like, avoiding even if the need to run different programs yourself.I guess I can copy the needed setup (LilyPond stub file) from <tt>lilypond-book</tt> (code is stored in a messy Python script)buffer.
I don't Things that have not been implemented yet know how to prepare <cmd>setupLilyPond</cmd>. It should be able toinclude:
* set the text font (default should be ConTeXt's bodyfont instead of LilyPond's)
* set line widthmake lilypond call back on ConTeXt for included TeX (cf. [http://lsr.dsi.unimi.it/LSR/Item?id=107])* set staff and text sizeget information from lilypond about the baseline, for run-in music fragments* tell lilypond how much space is left on the first page* access most other layout parameterscheck and probably work on proper multi-page music
LilyPond uses fontconfig for font search. At least on MacOS X it's very restricted what kind of fonts it can use - only single-style TrueType (including dfont). I didn't manage yet to use fonts from the TeX tree. (That doesn't seem to be fontconfig's fault - it writes appropriate font cache files everywhere.)
* see [http://lilypond.org/doc/v2.7/Documentation/out-www/ LilyPond Docs]!
* How do we handle version/syntax changes of LilyPond?
* !! How do we get clean PDFs (EPS for DVI mode), without anything around the staffs? Is lilypond-book's setup enough?
--[[User:Hraban|Hraban]] 2005-08-20, lots of changes by [[User:ChristopherCreutzig|Christopher Creutzig]] 2005-09-21
== Workarounds ==
Calling lilypond from command line in Windows fails. (Seems like a bug in lilypond.)  You have to two options:* modify the module, so that lilypond is called with the whole path (<code>C:/prog/lilypond/usr/bin/lilypond</code> for example instead of <code>lilypond</code> alone).* place a <code>lilypond.bat</code> somewhere in your search path, calling c:/prog/lilypond/usr/bin/lilypond %1 %2 %3 %4 %5 %6 %7 %8 %9
[[Category:Modules]]
[[Category:Music]]
[[Category:Requests]]

Navigation menu