Welcome to the UK List of
TeX Frequently Asked Questions
on the Web

Searching

The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:
Google

Typesetting music in TeX

The current best bet for music typesetting is to use musixtex. Musixtex is a three-pass system that has a TeX-based pass, a processing pass and then a further TeX pass. The middle pass, a program called musixflx, optimises the spacing and sorts out slurs and ties. Musixtex is demanding of TeX resources, and any significant score requires that typesetting is done using e-TeX, whose expanded variable- and box-register ranges allow for more of the “parallel” activities that abound in a music score. Of course, musixtex also requires music fonts; those are available in a separate package on the archive.

Musixtex requires pretty arcane input; most people using it actually prepare (less obscure) input for pmx, whose output is TeX input suitable for musixtex.

A further preprocessor, M-Tx, allows preparation of music with lyrics; M-Tx’s output is fed into pmx, and thence to musixtex.

An alternative path to music examples within a (La)TeX document is Lilypond. Lilypond is (at heart) a batch music typesetting system with plain text input that does most of its work without TeX. Lilypond’s input syntax is less cryptic than is MusiXTeX’s, though similar quality is achieved. The lilypond FAQ mentions development of graphical user interfaces.

Another alternative in the production of music is the ABC notation, which was developed to notate the traditional music of Western Europe (which can be written on a single stave), though it can be used much more widely. A front end to musictex (see below), abc2mtex, makes ABC typesetting possible.

The program midi2tex can also generate musictex output, from MIDI files.

The history of music in TeX goes back some time; the earliest “working” macros were MuTeX, by Angelika Schofer and Andrea Steinbach. MuTeX was very limited, but it was some time before Daniel Taupin took up the baton, and developed MusicTeX, which allows the typesetting of polyphonic and other multiple-stave music; MusicTeX remains available, but is no longer recommended.

The first version of MusixTeX was developed by Andreas Egler, but he withdrew from the project to work on another package, OpusTeX. That never reached the mainstream, and is no longer maintained. The current recommended way of doing OpusTeX’s job is gregorio, which can in principle feed into a TeX-based document.

Once Andreas Egler had withdrawn (his last version of musixtex is preserved on the archive), Daniel Taupin took up the development, leading to the musixtex used today.

abc2mtex
support/abc2mtex
M-Tx
support/m-tx (or browse the directory); catalogue entry
midi2tex
support/midi2tex (or browse the directory)
musictex
macros/musictex (or browse the directory); catalogue entry
musixtex (Taupin’s version)
macros/musixtex (or browse the directory); catalogue entry
musixtex (Egler’s version)
obsolete/macros/musixtex/egler (or browse the directory)
musixtex fonts
fonts/musixtex-fonts (or browse the directory); catalogue entry
mutex
macros/mtex (or browse the directory)
pmx
support/pmx (or browse the directory)

This answer last edited: 2011-11-01


Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=music

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.27, released on 2013-06-07.