<p>Abjad, which is a Python library, is probably worth study here for its integration and general re-embrace of Lilypond as a compositional tool.</p>
<p><a href="http://www.projectabjad.org/">http://www.projectabjad.org/</a></p>
<p>Note that in Lilypond one can define a Scheme function over for example a set of notes.</p>
<p>Al Matthews <br>
-- <a href="http://fatmilktv.com">http://fatmilktv.com</a></p>
<p>On Aug 21, 2013 12:41 PM, &quot;Stephen Tetley&quot; &lt;<a href="mailto:stephen.tetley@gmail.com">stephen.tetley@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; &quot;Here&#39;s one I did earlier...&quot;<br>
&gt;<br>
&gt; <a href="http://www.flickr.com/photos/44929957@N03/4459628487/lightbox/">http://www.flickr.com/photos/44929957@N03/4459628487/lightbox/</a><br>
&gt;<br>
&gt; This is Haskore implementation of Chick Corea&#39;s &quot;Child Song 6&quot; rendered to LilyPond - I don&#39;t imagine Mr. Corea&#39;s publishers will be sending me a takedown request any time soon.<br>
&gt;<br>
&gt; There&#39;s a lot missing from Haskore that is needed to make good scores - the renderer of the above took a lot of effort with metrical grouping but the result is still abysmal. <br>
&gt;<br>
&gt; I doubt mathematics can help (common practice) music typesetting much - Western notation has had a thousand years to develop without the constraint of a regular syntax; so if Lilypond is horrible it is mostly the fault of what it tries to typeset (it does make some unwarranted mistakes like over-restricting the characters it can use for &quot;variable&quot; names and its parenthesizing is horrible).<br>

&gt;<br>
&gt;<br>
&gt; On 21 August 2013 14:05, Johannes Waldmann &lt;<a href="mailto:waldmann@imn.htwk-leipzig.de">waldmann@imn.htwk-leipzig.de</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I tried using lilypond ( <a href="http://www.lilypond.org/">http://www.lilypond.org/</a> )<br>
&gt;&gt; for typesetting of sheet music.<br>
&gt;&gt;<br>
&gt;&gt; While the output looks nice, the input language IMHO is quite horrible,<br>
&gt;&gt; because the underlying data/execution model is underspecified.<br>
&gt;&gt; For some parts, it tries to describe the logical structure of the score;<br>
&gt;&gt; but for others, the layout; and in addition it has several non-obvious<br>
&gt;&gt; context-dependencies (but see below), preventing modularity.<br>
&gt;&gt;<br>
&gt;&gt; Is there a better option? E.g., starting from a clear mathematical model,<br>
&gt;&gt; as in Haskore, and use lilypond only as a PDF rendering engine?<br>
&gt;&gt;<br>
&gt;&gt; Do I want hly / hts perhaps?  <a href="http://rd.slavepianos.org/?t=hly">http://rd.slavepianos.org/?t=hly</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; As I see it, the main high-level design problem<br>
&gt;&gt; is that the source language needs partial evaluation annotations<br>
&gt;&gt; for abstractions applications: sometimes they should be expanded<br>
&gt;&gt; (for MIDI rendering, always) and sometimes not (in typesetting,<br>
&gt;&gt; to create repetition marks instead of actually repeating notes).<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; PS: I agree that some of lilypond&#39;s context dependencies<br>
&gt;&gt; (relative pitch, implicit note length) do really save<br>
&gt;&gt; large amounts of tedious typing: &quot;c4 e g a c1&quot; is much more economical<br>
&gt;&gt; than &quot;[c 1 qn, e 1 qn, g 1 qn , a 1 qn, c 2 fn]&quot;<br>
&gt;&gt; which I guess is the Haskore equivalent.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Haskell-Cafe mailing list<br>
&gt;&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
</p>