MusiXTeX and GNU LilyPond both appear to be based around and its syntax. Is there a difference? What makes one better than the other?
MusiXTeX vs LilyPond – Comparing Music Notation Software
lilypondmusicmusixtex
Related Solutions
It's not possible to use the same font as the document with ABC, for inherent limitations of the abcm2ps
program. However, it's quite a long time since I don't update it and things might have changed (I'll take a look).
It should be easy to add "inline" versions of the music snippet inclusion, which is not there because the package was intended for inclusion of complete tunes.
Integration with LilyPond in the same way is not as easy. I have some "kind-of-working" code. A major hindrance is the difficulty of passing LilyPond parameters and directives from the TeX side (with lilypond-book it's the other way around).
Since there seems to be interest in this topic, I'll try and develop the code. For now, the following code
\begin{filecontents*}{testlily.ly}
\version "2.13.38"
\include "config.ly"
\relative c'' {
c d e c
}
\end{filecontents*}
\begin{filecontents*}{testlily3.ly}
\version "2.13.38"
\include "config.ly"
\relative c' {
c2^"Text" g'2 \times 2/3 { f8 e d } c'2 g4
}
\end{filecontents*}
\documentclass[draft]{article}
\usepackage[final]{graphicx}
\usepackage[MacOSX,between-system-space=3]{lilypond}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}
Test: integrating \LaTeX{} and LilyPond.
\lilypondfile{testlily}
Not too bad, isn't it?
\lipsum[2]
\lilypondfile{testlily3}
\end{document}
will produce the following output:
I'm not entirely sure what the problem is here, but I suspect that it was an issue with the particular version of lilypond-book
you were using. If I do something like this:
\documentclass{scrartcl}
\usepackage{fontspec}
\newcommand*{\defaultfontfamily}{Calluna}%
\defaultfontfeatures{Mapping=tex-text, Ligatures={Discretionary, Common, Rare}}%
\setmainfont{\defaultfontfamily}%
\begin{document}
\subsection*{Lilypond \lilypondversion}
\begin{lilypond}
\paper {
myStaffSize = #20
#(define fonts
(make-pango-font-tree "Calluna"
"Calluna Sans"
"Luxi Mono"
(/ myStaffSize 20)))
}
\new Voice {
\time 3/4
g2 e4
a2 f4
g2.
}
\addlyrics {
\set stanza = #"1. "
Hi, my name is Bert.
}
\addlyrics {
\override StanzaNumber #'font-name = #"Calluna"
\set stanza = #"2. "
\override LyricText #'font-family = #'roman
Oh, ché -- ri, je t'aime
}
\end{lilypond}
\subsection*{Not lilypond}
Oh, ché -- ri, je t'aime
\end{document}
and then run:
lilypond-book --latex-program=xelatex test.lytex && xelatex test.tex
I get the following output:
Note the use of Calluna in both places. Since the lilypond part of the document is getting its fonts from pango (not fontspec/xelatex), any OpenType features that show up in the TeX document won't show up in the Lilypond output... at least you get consistent fonts though!
Best Answer
MusiXTeX is TeX based. Its latest versions also uses the auxiliary program
musixflx
that reformats the first attempt made with MusiXTeX in order to adjust the spacing between (groups of) notes or bars in order to completely fill the lines.It's a very remarkable piece of software, all TeX based apart from that external intervention. Notes are made with characters and very complex scores can be produced. One can find several scores at the Werner Icking Music Archive now merged with the International Music Score Library Project.
LilyPond, on the other hand, has a syntax that is largely inspired by TeX, but that's the only likeness. It's a completely different system and uses its own engine and fonts for typesetting music. According to the Wikipedia article, LilyPond started off from MusiXTeX and this explains the similarities in syntax, but rapidly separated from its progenitor.
It's actively developed and is capable of very high level results, even better than expensive proprietary software (according to a musician friend of mine).
Personal note: I wrote a package for integrating in LaTeX music typeset with a different system (ABC); I tried to adapt it also to LilyPond, but the similarities in syntax are an obstacle. However integration is possible the other way around with scripts such as
lilypond-book
.