Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typesetting music in LaTeX

Tags:

latex

I would be grateful for any help typesetting music in LaTeX. I've tried to use MusiXTeX but have been very frustrated.

As I understand it, the MusiXTeX notation has a steep learning curve, but I'm OK with that; the notation seems to be well documented. The hardest part is installation and getting a simple "hello world" example to work.

I'm not committed to MusiXTeX; I'll try anything that works with LaTeX. But I've tried other alternatives and been equally frustrated with them.

like image 466
John D. Cook Avatar asked Mar 15 '09 19:03

John D. Cook


2 Answers

How about LilyPond? It uses its own plaintext notation, but uses TeX for output. The engine itself uses a whole slew of measures to analyze the music and produce pretty sheet music, so it's automated to a much greater extent than MusixTex is.

like image 112
Nikhil Avatar answered Oct 11 '22 13:10

Nikhil


Lilypond has a preprocessor called lilypond-book that lets you mix LaTeX code with Lilypond code in one source file.

Sample usage: tsst.lytex contains this:

\documentclass{article} \begin{document} \begin[quote,fragment,staffsize=26]{lilypond} c' d' e' \end{lilypond} \end{document} 

It also supports inline notation (instead of a display), and reading from external files.

Compile it with lilypond-book --pdf tsst.lytex, producing pdf images of each system along with a LaTeX file tsst.tex that includes the snippets, which compiles as usual with pdflatex.

like image 33
Josh Lee Avatar answered Oct 11 '22 14:10

Josh Lee